How to Fix “There Has Been a Critical Error on This Website” in WordPress
A 9-step triage order that works even when you’re locked out of wp-admin.
⚡ The Short Answer
That message means WordPress caught a PHP fatal error, most often inside a plugin or theme. The fastest fix: open the email titled “Your Site is Experiencing a Technical Issue,” click its recovery link, and deactivate the plugin or theme it names.
No email? Rename the plugin’s folder (or the whole wp-content/plugins folder) in File Manager or FTP. If the site loads, a plugin was the cause. If not, do the same with your theme, then read wp-content/debug.log for the exact file and line.
Already fixed it? Soro automates keyword research, article writing and publishing to WordPress, so the next outage doesn’t stall your content.
Try Soro SEO →What the Critical Error Message Actually Means
WordPress added fatal error protection in version 5.2. When a plugin or theme throws a PHP fatal error, WordPress catches it, shows visitors this message, and emails the site admin a recovery link.
Because the message comes from WordPress itself, you already know something useful. PHP is running, and WordPress loaded far enough to catch the crash. A dead server or a broken database connection shows a different message.
| What you see | Usual cause | Where to go |
|---|---|---|
| “There has been a critical error on this website” | PHP fatal error in a plugin, theme or, rarely, core | Steps 1 to 8 |
| Blank white page, no message | Fatal error before WordPress’s handler could run, or a custom handler replaced it | Step 2 |
| “Allowed memory size of … bytes exhausted” | PHP ran out of memory | Step 6 |
| “Briefly unavailable for scheduled maintenance” | Leftover .maintenance file after an interrupted update | Step 8 |
| “Error establishing a database connection” | Wrong database credentials, or the database server is down | Other errors |
| “500 Internal Server Error” | Server-level problem, such as a bad .htaccess rule | Other errors |
The Fix Order I Follow
The steps run from fastest and safest to slowest and most invasive. Stop the moment your site comes back.
Use the Recovery Mode email
WordPress sends it to the address in Settings → General, or to the RECOVERY_MODE_EMAIL constant if a developer set one. The subject reads “[Your Site] Your Site is Experiencing a Technical Issue.” Check spam.
The email names the plugin or theme that crashed and includes a login link for Recovery Mode. By default that link stays valid for one day, and WordPress won’t send a fresh one until that window passes.
Heads up: Recovery Mode pauses the broken plugin or theme for your session only. Visitors still see the error until you deactivate or replace it from the Plugins or Themes screen.
No email? That’s common. Many hosts throttle PHP mail, and the message goes to whatever admin address was set up long ago. Don’t wait on it. Move to Step 2.
Turn on the debug log and read the real error
The browser tells you nothing. The log tells you everything. Open wp-config.php and add these lines above the comment that says “That’s all, stop editing!”
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Reload the broken page once, then open /wp-content/debug.log and search for “Fatal error.” The folder name after /plugins/ or /themes/ is your culprit. A line looks like this (illustrative example):
PHP Fatal error: Uncaught Error: Call to undefined function
example_helper() in /home/site/public_html/wp-content/
plugins/example-plugin/includes/loader.php:48
Here the culprit is example-plugin. That’s the folder to disable in Step 3.
Clean up afterward: delete debug.log and set WP_DEBUG back to false. On many servers anyone who guesses the URL can open that file, and it exposes server paths.
Can’t edit wp-config.php? Check your host’s PHP error log instead. In cPanel it’s under Metrics → Errors.
Disable the plugin causing the crash
If the log named a plugin, rename only that folder inside wp-content/plugins, for example example-plugin to example-plugin-off. If the log was no help, rename the whole plugins folder to plugins-off.
Reload the site. If it loads, log in to wp-admin. WordPress marks every plugin it can’t find as inactive. Rename the folder back to plugins, then reactivate plugins one at a time, reloading after each. Renaming the folder back does not reactivate anything.
Still broken with every plugin disabled? Check two more places:
- wp-content/mu-plugins: must-use plugins load automatically and never show a Deactivate link. Rename the folder to test.
- object-cache.php and advanced-cache.php in
wp-content: drop-ins left behind by a caching plugin you removed can crash the site. Rename them to test.
With SSH access, wp plugin deactivate --all --skip-plugins --skip-themes does it in one line. The skip flags stop WP-CLI from tripping over the same fatal error.
Switch to a default theme
Rename the active theme’s folder inside wp-content/themes. WordPress then falls back to a default theme, but only if one is installed. If you deleted every “Twenty” theme, upload a fresh one from wordpress.org/themes first, or you’ll swap one error for another.
Also undo your most recent edit to functions.php. One missing semicolon in a pasted snippet is a classic way to take a site down.
Via WP-CLI: run wp theme list, then wp theme activate your-default-theme-slug.
Check your PHP version
Two things trigger this: your host changes the PHP version, or a plugin update raises its minimum PHP requirement. Either way, the plugin and PHP stop agreeing.
WordPress 7.0 raised the minimum PHP version from 7.2.24 to 7.4. WordPress’s recommended version is PHP 8.3 or higher. Here is where each branch stands today:
| PHP | Status (Oct 2026) | Verdict |
|---|---|---|
| 7.4, 8.0 | End of life (7.4 since Nov 28, 2022) | Upgrade now |
| 8.1 | End of life since Dec 31, 2025 | Upgrade now |
| 8.2 | Security fixes only, ends Dec 31, 2026 | Plan the move |
| 8.3 | Security fixes until Dec 31, 2027 | Safe default |
| 8.4 | Active support until Dec 31, 2026, security until Dec 31, 2028 | Good |
| 8.5 | Released Nov 20, 2025, active until Dec 31, 2027 | Test first |
To change versions, use MultiPHP Manager in cPanel, the PHP settings in Plesk, or the PHP tools in your managed host’s dashboard. If the crash began right after a PHP switch, set the previous version back first, get the site up, then update the plugin that needs the newer one.
My pick: PHP 8.3 as the safe default, and 8.4 once every plugin you run lists support for it. Test on staging before touching production.
Site back online? Keep it earning. Soro handles keyword research, drafting and WordPress publishing on autopilot.
See how Soro works →Raise the memory limit (only if the log says so)
Memory is the cause when the log shows “Allowed memory size of 41943040 bytes exhausted.” That number is exactly 40 MB, which is WordPress’s default WP_MEMORY_LIMIT on a single site (64 MB on multisite). The admin side gets a separate ceiling, WP_MAX_MEMORY_LIMIT, which defaults to 256 MB.
Add this above the “stop editing” line in wp-config.php:
define( 'WP_MEMORY_LIMIT', '256M' );
256M is plenty for most sites. Going to 512M rarely helps and can hide a plugin that’s leaking memory.
Both constants are requests, not guarantees. If your host caps PHP’s own memory_limit lower, nothing changes. Raise it in the hosting panel’s PHP settings or ask support.
Replace corrupted WordPress core files
Suspect this when the log points at files inside wp-admin or wp-includes. With SSH, check first:
wp core verify-checksums
wp core download --force --skip-content
The second command re-downloads core files and leaves wp-content alone. No SSH? Download WordPress from wordpress.org, then upload fresh copies of wp-admin, wp-includes and the root PHP files. Never overwrite wp-content or wp-config.php. Those hold your plugins, themes, uploads and database credentials.
Unfamiliar files in uploads or failed checksums on files you never touched point to a compromise, not a bad update. Treat that as a security incident.
Clear leftovers from a failed update
- Delete the
.maintenancefile in the site root. It’s hidden, so enable “Show Hidden Files” in File Manager. - If a plugin folder is empty or half-written, delete it and reinstall a fresh copy.
- Check your hosting panel’s disk usage. A full disk truncates files mid-write.
- Confirm permissions: 755 for folders, 644 for files.
Restore a backup, after saving a copy of the broken site
If one update broke everything and debugging is eating your day, restore. First, copy the broken files and database somewhere safe so you can still investigate later.
| Backup source | How to restore |
|---|---|
| Hosting panel backup | cPanel Backup Wizard, or your host’s backup screen |
| Backup plugin (UpdraftPlus, Jetpack VaultPress Backup) | Restore from the plugin or its cloud dashboard. Plugin-based restores need wp-admin working, so use the cloud option if you’re locked out |
| Manual copy | Upload files by FTP, then import the database in phpMyAdmin |
After restoring, don’t repeat the same update on the live site. Test it on staging first. If you move sites with Kadence Central (formerly Solid Central), my Solid Central migration-failed fix covers a failure worth knowing about.
If You See a Different Error Instead
500 Internal Server Error
A bad .htaccess rule produces this, not the critical error message. Replace the contents with WordPress’s defaults:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Then open Settings → Permalinks and click Save to regenerate it cleanly.
Error establishing a database connection
Check DB_NAME, DB_USER, DB_PASSWORD and DB_HOST in wp-config.php against your hosting panel. Only if tables are corrupted, add define( 'WP_ALLOW_REPAIR', true ); and visit /wp-admin/maint/repair.php. That page works without a login while the constant is set, so remove the line the moment you’re done.
Plugin-Specific Notes
These plugin families show up in crash logs often because they’re installed everywhere. The pattern behind each one matters more than the brand.
| Plugin type | What commonly breaks | First move |
|---|---|---|
| Elementor and Elementor Pro | Pro running against a mismatched core Elementor version | Deactivate Pro, update both, then reactivate. If the editor loads but its AI panel doesn’t, see my Elementor AI history panel fix |
| WooCommerce extensions | Payment or shipping add-ons built for an older WooCommerce | Deactivate the extensions first. Disabling WooCommerce alone can make its add-ons crash |
| Caching plugins (WP Rocket, LiteSpeed Cache, W3 Total Cache) | Stale advanced-cache.php or object-cache.php drop-ins | Rename the drop-ins (Step 3) |
| SEO plugins (Yoast SEO, Rank Math) | Server below the plugin’s “Requires PHP” version, or two SEO plugins active together | Run one SEO plugin only. Related: Yoast’s missing AI description button and a Yoast schema script I covered |
| Forms and CRM (WPForms, Forminator, FluentCRM) | Add-ons and integrations out of sync with the main plugin | Update the main plugin and its add-ons together. See the WPForms geolocation fix, the Forminator PayPal sandbox fix and the FluentCRM webhook mapping error |
For any plugin, open its wordpress.org page and compare the “Requires PHP” and “Requires at least” fields to your server. A mismatch there explains a surprising number of crashes.
How to Stop It Coming Back
One more setup detail matters: make sure the admin email in Settings → General is one you read, and that WordPress can actually send mail. An SMTP plugin closes most delivery gaps. Recovery Mode depends on that email arriving.
Habits that protect you
- Test updates on a staging copy first
- Update plugins one at a time
- Keep backups off the server itself
- Delete plugins and themes you don’t use
- Install WordPress security releases promptly, like 7.1.2 on Sep 22, 2026
Habits that cause outages
- Bulk-updating everything at once on production
- Pasting code snippets into
functions.php - Staying on end-of-life PHP
- Ignoring the admin email address
- Having no backup before an update
Add an uptime monitor too, so you hear about an outage before a visitor does. I reviewed one in my Uptimia review.
How I Checked This Guide
I verified every version number, date and default in this article on October 21, 2026. Sources were the WordPress developer reference (Recovery Mode behavior), the WordPress hosting handbook (PHP requirements), WordPress.org release notes (7.1.2) and php.net’s supported versions page. Where I couldn’t confirm a claim, I left it out. I’d rather give you fewer claims you can trust than a long list you can’t.
After the Fix: Growing the Site With Soro SEO
Soro doesn’t fix errors. It’s a content tool, which is why it belongs after the outage, not before. Per Soro’s own site, it researches keywords, writes articles in your brand voice, and publishes them to your site automatically. A WordPress plugin is available.
| Feature | What Soro says |
|---|---|
| Keyword research | Finds keywords it expects to bring buyers |
| Writing and publishing | Drafts, optimizes and posts articles automatically |
| Brand voice | Learns your style and tone |
| Languages | 50+ |
| Volume | 30 to unlimited articles per month, depending on plan |
| Commitment | No contract, cancel anytime |
What works for WordPress owners
- Publishes straight to WordPress
- Hands-off for solo site owners
- Multilingual output
Keep in mind
- Automated drafts still need your fact-check
- It won’t diagnose or fix site errors
- Check current plan limits on its pricing page
Put your content on autopilot
Soro finds keywords, writes the articles and publishes them to WordPress while you deal with everything else.
Try Soro SEO →Disclosure: the Soro links on this page are affiliate links. I may earn a commission at no extra cost to you.
FAQ
What causes “There has been a critical error on this website”?
A PHP fatal error that WordPress’s built-in handler caught. A plugin or theme is the usual source, and PHP version mismatches, memory exhaustion and corrupted core files make up most of the rest.
How do I fix it without wp-admin access?
Use FTP or your host’s File Manager. Rename the plugin folder named in debug.log (or the whole plugins folder), then rename your theme folder if the site is still down.
How long is the Recovery Mode link valid?
One day by default. WordPress won’t email another link until that period ends, so don’t keep reloading the site hoping for a fresh one.
Why didn’t I get the recovery email?
The admin email may be outdated, your server may not send mail reliably, the message may be in spam, or a link was already sent within the last day. Skip the email and use Step 2.
Will disabling all plugins delete my data?
No. Plugin data stays in the database. Deactivating only turns the code off, and you reactivate plugins one by one afterward.
Can a PHP update cause this error?
Yes, in both directions. A newer PHP can break an old plugin, and an old PHP can break a plugin that now requires a newer one. Check the plugin’s “Requires PHP” field before changing versions.
Does this error mean my site was hacked?
Usually not. But unfamiliar files in uploads, or core files that fail wp core verify-checksums, point to a compromise. Treat that as a security problem.
Do I need to reinstall WordPress?
Rarely. Replacing wp-admin and wp-includes with fresh copies covers corrupted core files without touching your content.
Conclusion
This error looks scary, but it’s WordPress doing its job: catching a crash and telling you where to look. Start with the recovery email, then the debug log, then the plugin it names. That order solves most cases without touching anything risky.
Once you’re back online, check your PHP version, update WordPress to the current release, and set up a staging site and off-server backups. The next outage is much cheaper when you’ve done that.