Skip to main content

Seeing the dreaded “There has been a critical error on this website” screen can instantly send your heart into your throat. But take a deep breath — this is one of the most common issues in WordPress, and it is usually straightforward to fix.

The error occurs when a PHP script encounters a fatal error and stops running. This is almost always triggered by a plugin conflict, theme incompatibility, or exhausted server memory.

Here is a step-by-step troubleshooting guide to get your WordPress site back up and running fast.

Step 1: Check Your Admin Email for Recovery Mode

When a critical error occurs, WordPress automatically attempts to capture the fatal stack trace and sends an email to the site’s admin address.

  1. Log in to the inbox associated with your WordPress Administrator Email.

  2. Look for an email with the subject line: “Your Site is Experiencing a Technical Issue”.

  3. Open the email to find a special Recovery Mode link and details on which specific plugin or file caused the crash.

  4. Click the link to log into your WordPress Dashboard in Safe Mode, where you can easily deactivate the culprit.

Didn’t get the email? Check your spam folder. If it’s not there, move on to Step 2.

Step 2: Enable Debug Mode to Locate the Culprit

If you can’t access your dashboard, you can force WordPress to print the exact cause of the crash into an error log.

1. Access Server Files:File Manager or FTP.Log into your web hosting control panel (like cPanel) or use an FTP client (like FileZilla) to view your site’s root directory.

2. Edit wp-config.php:Root Directory.Locate the wp-config.php file. Scroll down to the line that says:

define(‘WP_DEBUG’, false);

3. Enable Debug Logging:Replace Code.Replace that line with the following code snippet:

PHP
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

4. Check the Log File:wp-content/debug.log.Save the file and refresh your broken website. WordPress will generate a debug.log file inside your /wp-content/ folder. Open it to see which plugin or theme line broke the code.

Step 3: Disable All Plugins via FTP or File Manager

Over 60% of critical errors are caused by faulty or updated plugins. Deactivating them safely bypasses the crash.

  1. Open your FTP client or File Manager.

  2. Navigate to /wp-content/.

  3. Locate the plugins folder and rename it to plugins_disabled.

  4. Reload your website. If it loads normally, one of your plugins was the issue.

  5. Rename the folder back to plugins. Now go into your WordPress Dashboard and activate plugins one by one to pinpoint which one causes the crash.

Step 4: Increase Your PHP Memory Limit

If your site runs out of memory while processing scripts, it triggers a fatal error.

To fix this, open your wp-config.php file and paste this line right above /* That’s all, stop editing! Happy publishing. */:

PHP

define(‘WP_MEMORY_LIMIT’, ‘256M’);

Save the file and check if your site is back online. If the error persists, you can review official troubleshooting advice on the WordPress.org Documentation or reach out to your hosting support team.

Frequently Asked Questions

Will I lose my website content when fixing a critical error?

No, fixing a critical error generally will not delete your content. Your blog posts, pages, media files, and user data are stored safely in your MySQL/MariaDB database, whereas critical errors are almost always caused by PHP code files in themes or plugins.

What should I do if disabling plugins and themes doesn’t fix it?

If deactivating plugins and themes fails, your core WordPress files might be corrupted. Download a fresh ZIP file of WordPress from WordPress.org, unzip it, and replace the /wp-admin/ and /wp-includes/ folders on your server via FTP.

How do I prevent critical errors from happening again?

  • Use Staging Environments: Test updates on a staging site before applying them live.

  • Maintain Automated Backups: Use a backup plugin or host-level backups so you can restore your site instantly.

  • Keep PHP Updated: Ensure your hosting environment is running a supported PHP version (such as PHP 8.1 or higher).

Why didn’t I receive the admin recovery email?

WordPress uses the built-in PHP mail() function, which many default servers fail to deliver or flag as spam. To prevent this in the future, configure an SMTP plugin like WP Mail SMTP so transactional system emails land directly in your primary inbox.