WordPress may sometimes show you a message that ‘There has been a critical error on this website. Please check your site admin email inbox for instructions’. It will also come with a link to debugging in the WordPress guide.
In this tutorial, we’ll show you how to easily fix the critical error in WordPress. We will also talk about what causes this error and how to avoid it.
What is Critical Error in WordPress?
The critical error in WordPress is an error that stops WordPress from loading all the scripts it needs to work properly.
Previously, this WordPress error led to a white screen of death or a fatal error message on screen. Most beginners didn’t find it very helpful and struggled to resolve the issue on their own.
Since WordPress 5.2, users will now see a generic error message ‘There has been a critical error on this website. Please check your site admin email inbox for instructions’ along with a link to the WordPress debugging guide.
It will also send an email message to your WordPress site’s admin email address with more details about the error and a link to access your WordPress dashboard in the recovery mode.
What Causes the Critical Error in WordPress?
The critical error in WordPress is usually caused by a malfunctioning plugin, script, or code that prevents WordPress from functioning properly.
WordPress cannot load the rest of the files it needs unless you resolve this issue.
If you have recently copied and pasted code snippets from some tutorial to your website, then it might trigger the critical error.
All top WordPress plugins are thoroughly tested, so they are less likely to result in a critical error on their own. However, a conflict with another WordPress plugin or some custom code may trigger the error.
That being said, let’s look at how to easily fix the critical error in WordPress and get your website back.
Fixing The Critical Error in WordPress (2 Methods)
The critical error message itself is not very helpful in finding the cause of the issue and fixing it. Luckily, WordPress also sends an email to the admin email address of your website.
Now, a lot of WordPress sites have issues sending emails, so you might not get this crucial email notification. If you are among those users, don’t worry. We’ll show you how to fix the critical error even without the email.
On the other hand, if you did receive the WordPress technical issue email notification, then we’ll show you how to understand it and use it to bring your website back.
Fixing Critical Error with WordPress Debugging Email
First, you need to go see the inbox for the email address you use as the WordPress administration email on your website.
Don’t know which email address you used as the admin email? It is the email address you provide when installing WordPress.
If you are on Bluehost or used a WordPress auto-installer, your admin email address will likely be the same address that you have used for your WordPress hosting account.
In your inbox, you can see an email with the subject line ‘Your Site is Experiencing a Technical Issue’. In here, you will find a lot more helpful information about what caused the critical error on your WordPress website.
For example, in the following screenshot, you can see that the critical error was caused by the WordPress theme on our test site.
The email also comes with a special link that will allow you to login to your WordPress website in recovery mode to fix and investigate the issue.
At the bottom of the email, you will see even more detailed information about the error, including the specific file and code that triggered it.
In the example below, some code at line 614 in our theme’s functions.php file is responsible for triggering the error.
Here is another example which is showing error details caused by a malfunctioning WordPress plugin.
Now you only need to click on the link to WordPress recovery mode, which will take you to your WordPress admin area.
You will be asked to log in to continue.
Once you are logged in, you will see a notification informing you about the critical error, what caused the error, and a link to the place where you can go to fix it.
For example, in the following screenshot, it is informing us about the critical error caused by the plugin with a link to the plugins page.
Now, if you click on the link, it will show you the misbehaving plugin. It will also show you exactly which line of code caused the error.
You can continue and deactivate the plugin for now.
Then you can simply find an alternative WordPress plugin, or see if you can get support from the plugin developers.
Similarly, if the issue is with your theme, then you will see a link to the Themes page. At the end of the page, you can see the theme causing the issue.
You can simply change your WordPress theme, or delete the broken theme and reinstall a fresh copy of the same theme from the official source to see if that resolves the issue.
Once you have addressed the issue, you can simply continue and click on the Exit Recovery Mode button at the top.
In most cases, your WordPress website should now start working normally.
However, if you are still seeing the critical error in WordPress, then you can try the troubleshooting steps in the next step.
Fixing Critical Error in WordPress Manually
If you are didn’t receive the WordPress critical issue notification email, then here is how you can troubleshoot and fix the critical error in WordPress.
If the error was caused by a recent action you took, you can just simply undo that action to fix the issue.
For example, if you installed a new plugin and activating it caused the critical error, then you need to deactivate that plugin (we’ll show you how to do that in the first step below).
On the other hand, if you are not sure, then you can simply follow these steps.
1. Deactivate All WordPress Plugins
The simplest way to disable a faulty WordPress plugin is by deactivating it. However, due to the critical error, you don’t have access to the admin area and you don’t know which plugin to deactivate.
To resolve this we will deactivate all WordPress plugins. Don’t worry, you can easily reactivate them once you get access to your WordPress admin area.
Simply connect to your WordPress website using an FTP client or the File Manager app in your WordPress hosting control panel.
Once connected, you should navigate to the
Inside the wp-content folder, you will now see a folder called ‘plugins’. You need to right-click on it and then select ‘Rename’ option.
Then, change the name of the plugins folder to anything that you like. In our example, we’ll call it ‘plugins.deactivate’.
Once you do this, all of your plugins will be deactivated.
Basically, WordPress looks for the plugins folder to load the activated plugins on your website. When it cannot find the plugins folder, it just cannot activate the plugins and automatically sets them as deactivated.
You can now visit your website to see if the critical error message has disappeared.
Important: Whether the critical error issue is addressed or not, remember to rename the plugins.deactivated folder back to ‘plugins’. WordPress will then recognize the folder, and you’ll be able to reactivate them one by one from the WordPress dashboard so you can identify which one caused the critical error.
2. Switch to Default Theme
The next step in troubleshooting the critical error is to switch your WordPress theme to a default theme. This should fix the critical error issue if it is caused by some code in your current WordPress theme.
Simply go to WordPress.org themes directory and download a fresh copy of the TwentyTwenty or Twenty Twenty-One WordPress theme.
Then, you need to unzip the theme file to your computer. This will create a folder with the theme name on your computer.
Now you need to connect to your WordPress site using an FTP client or the file manager app in your hosting control panel. Once connected, navigate to the /wp-content/themes folder and you should see a list of all themes installed on your website.
Continue and download all of them to your computer as a backup. Next, you need to delete all theme folders from your website.
Your WordPress site now has no theme installed. To fix this, go ahead and upload the default theme folder you downloaded earlier.
Once finished, you can try visiting your website.
If the critical error was caused by your WordPress theme, then it would disappear now and you’ll be able to access your website.
3. Reinstall WordPress
A corrupt WordPress core file or malware could also trigger the critical error in WordPress. The simplest way to fix this is by reinstalling WordPress.
Simply go to WordPress.org and download a fresh copy of WordPress to your computer. After downloading the file, you need to unzip it to your computer. This will create a folder called ‘wordpress’ which contains all the files you need for the reinstall.
Then, you need to connect to your WordPress site using an FTP client or the file manager app in your hosting control panel.
Once connected, you need to navigate to the root folder of your website. The root folder is the one that contains wp-admin, wp-content, wp-includes, and wp-admin folders in it.
Now select the files inside the
wordpress folder on your computer and upload them to your website. Your FTP client will ask if you want to overwrite these files or skip them. You need to choose ‘Overwrite’ and check the box next to ‘Always use this action’ option.
Click on the OK button to continue. Your FTP client will now replace all your core WordPress files with fresh copies from your computer.
Once finished, you can try visiting your website again to see if this resolved the error.
If the critical was caused by a corrupt WordPress core file or malware, the error would disappear now.
We hope this article has helped you troubleshoot and fix the critical error in WordPress.