cPanel, WHM and EasyApache 4

How to change the PHP version in cPanel and WHM

In cPanel, open MultiPHP Manager, tick the domain, choose a version from the PHP Version menu and click Apply. That selects a build the server already has. Whether the build carries the PHP2Shell fixes depends on the server's ea-php packages, which a WHM administrator updates through EasyApache 4 and System Update.

Last reviewed against php.net and cPanel's documentation and EasyApache 4 change log.

Start here

Which part of cPanel you can reach decides what you can fix

cPanel splits PHP between two interfaces. The cPanel account screen picks a version for each website; WHM, the server administrator's console, installs and patches those versions. Find the card that matches your login.

3D laptop on building blocks with a green tick, for a site owner choosing a PHP version

cPanel login

You look after one or more websites

You can pick, per domain, which of the installed PHP versions runs. You cannot install a version, patch one or change the server default.

Change a domain's PHP version
3D server rack, for a WHM administrator updating ea-php packages

WHM root access

You run the server

You decide which ea-php packages exist, keep them patched, set the default for new accounts and turn PHP-FPM on or off for each domain.

Install the fixed builds
3D group of users around a secured server, for resellers and their clients

Reseller in WHM

You resell hosting from someone else's server

Your host can hide WHM's MultiPHP Manager from resellers, and EasyApache 4 is open only to root or resellers with root-level privileges. Patching stays with the host.

What to ask your host
3D padlock with a tick, for PHP settings locked by LiteSpeed

cPanel with LiteSpeed

Your cPanel server runs LiteSpeed

While an active LiteSpeed Web Server installation exists, WHM's MultiPHP Manager settings cannot be edited and the PHP handler is lsphp.

Updating PHP on LiteSpeed

What cPanel shipped for PHP2Shell

EasyApache 4 release 25.91, dated 21 October 2026, the same day the PHP project published its fixes, changed these packages. Release 25.92 later that day rebuilt the ea-php81, ea-php80 and ea-php74 meta packages so their change logs list the backport.

Package Change Type of fix
ea-php85 8.5.11 to 8.5.12 New PHP release
ea-php84 8.4.26 to 8.4.27 New PHP release
ea-php83 8.3.35 to 8.3.36 New PHP release
ea-php82 8.2.34 to 8.2.35 New PHP release
ea-php81, ea-php80, ea-php74 Version number unchanged Fix backported by cPanel

Source: cPanel's EasyApache 4 change log. The upstream fixed releases and the advisory detail are on the PHP2Shell page.

For cPanel account users

Change a domain's PHP version in cPanel

This is the route for most site owners, including anyone running WordPress on a cPanel hosting plan. Write down the version each domain uses before you start, so you can return to it from the same screen.

  1. Step 1

    Open MultiPHP Manager

    Sign in to your cPanel account and click MultiPHP Manager, which cPanel's documentation places in the Software group. If the icon is absent, your host has turned the feature off for your account.

  2. Step 2

    Read the domain list

    Each row shows a domain, the PHP version it uses and its PHP-FPM status: a tick for on, a cancel icon for off. An Inherited label means the domain follows the server's system version. Parked domains are not listed, because they are aliases of your primary domain. The Search box finds a domain by name on a crowded account.

  3. Step 3

    Tick the domain or domains to change

    Select the checkbox beside the domain you want to move. The change applies to that domain only; other domains on the account keep their versions.

  4. Step 4

    Pick a version from the PHP Version menu

    Versions your administrator recommends may carry a Recommended label. Choosing inherit hands the domain back to the server default. Prefer PHP 8.3 or later: EasyApache 4 supports PHP 7.4 and 8.1 to 8.5, but 8.1 and older no longer get releases from the PHP project and 8.2 is supported only until 31 December 2026.

  5. Step 5

    Click Apply

    The change applies to the selected domains. Where PHP-FPM is on, cPanel moves the PHP-FPM version to match.

  6. Step 6

    Prove the site is on a fixed build

    The menu shows branches, not patch releases. Read the full number the website reports, as described in confirm the change worked.

Same branch or a new one? If the server's ea-php packages are patched, staying on PHP 8.3 already gets you 8.3.36. Changing branch is a separate decision: it can break plugins and older code, so test it on a staging copy first. WordPress owners can follow the testing steps in how to update PHP in WordPress.

Limits your host can set. If an administrator has restricted a domain's PHP version, MultiPHP Manager cannot put the original back. Ask the host, and if they manage PHP for you, the shared hosting guide has a message you can send them.

For WHM administrators

Install the fixed PHP builds in WHM

EasyApache 4 installs only cPanel-provided PHP, packaged as ea-php##, with one package set per PHP version and its own php.ini at /opt/cpanel/ea-php##/root/etc/php.ini. New patch releases arrive as package updates, so the work is installing updates and restarting PHP.

1. See what the server has now

# Every EasyApache 4 PHP package on the server, with its version
rpm -qa | grep -i ea-php

# On Ubuntu-based cPanel servers, list them with dpkg instead
dpkg-query -W 'ea-php*'

# Ask one PHP version which patch release it is (PHP 8.3 shown)
/usr/local/bin/ea-php83 -v

cPanel documents /usr/local/bin/ea-php## as the command-line PHP for each version. Repeat the last command for every version listed. Anything below the release in the table above still needs the update.

2. Install the package updates

In WHM, open Home > Software > System Update, or follow the Run system update link at the top of EasyApache 4. System Update updates all of the server's RPM packages, ea-php included. Leave Include kernel packages clear unless you are ready for a reboot, which a kernel update may need, then click Proceed.

On an Ubuntu-based cPanel server the ea- packages are managed with apt, as cPanel's own extension instructions show, so apt update followed by apt upgrade brings them up to date.

3. Restart PHP-FPM and Apache

# Restart PHP-FPM, then Apache, so no worker keeps the old build
/usr/local/cpanel/scripts/restartsrv_apache_php_fpm --restart
/usr/local/cpanel/scripts/restartsrv_httpd --restart

cPanel's restartsrv scripts accept --restart for a soft restart and --hard for a full stop and start. PHP-FPM workers keep running the code they started with until they are replaced, so do not skip this step.

4. Add a newer PHP version if domains need one

Open Home > Software > EasyApache 4, click Customize on the current profile and click Next through the MPM and Apache module steps to PHP Versions. Select the version. EasyApache 4 offers to bring across the extensions your other versions use (PHP ## and Extensions), the version alone (PHP ## only), or an Edit list. Carry on to Review, click Provision, then Done. Note that cPanel's default profile includes PHP 8.1 and 8.2, both close to or past the end of their support.

5. Move domains off old branches

In Home > Software > MultiPHP Manager, the User Domain Settings tab lists every domain with its account, version and PHP-FPM status. Tick several domains and use Set PHP Version to move them together. On the System Settings tab, the PHP Version menu sets the version for new accounts and for existing ones that inherit; choosing a deprecated version asks you to confirm with Apply Deprecated Version.

6. Stop the next fix waiting for you

cPanel recommends updating packages whenever a new EasyApache update is released, and suggests setting Operating System Package Updates to Automatic in Update Preferences, or having root apply them by hand or on a schedule. Either way, a restart of PHP is what puts the new build into service.

PHP-FPM, handlers and php.ini

The PHP-FPM toggles and the MultiPHP INI Editor

PHP-FPM, PHP's FastCGI process manager, serves requests from pools of worker processes. On cPanel it is controlled from WHM; account users only see whether it is on.

Turning PHP-FPM on or off

  • Per domain: the PHP-FPM toggle on WHM's User Domain Settings tab, or Disable PHP-FPM for a ticked group.
  • Server default: the PHP-FPM toggle on the System Settings tab, which affects new accounts, not existing ones.
  • Everything at once: Enable PHP-FPM for All Domains, which appears only when the server has enough memory and links to a conversion log while it runs.
  • Shared document roots: enabling PHP-FPM on one domain applies it to every domain that shares its document root.
  • A domain set to inherit shows PHP-FPM as unavailable until it is given a specific version.

Pool settings worth knowing

Manage Settings (server) and PHP-FPM Settings (per domain) open the pool options. Max Requests, default 20, is how many requests a process serves before a fresh one replaces it. The PHP project's advisory for CVE-2026-109619 suggests considering pm.max_requests=1, one request per worker, as a stopgap, since that flaw relies on state left behind in a reused worker. It costs performance and does not replace the update.

The PHP handler for each version

WHM's MultiPHP Manager has a PHP Handlers section with a handler menu beside each installed version. cPanel does not support its DSO handler, which runs PHP inside Apache like mod_php, with PHP 8.0 or later, and only one version per server can use DSO. Since the PHP project rates mod_php setups as the highest risk for PHP2Shell, check legacy PHP 7.4 sites running through DSO first. Background on handlers is in the Apache guide and the PHP-FPM guide.

MultiPHP INI Editor

WHM's editor works on one PHP version at a time and saves to /opt/cpanel/<package>/root/etc/php.ini. Basic Mode offers a fixed list of directives, including memory_limit and post_max_size; Editor Mode opens the whole file. php.net suggests session.upload_progress.enabled=0 until its next bugfix release, which you can add in Editor Mode before restarting PHP-FPM. cPanel's account-level editor writes per-domain php.ini, .user.ini and .htaccess files instead, and cPanel notes those files may not match one another, so ask the host to set interim settings for the PHP version itself.

Can you not patch today? The full list of interim settings, and when to restrict or take a site offline instead, is on the should I take my website offline page. The PHP project is clear that none of them is a complete mitigation.

Confirm it worked

Confirm the change worked

A tidy MultiPHP Manager screen proves which branch is selected. It does not prove the patch release, or that the old workers have gone.

  1. 1. Re-open MultiPHP Manager. The domain should show the version you chose, without the Inherited label if you picked a specific version.
  2. 2. Read the full number through the website. WordPress shows it in Site Health. On other sites, a phpinfo() file uploaded for a minute and then removed does the same job. Look for 8.5.12, 8.4.27, 8.3.36, 8.2.35 or later. How to check your PHP version.
  3. 3. Administrators: check each installed version from the shell. Run /usr/local/bin/ea-php## with -v for every version, and see what a domain is set to with:
    # The PHP version WHM has recorded for one domain
    grep phpversion /var/cpanel/userdata/USERNAME/DOMAIN
  4. 4. For PHP 8.1, 8.0 and 7.4, read the change log, not the number.
    # ea-php81, ea-php80 and ea-php74 keep their old version numbers,
    # so look for the two CVE IDs in each package's change log instead
    for p in $(rpm -qa | grep -i ea-php81); do
      echo "$p"
      rpm -q --changelog "$p" | grep -E 'CVE-2026-10961(8|9)'
    done
    Change ea-php81 to ea-php80 or ea-php74 as needed. If no CVE line appears, compare the installed package versions with cPanel's change log before assuming the server is fixed.
  5. 5. Check for compromise if the site was exposed. CISA has listed both flaws as known to be exploited since 26 October 2026. Patching stops new attacks; it does not remove anything planted before it. Has your PHP site been compromised?

Troubleshooting

When cPanel does not do what you expect

There is no MultiPHP Manager icon in cPanel

Hosts can switch the feature off in WHM's Feature Manager. Ask your host to enable it, or to make the change for you.

The version you want is not in the PHP Version menu

Your account can only see versions the server has and your host allows. Adding one is done in WHM, through EasyApache 4, by the server administrator.

You cannot switch PHP-FPM on, or the toggle is missing

In cPanel the PHP-FPM column is a status display; only a WHM administrator changes it. A domain set to inherit cannot use PHP-FPM until it has a specific version.

Every setting in WHM's MultiPHP Manager is greyed out

LiteSpeed Web Server is installed, so the handler is lsphp and these settings are locked. Update and restart PHP through LiteSpeed instead.

A domain changed version although nobody touched it

It is probably set to inherit. An inheriting domain takes the first PHP version it finds in a .htaccess file up its directory tree, or the system default if there is none, and WHM warns that changing one domain also changes the domains inheriting from it.

PHP-FPM switched itself off after the main domain was renamed

cPanel disables PHP-FPM on the new name when a primary domain with PHP-FPM is renamed. A WHM administrator has to turn it back on.

System Update ran, but PHP 8.1 still says 8.1

That is expected. cPanel backported the fixes into ea-php81, ea-php80 and ea-php74 without changing their version numbers. Check the package change logs, and plan the move to a supported branch.

The site broke after moving to a newer branch

Select the previous version in MultiPHP Manager and click Apply to switch back, then find the plugin, theme or code that needs updating before you try again.

Using a different panel or none at all? See Plesk, Linux packages, Windows and IIS or the full list of update routes.

Quick answers

cPanel PHP versions: questions, answered

Does changing the PHP version in cPanel install the PHP2Shell fix?

No. MultiPHP Manager only chooses which installed PHP version a domain uses. The patch level of that version comes from the server's ea-php packages, which the server administrator updates in WHM. If the server has ea-php83 at 8.3.36, every domain set to PHP 8.3 gets the fix once PHP has restarted; if it does not, switching domains around changes nothing.

Has cPanel released fixed PHP builds for PHP2Shell?

Yes. cPanel's EasyApache 4 change log for release 25.91, dated 21 October 2026, updates ea-php82, ea-php83, ea-php84 and ea-php85 to 8.2.35, 8.3.36, 8.4.27 and 8.5.12, and backports the fix for CVE-2026-109618 and CVE-2026-109619 into ea-php81, ea-php80 and ea-php74. A server only has them once the packages are installed.

The fixed versions explained

Is PHP 8.1 on cPanel safe now that cPanel has backported the fix?

It closes these two flaws, but the PHP project no longer supports PHP 8.1, and CISA's alert tells organisations to take PHP systems on 8.1 or earlier offline. Treat the backport as time to move, not a reason to stay. PHP 8.2 is itself supported only until 31 December 2026, so aim for 8.3 or later.

PHP end of life dates

What does Inherited mean in cPanel's MultiPHP Manager?

The domain has no PHP version of its own. It uses the first version it finds in a .htaccess file as it works up its directory tree, and the server's system default if it finds none. Only the server administrator sets that default, so an inheriting domain can change version without anything changing in your cPanel account.

What is the difference between MultiPHP Manager in cPanel and in WHM?

cPanel's version covers the domains on one account and lets you choose among the installed versions. WHM's version covers the whole server: a System Settings tab for the default version and PHP-FPM, a User Domain Settings tab for every domain on every account, PHP-FPM pool settings and the PHP handler for each installed version.

Can a cPanel server run PHP 8 as mod_php?

No. cPanel & WHM does not support the DSO handler, its name for PHP running inside Apache, with PHP 8.0 and later. Only one PHP version on a server can use DSO, and EasyApache 4 does not include it by default. That matters for PHP2Shell because the PHP project singles out mod_php as the most exposed setup: an older server still serving PHP 7.4 through DSO deserves attention first.

3D rocket illustration above the call to find every exposed PHP server

Know your exposure

Find every PHP server you run

Patching the server you know about is the easy part. A vulnerability scan finds the forgotten staging site, the old microsite and the appliance with PHP inside, then tells you which ones are still exposed.