Panellicense

Add a new PHP version in EasyApache 4 without breaking sites

Add a PHP build in EasyApache 4, pick extensions, assign per-domain handlers, and recover when the Review stage stalls or rolls back.

4 min readUpdated 2026-05-16easyapache · php · multiphp · extensions
schema: HowToschema: FAQPage

EasyApache 4 (EA4) ships every supported PHP build as a separate set of RPMs, so adding a new version is a package install plus a handler change — not a recompile. The friction is everywhere else: extensions that fail to provision, the Review stage that sits at 0% for ten minutes, and domains that keep loading the old PHP after the install completes.

This guide walks the full install on a cPanel/WHM server, the extensions you almost always want, and the three places you have to look when something silently keeps using the old version.

Add the new PHP build

Open WHM → Software → EasyApache 4 → Customize on the currently provisioned profile, then click PHP Versions and tick the box for the new build (for example ea-php83). The CLI equivalent is one yum transaction:

yum -y install ea-php83 ea-php83-php-cli ea-php83-php-common

Installing only the meta package gives you a working interpreter with no extensions. Add the extension RPMs in the same transaction — pulling them in later forces a second php-fpm restart per domain.

Extensions to include by default

For a general-purpose cPanel server, these match what most WordPress, Laravel, and Magento sites expect:

yum -y install \
  ea-php83-php-bcmath ea-php83-php-curl ea-php83-php-gd \
  ea-php83-php-imagick ea-php83-php-intl ea-php83-php-mbstring \
  ea-php83-php-mysqlnd ea-php83-php-opcache ea-php83-php-pdo \
  ea-php83-php-soap ea-php83-php-sodium ea-php83-php-xml \
  ea-php83-php-zip

If you run hardened PHP for legacy sites, the alt-php packages install in parallel and do not conflict.

Survive the Review stage

The Review stage is where EA4 calculates the dependency graph before applying. On a busy server it can sit at 0% for several minutes, then complete in a burst. It is not stuck unless /var/log/cpanel/easy/apache/build.log shows an actual error.

If Review fails with Error: package conflicts, the usual cause is a stale ea-php-cli or a third-party EPEL php RPM pulled in by Webmin or another tool. Resolve it before retrying:

yum list installed | grep -E '^(php|ea-php)'
yum -y remove php-cli php-common   # the non-ea4 ones, if present

Assign the new PHP to a domain

A new build is installed but not selected. Set the system default and the per-domain handler:

whmapi1 php_set_system_default_version version=ea-php83
whmapi1 php_set_vhost_versions version=ea-php83 vhost=example.com

Or in WHM go to MultiPHP Manager, set the System PHP Version, then tick the affected domains and switch the version column. End users with the PHP Selector can override per-account from cPanel.

Rebuild and verify

/scripts/restartsrv_apache_php_fpm
curl -sI https://example.com/info.php | grep -i x-powered-by

Drop a one-line phpinfo() file in the docroot, hit it, then delete it. If the response still shows the old version, check the three usual suspects in order.

Why domains still load the old PHP

  1. PHP-FPM was not restarted for that pool. EA4 restarts FPM globally, but whmapi1 convert_all_maildirs and similar long-running tasks can leave a pool stuck. Run /scripts/restartsrv_apache_php_fpm again and confirm systemctl status ea-php83-php-fpm shows the right PID.
  2. The .user.ini or .htaccess pins the version. A line like AddHandler application/x-httpd-ea-php82___lsphp .php overrides MultiPHP Manager. Grep the docroot: grep -RInE 'x-httpd-ea-php[0-9]+' /home/*/public_html | head.
  3. The CloudLinux PHP Selector wins. If the account has PHP Selector configured, the alt-php version takes precedence over the EA4 handler. Switch the selector to "native" or set it to the matching alt-php build.

Remove an old PHP version

Only remove a build once no vhost references it. WHM's MultiPHP Manager shows which version each domain runs; the API equivalent:

whmapi1 php_get_vhost_versions | grep -B1 ea-php74
yum -y remove 'ea-php74-*'

Keep one prior version installed for a release cycle so you can fall back if a customer reports a regression. Re-add later costs a few seconds; debugging a broken WooCommerce checkout costs a lot more.

Why is EasyApache 4 stuck at Review?+
Review can sit at 0% for several minutes while it resolves dependencies. It is only stuck if /var/log/cpanel/easy/apache/build.log shows an error, or if Yum reports a package conflict — usually a stray EPEL php-cli package.
Do I need to restart Apache after adding a PHP version?+
EA4 restarts Apache and the new PHP-FPM service automatically. Run /scripts/restartsrv_apache_php_fpm manually if a long-running task held the lock during the EA4 run.
How many PHP versions can I install on one cPanel server?+
All ea-phpXX builds coexist — there is no fixed cap, but every extra version adds ~150 MB and a separate php-fpm service per domain that uses it. Most production servers keep two to four.
Why does my site still show the old PHP version in phpinfo?+
Check three places in order: PHP-FPM did not restart for that pool, a .htaccess AddHandler line pins the version, or the CloudLinux PHP Selector overrides the EA4 handler.

Next steps

Switch in an afternoon

Switch from your current reseller — free.

We migrate active cPanel, Plesk, LiteSpeed and CloudLinux licenses from any reseller. We prorate the first month so you never pay twice, and your customers see zero downtime during the swap.