Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

How to downgrade php 7 to php5.* in ubuntu

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
e.htabar
Posts: 20
Joined: Mon Apr 11, 2016 1:53 pm

How to downgrade php 7 to php5.* in ubuntu
  • Quote

Post by e.htabar » Wed Feb 08, 2017 5:37 pm

How to downgrade php 7 to php5.* in ubuntu
Top

noogen
Posts: 66
Joined: Thu Jan 05, 2017 9:20 pm

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

Post by noogen » Thu Feb 09, 2017 1:16 am

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.
Top

Felix
Posts: 134
Joined: Tue Aug 04, 2015 7:15 pm

Os: Ubuntu 15x
Web: apache + nginx
Re: How to downgrade php 7 to php5.* in ubuntu
  • Quote

Post by Felix » Fri Feb 17, 2017 10:06 am

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?
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

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

Post by skamasle » Sat Feb 18, 2017 8:33 am

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,
Top

xjlin0
Posts: 22
Joined: Fri Dec 30, 2016 2:22 pm

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

Post by xjlin0 » Thu Feb 23, 2017 1:43 pm

I actually choose Debian instead of Ubuntu, because latest Debian's still using PHP5.6 at this moment.
Top

MAN5
Posts: 86
Joined: Sun Jan 31, 2016 4:14 am

Os: Ubuntu 15x
Web: apache + nginx
Re: How to downgrade php 7 to php5.* in ubuntu
  • Quote

Post by MAN5 » Sat Sep 23, 2017 3:59 am

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
Top


Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password