How to fix ‘There has been a critical error on this website’ in WordPress

How to fix the WordPress critical error and white screen of death: recovery mode, debug logs, plugin and theme conflicts, memory limits and PHP versions.

Usman Muhammad UsmanUpdated October 13, 2026
How to fix ‘There has been a critical error on this website’ in WordPress

Seeing ‘There has been a critical error on this website’ instead of your homepage is stressful, but it is usually fixable in minutes. The message means PHP hit a fatal error, most often because of a plugin, theme or PHP version conflict. Older WordPress versions showed a blank white page instead, the famous white screen of death. Here is the step-by-step process I use.

Check your email for recovery mode

When WordPress detects a fatal error, it sends an email to the site’s admin address with the subject ‘Your Site is Experiencing a Technical Issue’. It names the plugin or theme that caused the problem and includes a special link to log in using recovery mode.

Recovery mode lets you access the dashboard while the faulty plugin or theme is paused. Log in, deactivate or update the problem extension, then exit recovery mode. If the email does not arrive, check spam, and consider setting up SMTP so important emails like this reach you in future.

Think about what changed

Most critical errors follow a change: a plugin or theme update, a new plugin, a WordPress core update, a PHP version change by the host or custom code added to functions.php. If you know what changed just before the error, you already have the likely cause.

If you edited code, undo the edit by SFTP or the host’s file manager. If the host upgraded PHP, an old plugin may not be compatible; ask the host to temporarily switch back while you update the plugin. If nothing changed, a scheduled automatic update may be responsible.

Critical error fix order
  1. 1Recovery emailLogin link and culprit
  2. 2What changed?Update, code or PHP
  3. 3Debug logExact file and line
  4. 4Disable pluginsRename folders by SFTP
  5. 5Theme, memory, restoreThen prevent repeats

Turn on debugging

Edit wp-config.php and set WP_DEBUG to true, WP_DEBUG_LOG to true and WP_DEBUG_DISPLAY to false. This writes errors to a debug.log file in wp-content without showing them to visitors. Reload the page, then open the log to see the exact error message, file and line number.

The file path usually reveals the culprit, such as wp-content/plugins/plugin-name/. Your host’s PHP error log shows the same information. Turn debugging off again when you are done, and delete the debug log, which can contain sensitive information.

Disable plugins without the dashboard

If you cannot reach the dashboard, connect by SFTP or the file manager and rename the problem plugin’s folder in wp-content/plugins, for example by adding -off to the end. WordPress deactivates a plugin whose folder it cannot find. Reload the site to see if it works.

If you do not know which plugin is responsible, rename the whole plugins folder to disable all of them, check the site, then rename it back and reactivate plugins one at a time in the dashboard until the error returns. That last plugin is the cause.

Check the theme

If plugins are not the cause, the theme may be. Rename the active theme’s folder in wp-content/themes, and WordPress falls back to a default theme if one is installed. If the site loads, the problem is in the theme or child theme, often in recently edited functions.php code.

Keep at least one default theme, such as a recent Twenty Twenty theme, installed for exactly this reason. If you edit theme code, use a child theme and test changes on a staging site first.

Memory limits and PHP versions

Some critical errors are caused by PHP running out of memory, shown in the log as ‘Allowed memory size exhausted’. Increase the limit by adding a WP_MEMORY_LIMIT line in wp-config.php or asking your host to raise it. My guide to increasing the PHP memory limit explains the options.

Errors mentioning deprecated functions or syntax often mean a plugin is not compatible with your PHP version. Update the plugin, or replace it if it is abandoned. Running a current PHP version is important for security and speed; see upgrading PHP.

Restore a backup if needed

If you cannot find the cause quickly and the site is losing business, restore the most recent working backup, then investigate on a copy. Your host may also offer one-click restore points. My guide to restoring a WordPress backup walks through the process.

After restoring, avoid repeating the same update until you know why it failed. Check the plugin’s support forum for reports from other users, and test the update on staging. If the error looks like it was caused by unknown files or code, treat it as a possible hack and read what to do when WordPress is hacked.

Errors that only appear in the dashboard

Sometimes the front end works but the dashboard shows the critical error, or the error only appears on one page, such as checkout or a specific admin screen. That usually points to a plugin that loads code only in that context. The debug log still shows the exact file, so turn it on and reproduce the error.

If the error appears only for logged-in users, caching may be hiding it from visitors. Clear all caches and test in a private browser window. Note the exact page and action that triggers the error, as this information is very useful when reporting the problem to a plugin developer or your host’s support team.

Prevent it next time

Most critical errors can be avoided with a simple routine: back up before updates, test major updates on staging, keep plugins to a well-maintained minimum and monitor uptime so you know immediately when the site goes down. My safe update process covers each step.

If your site is down right now and you need help, contact me or message me on WhatsApp. Emergency fixes and ongoing monitoring are part of my website protection service, so problems are caught and solved quickly.

Key takeaways

  • Check the admin email first; recovery mode often names the culprit.
  • Enable the debug log to see the exact error and file.
  • Rename plugin or theme folders by SFTP to disable them without the dashboard.
  • Back up and test updates on staging to prevent future errors.

Frequently asked questions

What causes the WordPress critical error?

Usually a plugin or theme conflict, incompatible PHP version, faulty custom code or PHP running out of memory.

Is my content lost?

No. Content is stored in the database and is not affected by a fatal PHP error.

What is the white screen of death?

A blank page caused by a fatal PHP error, shown by older WordPress versions. Newer versions show the critical error message instead.

I did not receive the recovery email. What now?

Check spam, then use SFTP to rename plugin folders or enable the debug log to find the cause.

Can a hack cause a critical error?

Yes. Malware can break PHP files. If you find unknown files or code, treat it as a security incident.

Free website audit

Get a free audit of your website

Tell me your URL and I'll send a short, prioritized list of the speed, SEO and security fixes that will make the biggest difference.

  • No obligation, no sales call
  • 5.0 rating on Google and Upwork
  • Reply within one business day
Written by Muhammad UsmanWeb Development Team Lead with 5+ years building WordPress, WooCommerce, Shopify and Wix websites. Experience · Certificates About me

More on WordPress & WooCommerce

All WordPress & WooCommerce articles

Have a project in mind?

Tell me what you're building and I'll reply with next steps and an estimate.