Last active
November 30, 2021 07:52
-
-
Save akhileshdarjee/5c9185dd0210ac96cdb279fc8d68a778 to your computer and use it in GitHub Desktop.
Change PHP version system wide
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
## Interactive Mode | |
sudo update-alternatives --config php | |
sudo update-alternatives --config phar | |
sudo update-alternatives --config phar.phar | |
## Manual Mode | |
Apache (Webserver): | |
sudo a2dismod php7.4 -> PHP version which is currently enabled `php -v` | |
sudo a2enmod php8.0 -> PHP version you want to enable | |
sudo service apache2 restart | |
Command Line: | |
sudo update-alternatives --set php /usr/bin/php8.0 | |
sudo update-alternatives --set phar /usr/bin/phar8.0 | |
sudo update-alternatives --set phar.phar /usr/bin/phar.phar8.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment