If your WordPress site still runs PHP 7.4, you're on a version that stopped getting security fixes in November 2022. That means any bug found since then stays open on your server. The fix is to move to PHP 8.1 or newer, and you can do it yourself in an afternoon by staging a copy of your site, testing it, then cutting over with a way to roll back if anything looks off.
The part that scares most people — "will it break my site?" — is the part you can control. You never touch the live site until the copy passes its tests. Below is the exact order of operations, the tools that tell you what will break before it breaks, and how to back out in one click if you need to.
A recent WP Tavern podcast put this back on the radar, and it's worth taking seriously. Old PHP isn't a slow-burning "someday" problem — it's an open door that's already unlocked.
Why staying on PHP 7.4 is a real risk, not a nag
Running end-of-life PHP means your site sits on code that no longer receives security patches, so known vulnerabilities never get closed.
When PHP reaches end of life, the maintainers stop shipping fixes entirely. Vulnerabilities discovered afterwards are documented publicly — attackers read those disclosures too — but there's no official patch coming. Your host may backport a few critical fixes, but that's a stopgap, not a substitute for a supported version. You're relying on the gaps not being found by the wrong person.
There's an upside beyond safety. PHP 8.x is meaningfully faster than 7.4 for typical WordPress workloads, thanks to the JIT compiler and general engine improvements. Real-world WordPress benchmarks routinely show 8.1 handling more requests per second than 7.4 on the same hardware. So this isn't only about closing holes — pages render quicker and your server does more with the same resources.
Check plugin and theme compatibility first
Before you change anything, run a compatibility scan so you know which plugins or theme functions will throw errors on PHP 8.x.
PHP 8 removed and changed things that older code leaned on. The usual culprits are abandoned plugins, custom snippets a previous developer left behind, and themes that haven't been updated in years. You want that list in front of you before you flip the switch, not after.
Two practical ways to find trouble:
- PHP Compatibility Checker (WPEngine) — a free plugin that scans your installed code against a target PHP version and flags incompatible files. Treat it as a first pass, not gospel; it produces false positives, but a clean-ish report is reassuring.
- Enable error logging on your staging copy — this is the honest test. Add define('WP_DEBUG', true); and define('WP_DEBUG_LOG', true); to wp-config.php, then click through your site. Real fatal errors land in wp-content/debug.log with the exact file and line.
While you're here, do the boring housekeeping. Update every plugin and theme to its current version, delete anything you no longer use, and check each remaining plugin's page on WordPress.org for its "Tested up to" PHP note. A plugin last updated in 2019 is your biggest red flag — budget time to replace it.
Stage a test copy — never test on the live site
Create a full staging clone of your site, switch that copy to PHP 8.x, and do all your testing there while the live site keeps running on 7.4.
Staging is the whole trick. It's an exact duplicate — same plugins, same theme, same content — on a separate URL, so you can break things freely without a single visitor noticing. Most decent hosts give you a one-click staging button. On TPC Hosting you can spin up a staging copy from the control panel, and if a migration is what's holding you back, our engineers handle the move for free, so you're not doing the risky part alone.
Here's the sequence on the staging copy:
- Clone the live site to staging.
- Switch only the staging copy to PHP 8.1 (or 8.2) in your host's PHP selector.
- Turn on WP_DEBUG_LOG and visit key pages: home, a blog post, an archive, your contact form, and — if you sell things — the cart and checkout flow end to end.
- Log in to wp-admin and open every plugin settings screen. Admin-side fatals are common and easy to miss from the front end.
- Read debug.log. Fix or replace anything that throws a fatal error. Deprecation notices are fine for now; fatals are not.
If a plugin causes a fatal error and there's no update, you have three choices: find a maintained replacement, pay a developer for a small patch, or drop the feature. Be honest about which plugins actually earn their place.
Cut over to PHP 8.x with a rollback plan
Once staging is clean, take a fresh backup, switch the live site's PHP version, and keep the option to revert to 7.4 in the same panel if something surprises you.
The reason people fear this step is they imagine it's permanent. It isn't. Changing PHP versions is a setting, not a one-way migration — you can switch back in seconds from the same dropdown you used to switch forward. That's your instant rollback for anything the staging test didn't catch.
The cut-over, in order:
- Take a full backup of the live site (files and database) immediately before you change anything.
- Change the live PHP version to match what you tested on staging.
- Clear all caches — page cache, object cache, and your CDN if you use one.
- Walk the same checklist you used on staging: front end, admin, forms, checkout.
- Watch your error log and, if you have it, uptime monitoring for the next hour.
Pick a quiet window — early morning or a weekend for most SMBs — so a hiccup affects the fewest people. If something breaks and you can't fix it in five minutes, flip PHP back to 7.4, restore the backup if needed, and regroup on staging. No drama, no lost sleep.
Which PHP version should you actually pick?
Target PHP 8.1 or 8.2 — both are widely supported by WordPress and its ecosystem, and they'll receive security fixes for years yet.
Resist jumping to the absolute newest release the day it lands. The very latest version sometimes runs ahead of plugin support, which reintroduces the compatibility problems you're trying to escape. A version that's been out for a while hits the sweet spot: supported, patched, and thoroughly tested by the plugin authors you depend on.
| PHP version | Status | Good choice for you? |
|---|---|---|
| 7.4 | End of life | No — move off it now |
| 8.0 | End of life | No — already unsupported |
| 8.1 | Security support | Yes — safe, well-tested |
| 8.2 | Active/security support | Yes — the sensible default |
| 8.3 | Active support | Fine if your plugins are current |
Whatever you pick, put a reminder in your calendar to review PHP every 12 months. Versions age out on a schedule, so a yearly check keeps you from waking up on an unsupported version again.
A quick pre-flight checklist
Before you touch the live PHP setting, tick off these six things.
- Every plugin and theme updated to its latest version
- Unused plugins and themes deleted
- Compatibility scan run and log reviewed on staging
- Staging copy tested on PHP 8.1/8.2 with WP_DEBUG_LOG on
- Fresh full backup taken minutes before cut-over
- You know exactly where the "switch back to 7.4" button is
Do those in order and the upgrade stops being a gamble. It becomes a routine bit of maintenance you'll barely remember doing.
If you'd rather not go it alone, TPC Hosting keeps real engineers on support around the clock, our servers are EU-hosted and GDPR-friendly, and you've got 30 days to back out. We're happy to check your compatibility report or run the cut-over with you.
FAQ
Will upgrading to PHP 8.x break my WordPress site?
Not if you test on a staging copy first. Clone your site, switch only that copy to PHP 8.x, click through your key pages while error logging is on, and fix any fatal errors before touching the live site. The live upgrade itself is just a setting you can reverse in seconds.
How do I know which plugins won't work on PHP 8?
Run a compatibility scan and read your debug log on a staging copy. The free PHP Compatibility Checker plugin flags likely problems, but enabling WP_DEBUG_LOG and browsing the site is the real test — it records the exact file and line of any fatal error. Plugins that haven't been updated in a few years are the usual troublemakers.
Can I roll back if PHP 8 causes a problem?
Yes, in seconds. PHP version is a setting in your host's control panel, so you can switch straight back to 7.4 from the same dropdown. Take a full backup right before the cut-over as well, so you can restore files and database if you ever need to.
Which PHP version should I upgrade to?
Choose PHP 8.1 or 8.2. Both are well supported across WordPress and its plugin ecosystem and will get security fixes for years. Avoid jumping to the newest release the day it launches, since plugin support sometimes lags behind.
How long does the whole migration take?
For a typical small business site, an afternoon. Most of the time goes into updating plugins, testing on staging, and reading logs; the actual cut-over takes a few minutes. If a broken plugin needs replacing, allow extra time to find and configure an alternative.

