Hosting & Deployment

EasyApache PHP Versions and Extensions

Manage PHP branches and extensions with EasyApache and MultiPHP while verifying the distinct CLI and web runtimes.

EasyApache 4 is cPanel's supported system for managing Apache and related PHP packages on compatible servers. It is important to distinguish the installed PHP packages, the PHP version assigned to a domain, and the PHP binary used by command-line scripts. These can be different, which explains many “works in browser but fails in cron” problems.

Understand the layers

A server may have several supported PHP branches installed at once. MultiPHP Manager assigns a version to a domain; PHP-FPM may provide the handler; EasyApache installs the underlying packages and extensions. The CLI binary can be selected independently. For example, a cPanel account may run a version-specific binary under /opt/cpanel/ea-phpXX/root/usr/bin/php.

Check the CLI runtime:

/opt/cpanel/ea-php84/root/usr/bin/php -v
/opt/cpanel/ea-php84/root/usr/bin/php -m

For the web runtime, use a temporary protected diagnostic page only when necessary, verify the loaded modules, and remove the page immediately. Never leave a public phpinfo() endpoint available.

Install extensions through supported tooling

Use WHM's EasyApache interface or the package manager documented for the installed cPanel version. Confirm the extension package matches the PHP branch in use. An extension compiled for one PHP version will not necessarily load into another. After installation, verify the module list for both CLI and web contexts and restart or reload the relevant service only as instructed.

Configuration and limits

PHP settings may be defined at different levels: global configuration, PHP-FPM pool, per-domain configuration, or application code. A value seen in CLI output may not apply to the web request. Confirm memory_limit, upload limits, execution time, and disabled functions in the actual runtime. Avoid raising limits globally to solve one application's inefficient process.

Upgrade planning

Before changing a domain's PHP version, check application compatibility, Composer platform requirements, required extensions, and deprecated behavior. Test on staging where possible, back up the site and database, and keep a rollback option. Update cron commands to the intended version-specific binary. After switching, test login, forms, uploads, scheduled jobs, and error logs—not just the home page.

Share this page Help other developers discover this resource.