Updated: 28 September 2026 · Applies to: cPanel & WHM 138 (WHM, root access)
On cPanel servers with EasyApache 4, PHP extensions are installed as packages per PHP version. (The old /scripts/phpextensionmgr tool belonged to EasyApache 3 and no longer exists.)
With WHM
- Log in to WHM as root (
https://your-server:2087). - Open Software › EasyApache 4 and click Customize next to the current profile.
- Open PHP Extensions, search for the extension (for example
gmp,imagickorioncube) and switch it on for the PHP versions you use. - Click Review and then Provision.
From the command line
dnf install ea-php83-php-gmp ea-php82-php-gmp /usr/local/cpanel/scripts/restartsrv_apache_php_fpm
Extensions that are not packaged
Use Software › Module Installers › PHP PECL in WHM, choose the PHP version and install the PECL module by name.
Confirm with /opt/cpanel/ea-php83/root/usr/bin/php -m. On CloudLinux servers, users can also switch extensions on themselves in Software › Select PHP Version.