Control panels

EasyApache 4 guide: profiles, modules and PHP versions

Use EasyApache 4 in WHM to add Apache modules and PHP versions, save your setup as a custom profile, and roll back to a known good profile after a bad change.

IntermediateLinux server4 min read

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.

Bash
/usr/local/bin/ea_current_to_profile --output=/etc/cpanel/ea4/profiles/custom/before-change-$(date +%F).json

The 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

  1. Click Customize next to Currently Installed Packages.
  2. Open PHP Versions and switch on the version you want, for example PHP 8.3.
  3. EasyApache asks whether to add the extensions you already use for other versions. Choosing that option keeps the new version consistent.
  4. 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

  1. Click Customize and open Apache Modules.
  2. Search for the module, for example mod_http2 or mod_headers.
  3. Switch it on. Some modules need others, and EasyApache tells you which packages it will add or remove.
  4. 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:

  1. On the EasyApache 4 page, click Customize.
  2. Go to Review and choose Save as profile instead of provisioning.
  3. 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:

Bash
/usr/local/bin/ea_install_profile --install /etc/cpanel/ea4/profiles/custom/before-change-2026-11-09.json

This 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:

Bash
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 -t to find the bad line, often a custom include that needs a removed module.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.