Back to Blog
Engineering22 October 20264 min read · 906 words

How to Update PHP in WordPress Without Breaking Your Store

N7

No7 Engineering Team

Growth Architecture Unit

Engineering: How to Update PHP in WordPress Without Breaking Your Store (illustration)

Updating PHP in WordPress means switching the PHP version your server runs, because WordPress itself cannot change it. You do it in your hosting control panel or on the server, after a backup and a compatibility check. WordPress recommends PHP 8.3 or higher, and after the PHP2Shell vulnerabilities, fixed in the 21 October 2026 releases, every store needs at least 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or on 8.1 and older a backport plus a move to a supported branch.

How to check your PHP version in WordPress

In the WordPress dashboard, open Tools, then Site Health, then the Info tab, and expand the Server section. The PHP version line shows the version WordPress is actually running. When the version is out of date, WordPress may show a "PHP Update Required" or "PHP Update Recommended" notice on the dashboard or in Site Health. On a server you manage, php -v shows the command-line version, which can differ from the version the website uses.

Which PHP version should a WordPress or WooCommerce store run?

WordPress's requirements recommend PHP 8.3 or greater, while WordPress still works on PHP 7.4 and above in legacy environments. WooCommerce's server requirements also recommend PHP 8.3 or greater and say it is tested up to PHP 8.4.

PHP versionStatus in October 2026Good choice for a WooCommerce store?
8.5Security support until 31 Dec 2029Only after checking that WooCommerce and every extension support it; WooCommerce lists testing up to 8.4
8.4Security support until 31 Dec 2028Yes, the newest version WooCommerce says it is tested on
8.3Security support until 31 Dec 2027Yes, the version WordPress and WooCommerce recommend as a minimum
8.2Security support until 31 Dec 2026Only short term, support ends in December
8.1 and olderEnd of lifeNo, no upstream security fixes

For most WooCommerce stores, PHP 8.3 or 8.4 is the right call in late 2026. Either one gets security fixes into 2027 and sits inside WooCommerce's tested range. See our PHP end of life dates and supported versions guide for the full table.

Before you update PHP in WordPress

WordPress's own Update PHP guide sets out the preparation. Do these steps first, in this order:

  1. Take a full backup. Back up files and the database, so you can restore the site if something breaks. To roll back fully you also need your host to switch PHP back to the old version.
  2. Update WordPress, themes and plugins. Use Dashboard, then Updates, and check the site still works before you change PHP.
  3. Check plugin and theme compatibility. WordPress suggests the PHP Compatibility Checker plugin, and notes it can miss issues or flag false positives. For a WooCommerce store, test the checkout, payment gateway and shipping extensions on a staging copy as well.
  4. Fix or replace what fails. Ask the plugin or theme developer for a fix, or replace the plugin with one that supports the new PHP version.

Start with a staging copy rather than the live store. For WooCommerce stores moving from an old PHP branch, our WooCommerce PHP compatibility guide covers extension testing in detail.

How to update PHP in WordPress, step by step

PHP runs on the server, so the update happens in your hosting account or on the server itself. The method depends on the type of hosting.

  • Shared hosting with cPanel. cPanel's MultiPHP Manager lets you set the PHP version for each domain. Your host can switch this interface off, so if you do not see it, ask the host.
  • Managed WordPress hosting. Many managed hosts have a PHP version setting in their own dashboard. If you cannot find it, WordPress suggests emailing the host; ask them to move the site to PHP 8.3 or 8.4.
  • A VPS or dedicated server. Install the new PHP version with the same extensions as the old one, including mysqli, point the web server or PHP-FPM pool at it, and restart PHP-FPM or the web server. Keep the old version installed until the site is confirmed working.
  • Docker. Change the PHP base image tag, rebuild the image with the same extensions, and redeploy every container.

After the switch, check Site Health again to confirm the new version, then click through the site. On a WooCommerce store, place a test order end to end and watch the PHP error log for a few hours.

Common errors after a PHP update

One error you may see is "Your PHP installation appears to be missing the MySQL extension which is required by WordPress." It means the new PHP version does not have the mysqli extension enabled; our missing MySQL extension fix walks through it. If you roll back to an older PHP version, or update WordPress on an old one, core can stop with a message that the server is running a PHP version below the minimum that WordPress release requires. A white screen or a critical error often points to a plugin or theme that does not support the new version; switch back, then fix or replace it on staging.

What to do next

Check your PHP version in Site Health today. If it is below 8.3, or older than the PHP2Shell fixes (8.5.12, 8.4.27, 8.3.36 or 8.2.35), plan the update this week: backup, compatibility check, staging test, then the live switch. If you want the PHP upgrade and the WooCommerce regression testing done for you, our WooCommerce development team can take it on.

Frequently Asked Questions

The questions buyers and engineers ask us most about this topic.

How do I update PHP in WordPress?

Back up the site, update WordPress, themes and plugins, check compatibility on staging, then change the PHP version in your hosting control panel, such as cPanel's MultiPHP Manager, or ask your host. Confirm the new version in Site Health afterwards.

Which PHP version should I use for WordPress?

WordPress recommends PHP 8.3 or higher. For WooCommerce stores, 8.3 or 8.4 is the safest choice in late 2026, because WooCommerce recommends 8.3 or greater and says it is tested up to 8.4.

Can updating PHP break my WordPress site?

It can if a theme or plugin does not support the new version. WordPress itself works on PHP 7.4 and above, so test plugins and the theme on a staging copy first and keep a backup and the old PHP version available for a rollback.