Forked from full-stack-king/ubuntu-php-version-switch.md
Created
October 22, 2017 20:11
-
-
Save skorotkiewicz/6c254115a93b94c0453419330d989a34 to your computer and use it in GitHub Desktop.
How can I downgrade from PHP 7 to PHP 5.6 on Ubuntu 16.04?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Switch PHP version: | |
From php5.6 to php7.0 : | |
Apache: | |
sudo a2dismod php5.6 ; sudo a2enmod php7.0 ; sudo service apache2 restart | |
CLI: | |
sudo ln -sfn /usr/bin/php7.0 /etc/alternatives/php | |
From php7.0 to php5.6: | |
Apache: | |
sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart | |
CLI: | |
sudo ln -sfn /usr/bin/php5.6 /etc/alternatives/php | |
if after you follow the below instructions you face this situation, you may need to disable the proxy_fcgi apache module: | |
sudo a2dismod proxy_fcgi proxy; sudo service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment