5/5 - (4 votes)

Last Updated on June 2, 2020 by Vikash Ekka

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

By Vikash Ekka

Hi All, My name is Vikash Ekka from India. I’m the founder and tech editor of https://www.vetechno.in. I have completed my Graduation in BCA. I love to write technical articles like Windows, Linux & MAC Tutorials, Tips, Tricks, How To fix, Tutorials About Ethical Hacking & Cyber Security Guide, and Software Review. Currently, I have been working as an IT professional since 2018.

2 thoughts on “How to Downgrade PHP 7.4 to PHP 7.3 in Ubuntu 20.04 LTS?”

Leave a Reply

Your email address will not be published. Required fields are marked *