Skip to content

Instantly share code, notes, and snippets.

@jagad89
Last active July 4, 2019 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jagad89/0f35d9838715fbd6ef215b90a1a8561b to your computer and use it in GitHub Desktop.
Save jagad89/0f35d9838715fbd6ef215b90a1a8561b to your computer and use it in GitHub Desktop.
change php version ubuntu
Switch php version from x.y to p.q in apache
sudo a2dismod php7.2
sudo a2enmod php5.6
sudo service apache2 restart
----------------------------------------
Switch php cli version
sudo update-alternatives --config php
There are 3 choices for the alternative php (providing /usr/bin/php).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/php7.3 73 auto mode
1 /usr/bin/php5.6 56 manual mode
* 2 /usr/bin/php7.1 71 manual mode
3 /usr/bin/php7.3 73 manual mode
Press <enter> to keep the current choice[*], or type selection number: 1
I entered 1 because i wanted to switch to php5.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment