How to upgrade your site's PHP version

On most hosting you change the PHP version yourself, in the control panel. The switch takes a minute, but old themes, plugins and custom code can break, so prepare first. To be safe from PHP2Shell, choose PHP 8.3.36 or newer.

Which version to choose

Before you switch

  1. Note the current version

    Write down the version the site runs now, so you can switch back if something breaks. WordPress shows it in Tools → Site Health → Info → Server.

  2. Make a backup

    Download a full backup of the files and the database from your hosting panel, or check that your host's automatic backup is recent.

  3. Update everything

    Update the CMS, themes and plugins first. Outdated add-ons are the most common reason a site breaks on a newer PHP version.

  4. Test on a copy

    Many hosts offer a staging copy of the site. Switch PHP there first and try the pages that matter: home, contact form, checkout and login.

Where to change it

Menu names differ slightly between hosts and change over time. If you can't find the option, search your host's help pages for “PHP version”.

After you switch

  1. Try the important pages

    Open the home page, submit the contact form, log in to the admin area and, if you sell online, run a test order.

  2. Check the error log

    In cPanel, Metrics → Errors lists recent errors. In WordPress, Site Health shows problems it finds.

  3. Confirm the version

    Run the checker on your site. If the site hides its PHP version, confirm it in Site Health or your hosting panel instead.

If the site breaks

If the code can't be fixed, we rebuild the site on a supported stack

Questions about upgrading PHP

Does upgrading PHP fix PHP2Shell?

Yes, if the version you end up on is 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or newer within its branch. Choosing 8.3 in the panel isn't enough on its own: your host's build has to include the fix, so check the exact version in Site Health or phpinfo().

Can upgrading PHP break my WordPress site?

It can, mostly through old themes and plugins. WordPress itself runs on current PHP versions. Update everything first, test on a staging copy, and switch back if something fails.

My host doesn't offer a newer PHP version. What now?

Ask when they will, and whether the version you run includes the PHP2Shell fix. If they can't upgrade, moving to a host that offers PHP 8.3 or newer is the usual way out. The hosting provider tracker lists what each host has said.