Sumber: https://tecadmin.net/switch-between-multiple-php-version-on-ubuntu/#google_vignette
Switch to PHP 7.4
Similarly, if you need to configure PHP 7.4 as the default version in your system. The following set of commands will change the default PHP to 7.4 for the Apache web server and command line interface.
- Apache:
sudo a2dismod php*sudo a2enmod php7.4sudo systemctl restart apache2 - Command line interface:
sudo update-alternatives --set php /usr/bin/php7.4sudo update-alternatives --set phar /usr/bin/phar7.4sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.4sudo update-alternatives --set phpize /usr/bin/phpize7.4sudo update-alternatives --set php-config /usr/bin/php-config7.4