Last active
August 20, 2019 18:34
-
-
Save Shipu/100bc3b63c5ad58087ac017528f1d479 to your computer and use it in GitHub Desktop.
Switch php versions in ubuntu
This file contains 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
echo "Enter the php version you want to Disable:" | |
read disabledVersion | |
echo "Enter the php version you want to Enable:" | |
read enabledVersion | |
sudo a2dismod php${disabledVersion} | |
sudo a2enmod php${enabledVersion} | |
sudo service apache2 restart | |
# or | |
sudo service nginx restart | |
sudo update-alternatives --set php /usr/bin/php${enabledVersion} | |
php -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment