01 / cPanel guidesUpdated 7 Nov 2026

How to change the PHP version in cPanel

Each domain on a cPanel account can run its own PHP version. This guide shows how to switch a domain in MultiPHP Manager, what Inherit means, how Select PHP Version works on CloudLinux servers, and how to confirm which version a site really runs.

Short answer

To change the PHP version in cPanel, open Software » MultiPHP Manager, tick the domain, choose a version in the PHP Version menu and click Apply. Inherit means the domain follows the server’s default version. On CloudLinux servers your host may offer Software » Select PHP Version instead, which sets one version for the whole account. Check the result with a phpinfo() file.

Where
cPanel » Software » MultiPHP Manager
You need
A cPanel login with the MultiPHP Manager feature enabled
Applies to
cPanel & WHM 134 (LTS) to 138, Jupiter theme
CloudLinux servers
Software » Select PHP Version, one version for the whole account

Before you switch

Check which PHP versions your site’s software supports before you change anything. WordPress, its plugins and themes, and most other applications state a minimum PHP version, and older code can fail on a newer one. A version the code does not support can stop the site with a blank page or an error.

Note the version MultiPHP Manager shows for the domain now, and take a backup of the site if it matters. Switching back works the same way as switching forward.

Change the version in MultiPHP Manager

  1. Log in to cPanel.
  2. In the Software section, click MultiPHP Manager. The list shows each domain, the PHP version it uses, an Inherited label where it follows the server default, and whether PHP-FPM is on.
  3. Tick the checkbox next to the domain. Use the Search box if the account has many domains.
  4. Choose a version in the PHP Version menu. Versions your host recommends carry a Recommended label.
  5. Click Apply.

Parked domains (aliases) are not in the MultiPHP Manager list, because they always run the same PHP as the domain they belong to. Domains that share one document root also share one PHP version.

PHP-FPM is switched on or off by the host in WHM. When a domain uses PHP-FPM, MultiPHP Manager moves its PHP-FPM pool to the new version when you click Apply.

NoteIf the version you need is not in the PHP Version menu, it is not installed on the server or not offered to your account. Only the host can add it, in WHM » Software » EasyApache 4.

What Inherit means

A domain set to inherit in MultiPHP Manager has no version of its own. Apache looks for PHP version information in the .htaccess file of the domain’s document root and in the folders above it, and uses the first one it finds. If it finds none, the domain runs the server’s default version, which only the host sets in WHM » Software » MultiPHP Manager.

Inheritance follows folders, not domain names. A domain whose document root sits inside a subdomain’s folder inherits that subdomain’s version, so set a version explicitly on any domain where the version matters.

When the host changes the server’s default version, every domain set to inherit moves with it. Domains that have their own version in MultiPHP Manager stay as they are.

NoteA domain that uses PHP-FPM cannot be set to inherit. Choose a specific version for it instead.

Select PHP Version on CloudLinux servers

Hosts that run CloudLinux often add Software » Select PHP Version, CloudLinux’s PHP Selector. Select PHP Version sets one PHP version for the whole cPanel account and can let you turn PHP extensions on or off yourself. It cannot give different domains different versions.

  1. In the Software section, click Select PHP Version.
  2. Choose the version in the version menu and click Set as current.
  3. If your site needs an extension that is off, tick it in the list of extensions.

Select PHP Version only takes effect on domains that use the server’s default version in MultiPHP Manager, including domains set to inherit. A domain set to any other version in MultiPHP Manager ignores Select PHP Version. Choosing native in Select PHP Version hands control back to MultiPHP Manager.

NoteSome hosts hide MultiPHP Manager when they offer Select PHP Version. In that case Select PHP Version is the only place to change the version.

Check which version a site runs

MultiPHP Manager shows the version a domain is set to. The version that actually runs can differ because of lines in .htaccess or because Select PHP Version is in control. To see it, ask PHP itself with a phpinfo() file.

  1. Open Files » File Manager and go to the domain’s document root, for example public_html.
  2. Click + File, name the file info.php and click Create New File.
  3. Select info.php, click Edit, type <?php phpinfo(); and click Save Changes.
  4. Open https://example.com/info.php in a browser, with your own domain. The heading shows the PHP version, and Server API shows FPM/FastCGI when the site uses PHP-FPM.
  5. Delete info.php as soon as you have checked. The page shows details about the server that attackers can use.

In WordPress, Tools » Site Health » Info shows the PHP version under Server, without a test file.

Handler lines in .htaccess

MultiPHP Manager records a domain’s version in the .htaccess file of its document root, between # php -- BEGIN cPanel-generated handler, do not edit and # php -- END cPanel-generated handler, do not edit. Leave that block alone and change the version in MultiPHP Manager instead.

Handler lines that someone added by hand, or that came with a site moved from another host, can override the MultiPHP Manager setting. Look for AddHandler, SetHandler or AddType lines that name a PHP version, such as AddHandler application/x-httpd-php56 .php, in the document root’s .htaccess and in the folders above it. Remove them, or put # in front of them, and apply the version again in MultiPHP Manager.

NoteDownload a copy of .htaccess before you edit it. A typo in that file makes the whole site return “500 Internal Server Error”.

Common problems

MultiPHP Manager shows the new version, but phpinfo() still shows the old one.
A handler line in .htaccess, in the document root or a folder above it, overrides the setting, or Select PHP Version is in control because the domain uses the server default. Remove the extra handler lines, or change the version in Select PHP Version, then reload the phpinfo() page.
MultiPHP Manager is not in the Software section.
Your host has not enabled the MultiPHP Manager feature, often because the server runs CloudLinux and offers Select PHP Version instead. Use that screen, or ask the host to enable MultiPHP Manager in WHM » Feature Manager.
The version I need is missing from the PHP Version menu.
That version is not installed on the server or not available to your account. Ask your host to install it in WHM » Software » EasyApache 4. cPanel’s ready-made EasyApache 4 profiles only include versions that php.net still supports.
The site shows a blank page or “500 Internal Server Error” after the switch.
The site’s code does not work with the new version, or it needs an extension that is not installed for that version. Switch back in MultiPHP Manager, then read the PHP error log to see which file failed. In cPanel 136 and later the log is logs/php.error.log in your home directory.
WordPress says “Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”
The new PHP version lacks the MySQL extension (mysqli). Your host adds it for that version in WHM » Software » EasyApache 4. On CloudLinux servers with Select PHP Version, you may be able to tick it in that screen’s list of extensions.
A change in Select PHP Version has no effect.
The domain is set in MultiPHP Manager to a version other than the server default, and that setting wins. In MultiPHP Manager, set the domain to inherit, or to the server’s default version if it uses PHP-FPM.

Doing it from CTAServer

CTAServer’s PHP screen lists the installed PHP versions and every site on the connected cPanel servers. CTAServer reads them from WHM’s MultiPHP and keeps them in sync, so the PHP screen matches what MultiPHP Manager shows.

  • You can change a site’s PHP version, and CTAServer applies it through WHM’s MultiPHP API. Sites that share a document root change together, as in cPanel.
  • You can turn PHP-FPM on or off for a site and set its PHP-FPM pool limits.
  • You can change the server’s default PHP version. This restarts Apache, and every site set to inherit moves to the new default.
  • Only team members with the PHP permission can change versions, and every change is written to the audit log.

Frequently asked questions

How do I check my PHP version in cPanel?

Open Software » MultiPHP Manager: the list shows the version each domain is set to, with Inherited where it follows the server default. To see the version that really runs, put a file containing <?php phpinfo(); in the site’s folder, open it in a browser, then delete it.

Which PHP version should I use?

Use the newest version that your site’s software supports. Older versions stop getting security fixes from php.net. Test a major upgrade, for example from 7.4 to 8.x, on a copy of the site or at a quiet time, and keep the old version noted so you can switch back.

Can each domain in cPanel have a different PHP version?

Yes. In MultiPHP Manager each domain and subdomain can have its own version. The exceptions are aliases, which follow their main domain, and domains that share one document root, which share one version. Select PHP Version on CloudLinux sets a single version for the whole account.

Does changing the PHP version change my files or database?

No. Files, databases and email stay as they are; only the PHP interpreter that runs the site changes. If something breaks, select the old version in MultiPHP Manager and click Apply to go back.

How does a host change the default PHP version for the whole server?

In WHM » Software » MultiPHP Manager, on the System Settings tab, the host picks the system PHP Version. New accounts get that version, and existing domains only follow it if they are set to inherit.

Can I set the PHP version in .htaccess?

You can, but cPanel advises against it. MultiPHP Manager writes its own handler block to .htaccess, and a hand-written handler line can conflict with it and cause unexpected results. Use MultiPHP Manager, or Select PHP Version on CloudLinux servers.

02 / Get started7 days free · No card needed

Connect your first server today.

Free for 7 days, no card needed. Create your account, add your first server with an API token or an SSH key, and the panel starts filling in a few minutes later.

No setup fee · Cancel anytime · EU-hosted