WordPress guide
How to Fix "There Has Been a Critical Error on This Website" in WordPress
Quick answer: the critical error means a PHP fatal error stopped WordPress from loading, usually because of a plugin, theme or code change. Open the "Your Site is Experiencing a Technical Issue" email sent to your admin address and use its recovery mode link to deactivate the plugin or theme it names. No email? Turn on the debug log to see the exact error, or rename the plugin's folder over FTP or your host's File Manager.
Your site was fine yesterday. Today visitors see one line, "There has been a critical error on this website", and you may be locked out of the dashboard too. The good news: your content is safe, and the cause is almost always something you can find and undo in a few minutes.
What the WordPress Critical Error Means
Since WordPress 5.2, a PHP fatal error no longer leaves a blank white page. WordPress catches the error, shows this message instead, and emails the site admin with details. Newer versions add "Please check your site admin email inbox for instructions."
The most common causes are:
- A plugin or theme update that conflicts with another plugin, the theme or WordPress itself.
- A PHP version that is too new for an old plugin, or too old for a new one.
- PHP running out of memory on a heavy page, often with page builders or WooCommerce.
- A code snippet pasted into
functions.phpor a snippets plugin with a typo in it. - A failed or partial update that left files missing or corrupted.
How to Fix the Critical Error, Step by Step
Work through these in order. Most sites are fixed by step 1, 2 or 3.
-
Use the recovery mode email
Check the inbox of your site's admin email (Settings → General) for "Your Site is Experiencing a Technical Issue". It names the plugin or theme that caused the error and includes a special recovery mode link. Open the link, log in, and deactivate the plugin or switch the theme it names. The rest of the site starts working again while you decide what to do with it.
Check spam too. If the site cannot send email, the message may never arrive, so move on to step 2.
-
Turn on the debug log to see the real error
Open
wp-config.phpin your hosting File Manager or over FTP, and add these lines above/* That's all, stop editing! */:define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );Reload the broken page, then open
wp-content/debug.log. Look for a line that starts withPHP Fatal error. The file path in that line tells you where the problem is:/wp-content/plugins/plugin-name/points at a plugin,/wp-content/themes/theme-name/at the theme.WP_DEBUG_DISPLAYset to false keeps the errors out of sight of visitors. Remove all three lines once the site is fixed. -
Deactivate plugins without the dashboard
In the File Manager or FTP, go to
wp-content/pluginsand rename the folder of the plugin from the error log, for examplewoocommercetowoocommerce-off. WordPress deactivates any plugin whose folder it cannot find.Not sure which plugin it is? Rename the whole
pluginsfolder toplugins-off. If the site loads, rename it back, then reactivate plugins one at a time from the dashboard until the error returns. The last one you activated is the culprit. -
Switch to a default theme
If the error points at your theme, rename the active theme's folder in
wp-content/themes. WordPress falls back to an installed default theme such as Twenty Twenty-Five. If none is installed, upload one first from wordpress.org. -
Raise the PHP memory limit
If the log says
Allowed memory size of ... bytes exhausted, add this line towp-config.php, above the "stop editing" line:define( 'WP_MEMORY_LIMIT', '256M' );Some hosts cap memory at the server level. If the error stays, raise
memory_limitin your hosting control panel or ask your host. -
Check your PHP version
Did the error start after your host upgraded PHP? Look in your hosting panel for the PHP version and the error log. Update the plugin or theme to a version that supports current PHP, or temporarily switch PHP back while you replace it. Running an old PHP version long term is a security risk, so treat this as a short-term step.
-
Undo your last code change
If the error appeared right after you edited
functions.phpor added a snippet, open the file in the File Manager and remove what you added. A single missing semicolon or bracket is enough to cause a critical error. -
Restore a backup
Still stuck? Restore the most recent backup from before the error, from your backup plugin or your host's backup tool, then update plugins one by one on a staging site to see which update breaks it.
Before you change files: download a copy of wp-config.php and any file you edit, so you can put it back if something goes wrong.
How to Stop It Happening Again
- Test plugin, theme and PHP updates on a staging site before updating the live site.
- Keep automatic daily backups that you can restore in a couple of clicks.
- Remove plugins you no longer use, and avoid plugins that have not been updated in a long time.
- Add custom code with a snippets plugin that can disable a broken snippet, instead of editing
functions.phpdirectly.
A WordPress maintenance plan takes care of updates, backups and checks for you, so problems are caught before visitors see them.
Still Seeing the Critical Error?
Send me the problem and I will fix it for you for $25 per bug, tested before I hand the site back. Bigger issues get a clear quote first.
Critical Error FAQs
What causes the WordPress critical error?
A PHP fatal error. The most common causes are a plugin or theme update that conflicts with something else, a PHP version the code does not support, running out of PHP memory, or a broken code snippet added to functions.php.
Will I lose my content because of a critical error?
No. Posts, pages, products and orders are stored in the database, which the error does not touch. The error only stops PHP from finishing the page. Once the faulty plugin, theme or snippet is fixed, the site comes back as it was.
How do I fix the critical error if I cannot log in to WordPress?
Use the recovery mode link that WordPress emails to the site admin, or use your hosting File Manager or FTP to rename the plugins folder or the active theme folder. Renaming a folder deactivates that plugin or theme without needing the dashboard.
Related guides: how to fix the WordPress white screen of death and WooCommerce checkout not working.