How to change the PHP version you’re using If you have multiple PHP versions installed on your Ubuntu server, you can change what version is the default one.
To set PHP 7.4 as the default, run:
update-alternatives --set php /usr/bin/php7.4 To set PHP 8.0 as the default, run:
update-alternatives --set php /usr/bin/php8.0