How to Downgrade PHP 7.4 to PHP 7.3 in Ubuntu 20.04 LTS?

Downgrade PHP 7.4 to PHP 7.3 in Ubuntu 20.04 LTS
Downgrade PHP 7.4 to PHP 7.3 in Ubuntu 20.04 LTS

In this blog we will learn how to downgrade PHP 7.4 to PHP 7.3 . Before we start make sure you have root access of the terminal. What we will do is simply disable PHP 7.4 and install or enable PHP 7.3 from the terminal.

Following are the below steps to how to switch PHP 7.4 to PHP 7.3 :-


Step1. First, Adding PPA repository


sudo add-apt-repository ppa:ondrej/php

Step2. Update
the repository

sudo apt-get update

Step3. Install php 7.3


sudo apt-get install php7.3


Step4. Lastly Installing php 7.3 extension


sudo apt-get install php7.3-cli php7.3-common php7.3-json php7.3-opcache php7.3-mysql php7.3-mbstring  php7.3-zip php7.3-fpm php7.3-intl php7.3-simplexml

Step5. Disabling php 7.4


sudo a2dismod php7.4

Step6. Enabling php 7.3


sudo a2enmod php7.3


Step7. Restart Apache2


sudo service apache2 restart


Now check  php version by typing php -v in the terminal


vikash.ekka@vetechno:~/Desktop$ php -v

PHP 7.3.2 (cli) (built: Oct 6 2020 15:47:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.3.2, Copyright (c), by Zend Technologies


Conclusion


I hope this blog helped you to downgrade php. Please let me know if your are facing any issue. Do write your comment in the comment box.

Also Read:- How to Hide Apache, Nginx, or PHP version on Ubuntu

Also Read:- How to Uninstall PHP, Apache and MySQL on Ubuntu 18.04 LTS

Also Read:- How To Install Linux, Apache, MySQL, PHP (LAMP) on Ubuntu 20.04 LTS

Comments

Post a Comment

Popular posts from this blog

Failed to establish the VPN connection. This may be caused by a mismatch in the TLS version.

To make SSL VPN connection work, please turn off IE security configuration | vetechno

How to install Mysql 8.0.29 on Ubuntu 22.04 LTS | vetechno