Frequently Asked Question
Install a new version or remove an old version of PHP
Last Updated 10 days ago
To Install and remove PHP on Virtualmin
sudo dnf install php81-php-{cli,fpm,pdo,gd,mbstring,mysqlnd,opcache,curl,xml,zip,intl,sodium,ldap,smbclient,ftp,imap,bcmath,gmp,exif,apcu,memcached,redis,imagick,pcntl,phar,xmlrpc}
Replace 81 with your required version, e.g. 84, 85 etc.
To remove a specific version, you'd use
sudo dnf remove php81-php-*
and to list what you've got installed, go with
dnf list installed | grep php81
Don't forget to clean up afterwards with
sudo dnf autoremove