PHP 8.4 Migration: What Breaks in Older WordPress Sites

WordPress core has been fully compatible with PHP 8.4 since 6.8 — what breaks is plugin and theme code. Here is which changes are fatal, which are only log noise, how to scan a site before you switch, and why PHP 8.5 is often the better target.

By.

•

min read

A stack of pale rounded slabs with one slab pulled out of the middle and an amber slab hovering above the empty gap, ready to drop in.

PHP version swap illustrated as a stack of slabs with one being replaced

WordPress core is not what breaks when you move an older site to PHP 8.4. Core has been documented as fully compatible since WordPress 6.8. What breaks is plugins, themes and whatever custom code someone added to functions.php four years ago — and most of what fills the error log afterwards is deprecation notices, not fatal errors.

Three things cause genuine downtime: PHP extensions that left core in 8.4 and are no longer on your server, changes that now throw errors where they used to fail silently, and code that was already broken on PHP 8.0–8.3 but never tested because the site sat on 8.1 for years.

There is also a timing question most upgrade guides skip. PHP 8.4 was released on 21 November 2024 and its active support ends on 31 December 2026 — about a month from now. If you are planning a migration today, 8.4 is not the end of the road, and for many sites it is the wrong target.

Is WordPress compatible with PHP 8.4?

Yes, and the documentation is unusually clear now. WordPress used to label new PHP support “beta support” or “compatible with exceptions” — hedges that led plenty of hosts and owners to stay put. Both have been retired and removed retroactively from every version: “compatible with exceptions” in April 2025, “beta” in May 2026. The Core team’s reason was that the 8.x releases have been stable enough that the compatibility work is now small, and the labels caused more hesitation than they prevented.

Per the Core handbook’s compatibility reference, last updated 4 November 2026:

  • WordPress 6.8 and later fully support PHP 8.4.
  • WordPress 6.9 and later fully support PHP 8.5.
  • The minimum supported PHP version is 7.4, raised from 7.2.24 in WordPress 7.0.
  • The minimum recommended PHP version is 8.3.

That is the easy half of the question. The useful half is whether your particular set of 30 plugins is compatible, and no table on wordpress.org answers that.

Should you upgrade to PHP 8.4 or go straight to PHP 8.5?

Each PHP branch gets roughly two years of active support (bug and security fixes), then two years of security-only support. Where the branches stand today:

PHP branchReleasedActive support untilSecurity support untilStatus today
8.28 Dec 202231 Dec 202431 Dec 2026Security fixes only; EOL next month
8.323 Nov 202331 Dec 202531 Dec 2027Security fixes only
8.421 Nov 202431 Dec 202631 Dec 2028Active support ends next month
8.520 Nov 202531 Dec 202731 Dec 2029Active
8.619 Nov 202631 Dec 202831 Dec 2030Active, just released

Read that as someone currently on 8.1 or 8.2. Moving to 8.4 buys a branch that leaves active support in about a month, with security patches to the end of 2028. Moving to 8.5 buys active support through 2027 and patches through 2029 — a full year more on both, for the same effort, because the testing work is dominated by the jump out of 8.1/8.2, not by the gap between 8.4 and 8.5.

The honest trade-off: 8.4 has had two years of plugin authors fixing things against it, so you will hit fewer surprises. 8.5 has had one. If your stack is mainstream — current WooCommerce, maintained plugins, a theme that still gets updates — test against 8.5 and fall back to 8.4 only if something concrete fails. If the site carries abandoned plugins or a bespoke theme nobody has touched since 2021, 8.4 is a defensible stop, but put the 8.5 move in next year’s plan rather than calling it done. PHP 8.6 shipped eight days ago; nothing on a client site should be running it yet.

What actually breaks on PHP 8.4: fatal errors vs deprecation notices

This distinction decides whether your afternoon is ruined. A deprecation notice writes a line to the log and the page still renders; a fatal error gives you a white screen. Treating both as emergencies is why PHP upgrades get abandoned halfway.

Change in PHP 8.4SeverityWhat you see
Implicitly nullable parameter types deprecatedNoticeLog fills with “Implicitly marking parameter $x as nullable is deprecated”; site works
imap, pspell, oci8, pdo_oci moved out of core to PECLFatal“Call to undefined function imap_open()” — plugin dies outright
round() with an invalid rounding modeFatalThrows ValueError instead of silently using PHP_ROUND_HALF_UP
E_STRICT constant deprecated; E_ALL changes from 32767 to 30719NoticeError-reporting lines in wp-config.php emit notices
session_set_save_handler() with more than two argumentsNoticeDeprecation; removed in PHP 9.0, where it will throw a TypeError
CSV functions require the $escape argumentNoticeImporters and exporters log a deprecation on every row
Default bcrypt cost raised from 10 to 12BehaviourLogins get measurably slower; nothing errors
OpenSSL now requires 1.1.1+; libcurl now requires 7.61.0+Server-sideA host problem, but it blocks the upgrade on old servers

Two items account for most real incidents. First, the extension removals: if a plugin handles email over IMAP — helpdesks, ticketing systems, some order importers — and your host did not install the PECL package when they moved you to 8.4, it is dead on arrival with a fatal error. Ask your host whether imap is on their 8.4 image before you switch, not after.

Second, round(), which hides well. Invalid rounding modes used to be ignored silently, so buggy code produced correct-looking numbers for years; on 8.4 the same call throws a ValueError. In WooCommerce this surfaces in tax or shipping calculations — code that runs at checkout, not on the homepage, so a casual click-through on staging will not find it.

The deprecation that floods your error log

If you see thousands of log lines within minutes of switching, this is almost certainly why. PHP 8.4 deprecates implicitly nullable parameter types:

// Deprecated in PHP 8.4
function dw_get_items( array $args = null ) {}

// Correct
function dw_get_items( ?array $args = null ) {}

// Also correct (PHP 8.0+)
function dw_get_items( array|null $args = null ) {}

The notice reads Implicitly marking parameter $args as nullable is deprecated, the explicit nullable type must be used instead. The detail that matters: it fires when PHP parses the declaration, not when the function is called. Every load of a file containing such a signature emits it, whether or not the function runs — so one old plugin with fifty such signatures writes fifty lines per page load.

Nothing is broken. But a log growing at that rate fills a shared-hosting disk quota in a day or two, and a full disk will take the site down. If you cannot patch the plugin immediately, suppress deprecations in wp-config.php while you work through them:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
error_reporting( E_ALL & ~E_DEPRECATED );

That is a holding measure, not a fix: everything deprecated in 8.4 is scheduled for removal in PHP 9.0, where today’s notices become fatal errors.

One correction, because several upgrade guides get it wrong: the “Creation of dynamic property is deprecated” notices that appear alongside these are a PHP 8.2 change, not an 8.4 one. Coming from 8.1, you meet 8.2’s and 8.3’s deprecations at the same time as 8.4’s. Budget for the cumulative set, not the headline version.

Slow logins after the upgrade are not a bug

PHP 8.4 raised the default bcrypt cost from 10 to 12. Each increment doubles the hashing work, so the default is now roughly four times as expensive. That is deliberate — it is the point of a work factor — but it shows on login-heavy sites: memberships, LMS platforms, stores with account-based checkout. Existing hashes keep working and are re-hashed at the new cost on next successful login. If logins feel slower after an upgrade, check this first; the fix is capacity, not a config rollback.

How to check PHP 8.4 compatibility before you switch

Static analysis catches most of this before you touch production. The tool is PHP_CodeSniffer with the PHPCompatibilityWP ruleset — PHPCompatibility pre-configured to ignore the polyfills WordPress core already provides. Install it alongside a copy of the site’s code:

composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer require --dev phpcompatibility/phpcompatibility-wp:"^3.0@dev"

# confirm the standards registered
vendor/bin/phpcs -i

Then scan, naming your target version. A trailing hyphen means “this version and above”:

# everything that breaks on 8.4 or later
vendor/bin/phpcs -p . --standard=PHPCompatibilityWP \
  --extensions=php --runtime-set testVersion 8.4-

# scan one plugin and save the report
vendor/bin/phpcs -p wp-content/plugins/some-plugin \
  --standard=PHPCompatibilityWP --extensions=php \
  --runtime-set testVersion 8.4- --report-full=php84-report.txt

Run it against wp-content/plugins, wp-content/themes and any mu-plugins. Skip core — core is fine, and scanning it buries real findings in noise. Note the project’s own caveat: its coverage is ongoing and is not claimed to be complete.

Two checks the sniffs miss:

  • Each plugin’s declared minimum. The Requires PHP header in a plugin’s readme says what the author supports; “Tested up to” refers to the WordPress version and says nothing about PHP.
  • Which extensions your host loads on 8.4. Compare php -m on the target version against the current one. This is how you catch a missing imap before a user does.

When a scan flags a plugin you depend on and the author has gone quiet, the decision stops being technical and starts being commercial. Send us the scan report and we will tell you what can be patched, what needs replacing and what it costs — faster than a week spent on an abandoned plugin’s support forum.

What the scan will not catch

Static analysis reads code; it does not run it. The failures it misses need traffic to surface: the round() call in a tax rule that fires for one shipping zone, a payment gateway’s API handshake, a cron job that runs on the first of the month. Those need a staging copy with real data and a deliberate pass through checkout, registration, search and whatever custom flow the site earns money from — and most staging setups are not faithful enough to catch them, for reasons we went through here.

One more trap: WP-CLI and cron jobs run against the CLI PHP binary, often a different version from the one serving web requests, and a control-panel switch frequently changes only the web-facing one. Run php -v over SSH and compare it with WordPress’s Site Health screen. If they differ, you have tested half the site.

Rolling back is not just flipping the version back

Every upgrade guide says rollback takes under a minute: switch the PHP version back in your control panel. True, and the most misleading sentence in the genre.

By the time you switch PHP, you have usually updated core, every plugin and the theme, because that is step one of any sane migration — and those updates ran database migrations. Reverting the PHP version reverts none of them. If the breakage turns out to be a plugin update rather than PHP itself, the downgrade changes nothing and you need the database backup.

So the real rollback plan has two tiers: flip PHP back if the symptom is clearly a PHP-level fatal error, restore the full backup if it is not. That second tier only exists if someone has actually tested a restore — which, in our experience auditing sites, is where most “we have backups” stories fall apart. Test the restore before the migration, not during it.

A migration order that works

  1. Record the current state: php -v for web and CLI, php -m, WordPress version, plugin list with versions.
  2. Take a full backup and restore it somewhere to prove it works.
  3. Update core, plugins and theme on staging first — most PHP 8.4 fixes ship as plugin updates, so this alone clears a large share of findings. Updates break things in their own ways, so keep this separate from the PHP switch, with its own verification.
  4. Run the scan against testVersion 8.4- (or 8.5-) and triage findings into fatal and notice.
  5. Confirm with your host which extensions exist on the target version.
  6. Switch staging over. Keep WP_DEBUG_LOG on and watch it while clicking through checkout, login, search, admin and any custom flow. Trigger scheduled tasks manually rather than waiting.
  7. Switch production during low traffic, leave staging intact for a week, and watch the log for a full business cycle — the monthly cron is what bites.

For ten mainstream plugins and a maintained theme, this is an afternoon. For a ten-year-old site with a custom theme, a defunct page builder and three plugins last updated in 2019, it is a project — and the scan report tells you which one you have before you commit to a date. That inventory belongs in routine maintenance, not under deadline pressure, which is why it sits in the checklist we run on client sites.

If you are still on PHP 8.1 or 8.2, the deadline is real: 8.1 is already end of life and 8.2 reaches it on 31 December 2026. Hosts will start forcing the move, and a forced upgrade on your host’s schedule is how sites break at the worst possible moment. We run PHP migrations as fixed-scope work — scan, triage, staging test, switch, and a week of monitoring afterwards. Tell us the version you are on and what the site does, and we will tell you whether it is an afternoon or a project.