How to change the PHP version of your site in cPanel

Print
  • 1

On TopHost cPanel hosting you choose the PHP version yourself, from 5.6 up to 8.5, with no ticket needed. The change applies within moments. cPanel has two tools for it, both in the Software section: Select PHP Version and MultiPHP Manager. For most sites the first one is the right choice, because it also lets you manage extensions and PHP limits.

Before you switch

  • Check compatibility. Look up which PHP versions your CMS, theme and plugins or modules support. An old script may stop working on a new PHP, and a recent CMS may refuse an old one.
  • Prefer a supported version. PHP 8.1 and older no longer receive security fixes from the PHP project. Keep them only for old scripts that cannot be updated yet. The current support status is on php.net.
  • Note the current version, so you can go back in a minute if something breaks.

Method 1: Select PHP Version (recommended)

  1. In cPanel, open Software, then Select PHP Version.
  2. At the top, next to Current PHP version, click the version and choose another one from the list. Depending on the interface, the change is saved at once or after you click Set as current.
  3. Open your site and check that it works.

The Extensions tab on the same page lists the PHP extensions for the chosen version (see enabling PHP extensions), and the Options tab holds limits such as memory_limit (see changing PHP limits). Some versions of the page also have a My domains tab where a version can be set for each domain separately.

If the list shows native as the current version, the account uses the server's own PHP, and the extensions and options on this page cannot be changed. Choose a numbered version instead.

Method 2: MultiPHP Manager (one domain on a different version)

  1. In cPanel, open Software, then MultiPHP Manager.
  2. In the table, tick the domain or domains you want to change.
  3. In the PHP Version list on the right, choose the version and click Apply.

Two things to know about this tool:

  • A domain set to a specific version here no longer follows Select PHP Version. Its extensions and settings are the server's, and you cannot switch them yourself. To bring the domain back under Select PHP Version, choose inherit for it.
  • cPanel may warn that the change also affects other domains, for example a subdomain whose folder sits inside the domain's folder. Read the warning before you apply.

Checking which version the site really uses

  • WordPress: Tools, Site Health, Info tab, Server section.
  • Any site: a temporary phpinfo() file, as described at the end of changing PHP limits in cPanel. Delete the file afterwards.

The site broke after the switch

  1. Set the previous version back. The site should return straight away.
  2. Find the cause in the error_log file in the site folder. For WordPress, see finding the faulty plugin in error_log.
  3. Typical causes: outdated plugins or themes (update them first, from cPanel with WP Toolkit, see the WP Toolkit guide, then try the newer PHP again) or a missing extension, shown as "Call to undefined function" or "Class ... not found" (enable it as described in enabling PHP extensions).

If the site needs a version or setting you cannot select, open a ticket with the domain and the requirement.

Frequently asked questions

Can different sites in one account use different PHP versions?

Yes. Use the My domains tab of Select PHP Version if your panel has it, or MultiPHP Manager, keeping in mind the limits described above.

Does the PHP version affect e-mail or the database?

No. Mailboxes and MySQL databases keep working the same way; only the PHP code of the site is affected.

Related articles

Was this answer helpful?