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.
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
-
Full backup
Files and database, before touching anything, so I can roll back if needed.
-
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.
-
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.
-
Fixing the blocking points
I fix the bespoke code involved, or replace incompatible abandoned plugins with maintained alternatives.
-
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
-
What to do when a version reaches end of support
PHP 7.4 hasn’t had a security fix since late 2022: what that means for a site still running it.
-
Checking plugin compatibility before an update
The method to know whether a theme or plugin will survive the move to the new version, before clicking "update".
-
Enabling WordPress debug mode
How to enable WP_DEBUG properly so errors and notices surface without exposing them to visitors.
-
Choosing e-commerce hosting
What actually matters when choosing a host for a WooCommerce shop, beyond the advertised price.
Describe your need in one minute
A few targeted questions so I can reply with an estimate rather than another questionnaire.