How to Fix the ‘There Has Been a Critical Error on This Website’ Issue in WordPress

WordPress is one of the most popular content management systems worldwide, powering millions of websites. Despite its stability, WordPress users may occasionally encounter an issue known as the “There has been a critical error on this website” message. This can be a nightmare for website owners, as it often comes with no immediate explanation. However, the message is typically caused by a fatal error in PHP, resulting from issues with plugins, themes, or server configurations.
Before the release of WordPress 5.2, WordPress users were often greeted by the dreaded White Screen of Death (WSOD)—a completely blank page with no error message. It was a frustrating experience because there was no clue as to what went wrong, leaving many users to search aimlessly for solutions. However, with the introduction of WordPress 5.2, the error message became more descriptive, making it easier for users to identify and resolve the issue.
In this article, we’ll walk you through the steps to fix this critical error on your WordPress site, starting with some of the most common causes, troubleshooting methods, and a solution-focused approach. We’ll also explore how you can avoid this problem in the future and answer some frequently asked questions.
What Causes the Critical Error in WordPress?

The ‘Critical Error’ message typically occurs when WordPress encounters a fatal PHP error. It happens when WordPress is unable to perform a specific task, usually due to an issue with a plugin, theme, or server setting. Here are some of the most common causes of this error:
- Plugin or Theme Conflicts:
Plugins and themes are often the root cause of WordPress errors. When a plugin or theme is poorly coded, outdated, or incompatible with the current version of WordPress, it can trigger a critical error. Additionally, if plugins conflict with each other, it can lead to system failures. - PHP Memory Limit Exhaustion:
WordPress requires a certain amount of server memory to function. If your site exceeds the available memory (especially when handling large images, databases, or resource-heavy plugins), it can result in a critical error. This issue is often caused by insufficient memory allocated to PHP scripts. - Outdated or Incompatible Code:
Running outdated versions of WordPress, plugins, or themes can cause compatibility issues. Newer versions of WordPress might not support old code, which can lead to errors and site crashes. - Corrupted WordPress Core Files:
In some cases, the core WordPress files might become corrupted, usually during updates. This corruption can result in the failure of crucial website functions and trigger the critical error message.
Now that you understand the potential causes of the critical error, let’s look at how you can resolve it.
Step 1: Check Your Email for the Recovery Mode Link
When a critical error occurs, WordPress 5.2 and later versions send an email to the site administrator (the email associated with your WordPress account). This email contains a Recovery Mode link that allows you to access your site and troubleshoot the problem without being locked out completely.
Here’s how to use Recovery Mode from the email:
- Look for the Recovery Mode Email:
After the critical error occurs, WordPress will send you an email titled “Your site is experiencing a technical issue.” If you can’t find it, check your spam or junk folder. - Click on the Link:
In the email, you’ll find a special link to enter Recovery Mode. Click the link to open your site’s login page. - Login to Recovery Mode:
When you click the link, you’ll be taken to a login screen where you can enter your credentials. After logging in, you’ll be directed to a special WordPress admin panel where you can see which plugin or theme caused the error. - Deactivate the Faulty Plugin or Theme:
From the Recovery Mode panel, you can deactivate the plugin or theme that is causing the error. Once deactivated, check if your website is functioning again.
Important: If you don’t receive the email or can’t access the link for any reason, we’ll walk you through a manual method to resolve the error in the next steps.
Step 2: Enable Debug Mode in WordPress
If you didn’t get the recovery email, enabling debug mode helps you see what’s breaking your site.
- Use FTP or File Manager from your hosting dashboard.
- Open wp-config.php located in your site’s root directory.
- Add or update the following lines:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
- Save and refresh your site.
- Check /wp-content/debug.log for specific error messages.
These logs often pinpoint the file or function responsible for the crash.

Step 3: Deactivate All Plugins
Plugins are among the most common causes of this error.
To deactivate them:
- Connect via FTP or File Manager.
- Navigate to /wp-content/
- Rename the plugins folder to plugins-disabled
- Refresh your site.
If the site loads: One of your plugins is the issue. Rename the folder back to plugins, then rename individual plugin folders one by one to find the problematic one.

Step 4: Revert to a Default Theme
If disabling plugins didn’t help, the issue might lie with your active theme.
- Go to /wp-content/themes/
- Rename your active theme’s folder (e.g., from astra to astra-old)
- WordPress will automatically fall back to a default theme like twentytwentyfour, if installed.

Step 5: Increase PHP Memory Limit
Sometimes, the error is due to memory exhaustion. You can increase the memory limit as follows:
- Edit wp-config.php
- Add this line before /* That’s all, stop editing! */:
define('WP_MEMORY_LIMIT', '256M');
- Save and test your site.
You can also modify .htaccess or php.ini depending on your hosting environment.

Step 6: Reinstall WordPress Core Files
If core WordPress files are corrupted, replacing them can solve the problem.
- Download the latest version from WordPress.org
- Extract the zip file on your computer.
- Upload everything except the wp-content folder via FTP to your root directory, overwriting existing files.
This process doesn’t delete your themes, plugins, or content.
Step 7: Check Server Error Logs
If debugging hasn’t revealed the cause, check your server logs:
- Log in to your hosting control panel.
- Look for sections like “Error Logs” or “Logs.”
- Look for recent entries pointing to fatal PHP errors.
These logs may indicate whether the error originates from a specific plugin, theme, or script.
Step 8: Restore a Backup
If you have backups (and you should!), now is a great time to restore one.
Most hosting providers offer daily backups. Alternatively, you may use plugins like
- UpdraftPlus
- BlogVault
- Duplicator
Choose a restore point before the error occurred.
Step 9: Contact Your Hosting Provider
If you’ve tried all steps and the issue persists, your hosting support team can:
- Investigate server-level issues
- Restore a working version of your site
- Help with permissions or PHP module issues
Reliable hosts often have 24/7 technical support to resolve such issues quickly.
Preventing the Critical Error in the Future
To reduce the chances of seeing this message again, follow these best practices:
- Use a Staging Environment: Test updates and new plugins before deploying them to your live site.
- Keep Everything Updated: Outdated themes and plugins are common vulnerability points.
- Install a Security Plugin: Tools like Wordfence or Sucuri can help detect and block problematic changes.
- Monitor Error Logs Regularly: Keeping an eye on error logs helps catch issues early.
- Create Regular Backups: Automate your backup strategy so you’re never without a fallback.
Final Thoughts
While the “There has been a critical error on this website” message can be intimidating, it’s often a solvable issue once you understand where to look. By systematically disabling plugins, switching themes, checking logs, and increasing memory limits, you can get your WordPress site up and running again in no time.
If you found this guide helpful, consider bookmarking it for future reference. And remember, staying proactive with updates and backups is the best way to prevent these issues from happening again.
FAQs
Q1: What is Recovery Mode, and how do I use it?
A1: Recovery Mode is a feature introduced in WordPress 5.2 that allows you to access your site and troubleshoot errors without being locked out. If you encounter a critical error, WordPress sends you an email with a link to enter Recovery Mode, where you can deactivate the problematic plugin or theme.
Q2: What if I don’t receive the Recovery Mode email?
A2: If you don’t receive the Recovery Mode email, you can manually deactivate plugins via FTP or use debug mode to investigate the error further.
Q3: Will restoring a backup erase my current site data?
A3: Restoring a backup will revert your site to the state it was in at the time of the backup. If you want to preserve new content, ensure you create a fresh backup before restoring an older version.
Q4: How can I prevent critical errors in the future?
A4: Regularly update your WordPress core, plugins, and themes. Use a staging environment to test changes before applying them to your live site. Implement a backup solution and monitor error logs to stay ahead of potential issues.
Q5: What should I do if the issue persists even after troubleshooting?
A5: If the issue persists, contact your hosting provider for assistance. They can check server-side issues that might be causing the error and help restore your site.
Author
Tiago Rodrigues is an SEO specialist and web developer helping businesses improve visibility, fix website issues, and grow online. He is currently affiliated with WProfessional, helping WordPress website owners with maintenance and development.