New internet forums (messageboard) section on the AlltheInterweb Blog, with a variety of subjects to yabber about on the Interweb.
Intended to take over from a number of other older forums I created previously, and merge them together in a singular location.

Please or Register to create posts and topics.

How to downgrade the current PHP version on Ubuntu 18.04 VPS?

Ubuntu 18.04 LTS (Bionic Beaver) is the first release of Ubuntu to make it the default PHP version for new installations. It also has 7.0 and 7.1, but does not have PHP 5.6 or 5.5 available in its repository or apt-get command line. While 8.1 is the current PHP version, there are some active projects that require you to downgrade to a much earlier version such as 5.6 or 7.0.

There are two ways of downgrading PHP on Ubuntu 18.04
Downgrading the entire LAMP stack – Downgrading the entire stack is easy to do and quick as well, but it has a drawback: it will downgrade all the other software in your system that depends on PHP to work (e.g., Apache, MySQL).

Downgrading only the current PHP version – This method leaves other software untouched and will only downgrade PHP and its dependencies. While this may be more complicated than the first method, it is recommended to use this method because it will leave all other software installed on your system intact.

1. Upgrade your system
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php5.6 php5.6-mbstring php5.6-xml php7.0 php7.0-xml php7.1 php7.1-xml
sudo a2dismod php7.2 ; sudo a2enmod php5.6 ; sudo service apache2 restart

2. By default, Ubuntu will set the latest, stable version of PHP as the default i.e. version 7.2.To switch to the alternative version (7.0), you can use the update-alternatives command:
$ sudo a2dismod php7.2$ a2enmod php7.0
$ sudo service apache2 restart
$ sudo update-alternatives --set php /usr/bin/php7.2

3. After you’ve executed the above command, check PHP information by executing this command:

4. If you want to switch to another PHP version (5.6 for example), execute this command:

sudo update-alternatives --set php /usr/bin/php5.6


Astronomy Forum | Spaceflight Forum

Photography Forum

Business Forum | UK Small Business Forum | USA Small Business Forum

Personal Finance Forum | UK Investing Forum | USA Investing Forum

Television Forum | Star Trek Forum | Seinfeld Forum | South Park Forum

Movies Forum

Music Forum

Technology Forum | Web Design Forum | SEO Forum | Video Content Creator Forum | Social Media Influencers Forum

Food Forum | Food Recipes Messageboard | Beer Lover Forum | Mommy Juice Forum |

Fishing Forums

Football Forums | Soccer Forums

Car Enthusiast Forum | Motorsport Forum | Classic Cars Forum | MG Midget Forum

UK Politics Forum | USA Politics Forum | Auspol Forum | Conservative Politics Forum

UK Travel Forum | Yorkshire Forums | USA Travel Forum

Messageboard to help me learn English

Tell Your Friends.....