Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Changing PHP version on Ubuntu

Apache

sudo a2dismod php7.2
sudo a2enmod php7.3
sudo service apache2 restart

Command line

sudo update-alternatives --set php /usr/bin/php7.3
sudo update-alternatives --set phar /usr/bin/phar7.3
sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.3
sudo update-alternatives --set phpize /usr/bin/phpize7.3
sudo update-alternatives --set php-config /usr/bin/php-config7.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.