Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save skorotkiewicz/6c254115a93b94c0453419330d989a34 to your computer and use it in GitHub Desktop.
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?
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