Page 1 of 1

How to downgrade php 7 to php5.* in ubuntu

Posted: Wed Feb 08, 2017 5:37 pm
by e.htabar
How to downgrade php 7 to php5.* in ubuntu

Re: How to downgrade php 7 to php5.* in ubuntu

Posted: Thu Feb 09, 2017 1:16 am
by noogen
You're probably be interested in this: https://github.com/serghey-rodin/vesta/issues/1046

Both nginx->php-fpm and nginx->apache->phpfcgi instructions are there.

Re: How to downgrade php 7 to php5.* in ubuntu

Posted: Fri Feb 17, 2017 10:06 am
by Felix
I'm planning to move to PHP7 and this topic got me thinking. Could you spare some time to share with us why you need to go back to php5? Are you facing an issue with major apps like Wordpress or Joomla or is it just some custom code that needs previous php version?

Re: How to downgrade php 7 to php5.* in ubuntu

Posted: Sat Feb 18, 2017 8:33 am
by skamasle
Downgrade is like upgrade, just remove php, add correct repos and install it again

The alternative is better, add aditional php versiĆ³n php 5.5, php 5.6, php 7 and php 7.1 will be better, you can chose, test and deside what version are better for you, so you not uninstall nothing, you not breake nothing,

Re: How to downgrade php 7 to php5.* in ubuntu

Posted: Thu Feb 23, 2017 1:43 pm
by xjlin0
I actually choose Debian instead of Ubuntu, because latest Debian's still using PHP5.6 at this moment.

Re: How to downgrade php 7 to php5.* in ubuntu

Posted: Sat Sep 23, 2017 3:59 am
by MAN5
https://vvcares2.blogspot.sg/2017/09/do ... php56.html

SWITCHING BETWEEN PHP VERSIONS

Example : Ubuntu 16.04 > how to switch PHP7.0 to php5.6
This method is not to remove any php versions but installing as add-on but use any one version at any time.

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php5.6
php -v

--This may show your old version.
--So now to switching the versions 7.0 > 5.6
sudo a2dismod php7.0
sudo a2enmod php5.6
sudo service apache2 restart
sudo update-alternatives --set php /usr/bin/php5.6
--Basically need to install few modules first
sudo apt-get install php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6
--enabling your required extensions example >>> sudo phpenmod mbstring
sudo apt-get update
sudo update-alternatives --set php /usr/bin/php5.6
sudo service apache2 restart