EasyApache 4 is the part of WHM that decides which Apache modules, PHP versions and PHP extensions are installed on a cPanel server. Every change is a list of packages, and that list can be saved as a profile. This guide shows how to make changes safely, save them, and get back to a working setup if something breaks.
Note: You buy one from cPanel or a partner and install it on your Linux VPS.
Before you start
- Root access to WHM on a cPanel & WHM server.
- A quiet time for changes. Provisioning restarts Apache and PHP-FPM, which causes a short pause for visitors.
- Shell access as root, so you can save and restore profiles from the command line.
How EasyApache 4 is organised
Open WHM » Software » EasyApache 4. The page has two parts:
- Currently Installed Packages: what is on the server now, with a Customize button.
- Available Profiles: ready-made sets of packages from cPanel, plus any custom profiles you saved. Each has Provision, Customize and download options.
When you click Customize, a wizard opens with tabs such as Apache MPM, Apache Modules, PHP Versions, PHP Extensions, Additional Packages and Review. Changes are not applied until you click Provision on the Review tab.
Save a backup profile first
Before any change, save what you have now. That gives you a clean way back.
/usr/local/bin/ea_current_to_profile --output=/etc/cpanel/ea4/profiles/custom/before-change-$(date +%F).jsonThe file appears under Available Profiles in WHM as a custom profile. Custom profiles live in /etc/cpanel/ea4/profiles/custom/.
Tip: Copy the JSON file off the server too. If you rebuild the VPS later, you can install the same stack in one step.
Add a PHP version
- Click Customize next to Currently Installed Packages.
- Open PHP Versions and switch on the version you want, for example PHP 8.3.
- EasyApache asks whether to add the extensions you already use for other versions. Choosing that option keeps the new version consistent.
- Go to Review and click Provision.
The new version is now available in MultiPHP Manager, where you assign it to domains. Installing a version does not move any site to it.
Warning: Removing a PHP version that domains still use switches those domains to the system default, which may break old code. Check MultiPHP Manager before you remove a version.
Add Apache modules
- Click Customize and open Apache Modules.
- Search for the module, for example
mod_http2ormod_headers. - Switch it on. Some modules need others, and EasyApache tells you which packages it will add or remove.
- Review and Provision.
The MPM (prefork, worker or event) is also chosen here, on the Apache MPM tab. Switching MPM has side effects for PHP handlers, covered in switch Apache MPM to event.
Save your setup as a custom profile
After a successful change, save the new state so you can reuse it:
- On the EasyApache 4 page, click Customize.
- Go to Review and choose Save as profile instead of provisioning.
- Give it a clear name and file name, such as
prod-2026-11.
Or from SSH, use the same ea_current_to_profile command shown above with a new file name.
Roll back a bad change
If sites break after provisioning, go back to the profile you saved.
From WHM: find your backup under Available Profiles, click Provision on it and confirm.
From SSH, which also works when WHM is struggling:
/usr/local/bin/ea_install_profile --install /etc/cpanel/ea4/profiles/custom/before-change-2026-11-09.jsonThis installs and removes packages until the server matches the profile. Afterwards, check that each domain still has the PHP version you expect in MultiPHP Manager.
Check it works
List what is installed and test the Apache configuration:
rpm -qa | grep -E '^ea-(apache24|php)' | sort
/usr/sbin/httpd -t
/usr/sbin/httpd -M | grep -E 'mpm|http2|headers'On Ubuntu, list packages with dpkg -l | grep -E 'ea-(apache24|php)'. The httpd -t command should print Syntax OK. Then load a few sites in a browser.
Troubleshooting
- Provision fails part way: read the log shown in WHM. A package from a third-party repository often conflicts. Remove or exclude it, then provision again.
- Sites show 500 errors after a change: a PHP extension the site needs was removed. Compare the current packages with your backup profile.
- New PHP version missing in MultiPHP Manager: provisioning did not finish. Rerun it and check for errors.
- Apache will not start: run
/usr/sbin/httpd -tto find the bad line, often a custom include that needs a removed module.
Next steps
- Add single extensions quickly: install PHP extensions on cPanel.
- Tune Apache after the build: Apache settings in WHM Global Configuration.
- Assign versions to sites: MultiPHP Manager.
