Preparing your WordPress site for PHP 8.4: a complete checklist
Short answer
To get a WordPress site ready for PHP 8.4: make sure WordPress is 6.7 or later; ask your host whether the extensions your plugins need (IMAP above all) are available on 8.4, and whether you can switch back; back up, ideally on a staging copy; check every plugin and your theme for PHP 8.4 and fix what will break; then switch at a quiet time and watch the error log for a week. PHP 8.4 gets security fixes until 31 December 2028, two years longer than PHP 8.2.
1. Check your WordPress version
The WordPress core team’s compatibility page lists WordPress 6.7 and later as compatible with PHP 8.4. Update WordPress first if you’re on an older version (Dashboard → Updates).
2. Know your dates
PHP 8.4 gets security fixes until 31 December 2028; PHP 8.2 only until 31 December 2026, and 8.3 until 31 December 2027 (php.net). If your host is moving sites off 8.2, going to 8.4 rather than 8.3 buys a year. Which version to choose compares them.
3. Ask your host three questions
- Is PHP 8.4 available, and can I switch back if something goes wrong?
- Are the extensions my plugins use available on 8.4? php.net: IMAP, OCI8, PDO_OCI and PSpell “have been moved to PECL and are no longer part of the PHP distribution” (php.net). A plugin that reads email through IMAP needs it installed separately: IMAP and PHP 8.4.
- Is there a staging copy of my site I can test on?
4. Back up, and use a staging copy
A backup is your safety net; a staging copy lets you switch PHP without visitors seeing anything (staging for a PHP upgrade).
5. Check every plugin and your theme for PHP 8.4
PHP runs every active plugin and your theme, and an inactive plugin as soon as someone activates it. What to look for in the code:
- What stops a page: five MySQLi constants removed in PHP 8.4, and, if your site still runs PHP 7.4 to 8.1, the changes of 8.0 and 8.1 too, such as
create_function()oreach(). - What only adds notices: parameters like
string $note = null,E_STRICT,trigger_error()withE_USER_ERROR, and more (how to fix them).
CompatNav, a free plugin on wordpress.org, does this check on your own server: choose PHP 8.4 next to Check readiness for and start the scan. It reports only what changes between your current version and 8.4, so from PHP 8.3 that’s its 9 checks for 8.4, from 8.2 13 checks, from 7.4 45. The PHP 8.4 compatibility checker explains each.
6. Fix what will break
For each plugin or theme marked “Will break”: update it, ask its developer, or replace it (what to do). Custom code nobody maintains needs a developer: custom plugins and PHP 8. Deprecation notices can wait for the plugins’ next updates.
7. Switch, then watch
- Switch to PHP 8.4 in your hosting panel at a quiet time (where the setting is).
- Test the pages that matter: forms, checkout, login, search, and the admin area.
- Keep a debug log for a week (how): problems that depend on data only show up while the site runs.
- Something broken? Switch back first, then look: how to downgrade PHP.
The checklist
Ready for PHP 8.4
- WordPress is 6.7 or later
- My host offers PHP 8.4, and I can switch back
- The extensions my plugins need (IMAP, OCI8, PDO_OCI, PSpell) are available on 8.4, or not needed
- Backup made; staging copy ready if my host offers one
- Every plugin and the theme checked for PHP 8.4
- Everything marked “Will break” updated, fixed or replaced
- Switched at a quiet time
- Forms, checkout, login, search and admin tested
- Error log watched for a week
To keep it on paper, print this page: the website’s menus are left out.
For a move to any PHP version, the general version of this list: the PHP upgrade checklist.
Key takeaways
- WordPress 6.7 and later are compatible with PHP 8.4; your plugins and theme are the real question.
- PHP 8.4 no longer includes IMAP, OCI8, PDO_OCI and PSpell: ask your host if a plugin needs one.
- In plugin code, one change stops a page (five removed MySQLi constants); the rest are deprecation notices.
- Coming from PHP 8.2, the check must cover 8.3 and 8.4; from 7.4, everything from 8.0 on.
- After switching, test forms, checkout, login and the admin area, and read the error log for a week.
Frequently asked questions
Is PHP 8.4 a good choice for WordPress?
Yes, if your plugins and theme are ready: WordPress 6.7 and later support it, wordpress.org recommends PHP 8.3 or greater, and 8.4 gets security fixes until 31 December 2028.
How long does the preparation take?
The check itself takes minutes. The rest depends on what it finds: nothing, an update to install, or a plugin to replace or have fixed.
Can I go straight from PHP 7.4 to 8.4?
Yes, in one switch, as long as you check for everything that changed in between. A check for 8.4 from a site on 7.4 covers 8.0, 8.1, 8.2, 8.3 and 8.4 together.
Check your own site before you upgrade
CompatNav is a free WordPress plugin. It reads the code of your plugins and themes on your own server and tells you, in plain words, what will break and what will only show notices on the PHP version you choose. It never changes your code. It can’t see problems that only appear while code runs with real data, so a quick check of your site after the upgrade still matters.
Sources
- make.wordpress.org: PHP Compatibility and WordPress Versions
- php.net: Supported Versions
- php.net: Removed extensions in PHP 8.4
About the code examples: each output is the real output of the code shown, run with the official PHP builds, without a php.ini, with all errors reported and displayed. Only the file path was replaced by a neutral server path.