Debian – Set version of PHP that runs in the shell / terminal

If you are hosting websites then it is likely that your server can run different versions of PHP.

Although it is often relatively simple to select which version each website uses, it can be trickier to change the default PHP version running on the server itself.

In Debian 9, run the following commands:

update-alternatives --set php /usr/bin/php7.2
update-alternatives --set phar /usr/bin/phar7.2
update-alternatives --set phar.phar /usr/bin/phar.phar7.2
Print Friendly, PDF & Email

More Like This


Categories


Linux Web Hosting

Tags


  • Post a comment