How to determine the version of PHP running per site on a Virtualmin server

Use the command below to quickly see which sites are running (outdated) PHP versions on your Virtualmin server:

find -L /home/*/etc/php.ini -xtype l -exec ls -l {} \;
An alternative version, that takes longer and with poorer format, is listed below:
virtualmin list-domains --multiline

FAQ

Can you update the PHP version of disabled sites?

Yes

How do you purge the PHP 7.4 version?

First find all installed versions:

dpkg -l | grep '^ii' | grep '^ii  php7.4'

Purge common, this will also uninstall libapache2-mod-php7.4

apt-purge php7.4-common

Check again using dpkg.

How do you find  all PHP 8.2 packages?

dpkg -l | grep '^ii  php8.2'

How do I install PHP 8.4 on Ubuntu 20.04?

It’s not officially supported but you can do this:

sudo add-apt-repository ppa:ondrej/php
apt install php8.4-{cli,fpm,pdo,gd,mbstring,mysqlnd,opcache,curl,xml,zip}

Reference

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *