Web Development
The "critical error on this website" message after a PHP update, and how to recover
Quick answer: If your WordPress site shows “There has been a critical error on this website” right after a PHP version change, it almost always means a plugin, theme or piece of custom code isn’t compatible with the new PHP version. The fastest way back online is to roll the PHP version back to the previous one in your hosting panel — that’s a stop-gap, not a fix. Then check the WordPress recovery-mode email, turn on error logging to a file, find the culprit, update or replace it, and try the upgrade again. Your content and orders are almost certainly fine; this is a code-compatibility problem, not data loss.
Seeing that message is alarming, especially if it’s your storefront. Take a breath: in the great majority of cases nothing has been lost, and the site can be back up in minutes. Here’s what’s happening and how to recover without making it worse.
What the message actually means
“There has been a critical error on this website” is WordPress’s polite way of saying “some code tried to run and crashed, so I’ve stopped to protect you.” When it appears straight after a PHP upgrade, the cause is nearly always the same: newer PHP removed or tightened something that older code relied on. A plugin or theme that hasn’t been updated to keep pace hits that change and errors out. (It’s the same root cause behind a lot of integration failures in production — code quietly depending on behaviour that changed underneath it.)
The important reassurance: this is a compatibility problem, not a data problem. Your posts, pages, customers and orders live in the database and aren’t touched by a PHP version change.
Step 1: Get back online fast — roll the PHP version back
If the site is down and you need it up now, the quickest fix is to switch the PHP version back to the one it was on before, in your hosting control panel (cPanel’s “Select PHP Version”, or your managed host’s equivalent). The site should return immediately.
Be clear with yourself about what this is: a stop-gap. You’ve bought time, not solved anything. The old version is still ageing out of security support, so the real job — fixing the incompatible code and upgrading properly — still needs doing. But there’s no shame in getting the site up first and fixing calmly second.
Step 2: Check the recovery-mode email
Modern WordPress emails the site administrator when a critical error happens. The subject line mentions “Your Site is Experiencing a Technical Issue,” and crucially it contains:
- a recovery-mode link that lets you log in to the admin even while the front end is broken, and
- often a specific line naming which plugin or theme caused the error.
Check the inbox for the site’s admin email address first — it frequently points you straight at the culprit.
Step 3: Turn on error logging — to a file, not the screen
If the email didn’t pinpoint it, enable WordPress debug logging so the error gets written to a log file you can read, rather than displayed on the public site. (Showing errors on screen can leak server paths and details to visitors, so log to a file instead.) The log will usually name the exact plugin and line that failed. If you’re not comfortable editing configuration files, this is a sensible point to hand it to a developer.
Step 4: Fix forward
Once you know the offender:
- Update it. A maintained plugin or theme usually has a newer, PHP-compatible version.
- Replace it if it’s abandoned. Holding your whole site on an unsupported PHP version to keep one dead plugin alive is a bad trade.
- Re-test on staging, then re-attempt the upgrade properly — the careful, tested way we describe in upgrading PHP without breaking your site.
And if you’re not even sure what version you were on or should move to, start with how to check your PHP version.
When to call someone
Reading error logs, editing config, and judging whether a plugin is salvageable or should be swapped out is squarely developer territory — and if the site is a live store losing orders, speed matters more than DIY pride. If you’d like it sorted quickly and properly, get in touch and tell us it’s urgent — a “critical error after a PHP update” is a well-worn path and usually a quick fix in experienced hands.
Common questions
Did I lose my data when I got the critical error? Almost certainly not. A PHP version change is a code-compatibility issue; your content, customers and orders are stored in the database and aren’t affected. The site needs the faulty code fixed, not the data recovered.
How do I get into wp-admin when the site shows a critical error? Check the site administrator’s email for WordPress’s “recovery mode” message — it contains a link that logs you in even while the front end is down, and often names the plugin or theme at fault.
Should I just roll the PHP version back and leave it? Rolling back gets you online immediately, but it’s a stop-gap. The old version keeps ageing out of security support, so plan to fix the incompatible plugin or theme and upgrade properly once the pressure is off.
Why did updating PHP break my site when nothing else changed? Newer PHP versions remove or tighten features that older plugins, themes or custom code may still depend on. Well-maintained code has already adapted; abandoned code hasn’t, and that’s what trips the error.
About the author
Andrew Roper
Founder and technical director of Advantage Digital, an Adelaide-based technical studio. 22+ years of practice building production software for institutional, premium, and growth-stage businesses across Australia, the UK, Europe and South Africa. Writes from the studio’s direct integration, custom application, and AI automation work.
More reading
How to check which PHP version your website is running
A non-technical, two-minute guide to finding your website's PHP version — in WordPress, in your hosting panel, or by asking the right person — and knowing whether it's still supported.
Custom SoftwareRunning an older Laravel app? PHP support, Laravel end of life and your upgrade path
Laravel ties its supported PHP versions to the framework version, so an old Laravel app can be squeezed by PHP's own deadlines. Here is the support picture and how to plan the move.
Web DevelopmentPHP 8.2 support ends 31 December 2026: what it means for your WordPress or Laravel site
PHP 8.2 reaches end of life on 31 December 2026, and some hosts are removing it earlier. Here is who it affects, the Laravel trap to watch for, and how to plan the move.