Created
February 25, 2022 16:01
-
-
Save MehulBawadia/c9a7cac1a8cabfd5ba5791273d14d422 to your computer and use it in GitHub Desktop.
Switching PHP Versions
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
#!/bin/bash | |
# switch php version | |
# All at Once - Switching from PHP 7.4 to 8.0 | |
sudo a2dismod php7.4 && sudo a2enmod php8.0 && sudo service apache2 restart | |
sudo update-alternatives --config php | |
[Choose appropriate number] for php8.0 (Generally is 6) | |
sudo service apache2 restart | |
# All at Once - Switching from PHP 8.0 to 7.4 | |
sudo a2dismod php8.0 && sudo a2enmod php7.4 && sudo service apache2 restart | |
sudo update-alternatives --config php | |
[Choose appropriate number] for php7.4 (Generally is 5) | |
sudo service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment