How downgrade PHP version?

by tressie.damore , in category: PHP General , 9 months ago

How downgrade PHP version?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by lew , 3 months ago

@tressie.damore 

To downgrade PHP, you will need to do the following:

  1. First, determine the version of PHP that you currently have installed by running the following command:
1
php -v


  1. Next, you will need to uninstall the current version of PHP. Depending on how PHP was installed on your system, you may be able to use your package manager to uninstall it. For example, on a Debian-based system, you can use the following command:
1
sudo apt-get remove php


  1. Once the current version of PHP has been uninstalled, you will need to install the desired version of PHP. You can do this using your package manager. For example, on a Debian-based system, you can use the following command to install a specific version of PHP:
1
sudo apt-get install php7.3


  1. After installing the desired version of PHP, you should verify that it is installed correctly by running the following command:
1
php -v


This should display the version of PHP that you have just installed.


Note: these steps will vary depending on your operating system and the method you used to install PHP. If you are unsure of how to proceed, you may want to consult the documentation for your operating system or the PHP website for more information.