Available for projects & agency overflow · Quick reply, from the person who does the work

Updating PHP under WordPress

Deprecated functions, incompatible plugins, fatal errors: what a PHP version upgrade genuinely breaks on WordPress and WooCommerce, and how to test it before switching.

Describe my issue Send a message

Where WordPress actually stands on PHP

The minimum version technically supported by WordPress core is PHP 7.4, but that version has reached end of life: it hasn’t received a security fix since late November 2022 and shouldn’t be running in production any more. WordPress.org officially recommends PHP 8.3 or higher. On the WooCommerce side, the minimum to function properly is PHP 8.1, with PHP 8.3 also recommended, a memory limit of at least 256 MB, and MySQL 8.0 or MariaDB 10.4 as a minimum (10.6 or higher being preferable).

A site still on PHP 7.4, or an even older version, isn’t just slower: it’s running without security patches on the language itself, a risk distinct from anything related to the WordPress or plugin versions.

Why a PHP upgrade breaks a WordPress site

  • An old plugin calls a PHP function removed in the new version: an immediate fatal error instead of a simple notice
  • Code that tolerated inconsistent data types (a string passed where an integer was expected, for example) throws a fatal error under PHP 8+, where it used to just produce a silent notice
  • A plugin abandoned by its author, never updated in years, that simply was never tested against PHP 8
  • A theme with old bespoke code, written before these functions were deprecated, with no plugin involved at all

How I check a PHP upgrade before switching

  1. Full backup

    Files and database, before touching anything, so I can roll back if needed.

  2. Enabling the compatibility report

    I review the site’s code with WP_DEBUG enabled and a PHP compatibility scanning tool, to spot calls to deprecated or removed functions before changing anything with the host.

  3. Testing on an environment with the target version

    I duplicate the site on an environment configured with the target PHP version and run it under real conditions, never directly on the production server.

  4. Fixing the blocking points

    I fix the bespoke code involved, or replace incompatible abandoned plugins with maintained alternatives.

  5. Switching at the host

    Once testing is conclusive, I change the active PHP version in the hosting configuration, during a low-traffic window, and monitor the site’s behaviour immediately after.

Related pages

Describe your need in one minute

A few targeted questions so I can reply with an estimate rather than another questionnaire.

origine
catalogue
extensions-premium (facultatif)
conserver (facultatif)
Please provide an email or a phone number so I can get back to you.

Please provide an email or a phone number so I can get back to you.

Frequently asked questions

Which PHP version should you target today?
PHP 8.3, recommended by both WordPress.org and WooCommerce. WooCommerce runs from PHP 8.1 onward, but targeting the recommended version directly avoids another upgrade in the short term.
My site still runs on PHP 7.4, should I be worried?
Yes. PHP 7.4 hasn’t received a security fix since late November 2022. This isn’t about performance but about unpatched flaws in the language itself.
How do you know if a plugin will break under PHP 8?
A PHP compatibility scan of the plugin’s code and a real test on an environment configured with the target version remain the two reliable methods: a plugin’s listing rarely states accurate, up-to-date compatibility.
Can you change the PHP version without touching WordPress or WooCommerce?
Yes, the PHP version is changed on the hosting side, independently of the installed WordPress or WooCommerce versions. That’s exactly why it can break things with no obvious link to a plugin update.
What happens if an abandoned plugin breaks after the upgrade?
I replace the plugin with a maintained alternative offering equivalent functionality, or rebuild the feature as bespoke code if no reliable alternative exists.