Frequently Asked Question

Install a new version or remove an old version of PHP
Last Updated 6 months ago

To Install and remove PHP on Virtualmin under RHEL (and downstreams)

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

IMPORTANT

By default the Remi Repos are not installed in most distros, you need to enable them first: 

dnf install -y epel-release
dnf install -y https://rpms.remirepo.net/enterprise/remi-release-10.rpm

Being sure to replace 10 with your linux build, in this case 10 refresh to RHEL 10/Alma 10/Rocky 10. 

Then you should find php83, 84, 85, and 90 are available. 

Powered by GEN UK CLEAN GREEN ENERGY

Loading ...