Adding PHP 8.4 on Ubuntu (VirtualMin)

Last Updated: June 10, 2023

Multiple PHP Versions

LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php && apt-get update
apt-get install php8.2-{cgi,cli,fpm,pdo,gd,mbstring,mysqlnd,opcache,xml,zip,curl}
Select Y

Configuring the second PHP Version in Virtualmin

Once you have completed the installation of a second PHP version on your server, you can verify that Virtualmin sees it by logging into Virtualmin, and clicking System Settings → Re-Check Config. You should see something like this:

 

You can configure which one is the default PHP version used on new Virtual Servers. The default is to use the newest available. You can change that default in System Settings → Server Templates → Default → PHP Options page.

Add your feedback or comment below: