Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Fix The Critical Error in WordPress (Step by Step)

Are you seeing the critical error on your WordPress site?

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 include a link to debugging in the WordPress guide.

In this guide, we will 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.

Fixing the critical error in WordPress step by step

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 resulted in 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’ with a link to the WordPress debugging guide.

WordPress critical error message

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 generally caused by a malfunctioning plugin, script, or code that prevents WordPress from functioning properly.

WordPress is unable to 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 cause 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 take a 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 useful in finding the cause of the issue and fix it. Luckily, WordPress also sends an email to the admin email address of your website.

Now, many 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 will 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 make sense of it and use it to bring your website back.

Simply click the links below to skip straight to the section you need:

Fixing Critical Error with WordPress Debugging Email

First, you need to go visit the inbox for the email address you use as the WordPress administration email on your website.

Not sure 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, then your admin email address will likely be the same address that you have used for your WordPress hosting account.

In your inbox, you’ll see an email with the subject line ‘Your Site is Experiencing a Technical Issue’. Inside it, you will find a lot more helpful information about what caused the critical error on your WordPress website.

For instance, in the following screenshot, you can see that the critical error was caused by the WordPress theme on our test site.

WordPress critical error email notification

The email also includes 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 this example below, some code at line 614 in our theme’s functions.php file is responsible for triggering the error.

Critical error details

Here is another example which is showing error details caused by a malfunctioning WordPress plugin.

Error caused by a WordPress plugin

Now you just need to click on the link to WordPress recovery mode, which will take you to your WordPress admin area.

You’ll be asked to log in to continue.

WordPress recovery mode login

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 instance, in the following screenshot, it is informing us about the critical error caused by the plugin with a link to the plugins page.

Recovery mode information

Now, if you click on the link, then it will show you the misbehaving plugin. It will also show you exactly which line of code caused the error.

You can go ahead and deactivate the plugin for now.

Deactivate the misbehaving plugin

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 bottom of the page, you can see the theme causing the issue.

Broken theme message in WordPress recovery mode

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 go ahead and click on the Exit Recovery Mode button at the top.

Exit recovery mode in WordPress

In most cases, your WordPress website would 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, then you can simply undo that action to fix the issue.

For instance, 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 unsure, then you can simply follow these steps.

1. Deactivate All WordPress Plugins

The easiest 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 address 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 need to navigate to the /wp-content/ folder.

Rename plugins folder

Inside the wp-content folder, you will see a folder called ‘plugins’. You need to right-click on it and then select ‘Rename’ option.

Next, change the name of the plugins folder to anything that you like. In our example, we’ll call it ‘plugins.deactivate’.

Plugins folder renamed

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 simply 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 resolved or not, don’t forget 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 would 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.

Download default WordPress theme

Next, you need to unzip the theme file to your computer. This will create a folder with the theme name on your computer.

Unzipped theme folder

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 will see a list of all themes installed on your website.

Download themes as backup

Go ahead and download all of them to your computer as a backup. After that, you need to delete all theme folders from your website.

Delete all themes 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.

Upload default WordPress theme

Once finished, you can try visiting your website.

If the critical error was caused by your WordPress theme, then it should 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 easiest 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.

Extracted WordPress files on your computer

Next, 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 inside it.

Upload WordPress files from your computer

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 select ‘Overwrite’ and check the box next to ‘Always use this action’ option.

Overwrite WordPress files

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 to see if this resolved the error.

If the critical was caused by a corrupt WordPress core file or malware, then the error should disappear now.

We hope this article helped you troubleshoot and fix the critical error in WordPress. You may also want to see our guide on how to get a free SSL certificate for your WordPress site, or our expert comparison of the best business phone services for small business.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

22 CommentsLeave a Reply

  1. Hi… thanks for such a nice post.

    I renamed my Plugins folder to Plugins.deactivate, and after that I could log into my dashboard. But as soon as I rename the Plugins.deactivate back to Plugins, I get out of my site, and the error message comes back.

    What should be the next step? It seems that the problem is with the Plugins folder, but how do I use it if I cannot rename it back to its original?

    ~ Sudeep

    • For that issue, it seems like one of your plugins is having a major error, you could manually create a plugins folder and move the individual plugins back into the plugins folder to find which of your plugins is the root of the error.

      Admin

  2. I got the e-mail with the WordPress recovery mode link. But it’s just opening my broken website only – not the WordPress recovery mode login page. The link is not expired.

    • It sounds like the recovery email is not working properly in which case we would recommend using the second method from this guide.

      Admin

  3. Thank you so much for this amazing post! It was momentarily very stressful to have my website down but these clear, easy instructions helped to keep me calm and I was able to fix it quickly.

  4. thank you so much! Got an email from google at 2 AM saying my site couldn’t be indexed. Got the critical error and followed your instructions.

    When I renamed the plugin folder back still got the error so I I actually had to rename each plugin file and then test each one until I found the one that caused the problem

    Again thank you. Was going to be on a show that day sending people to the website! Now it’s working and I can go back to sleep. Big smiles here!

  5. I tried but it did not work. I got as far as the renamed plugin but could not find the plugins afterwards to reactivate. It got a bit confusing. I hope my site comes back up because everything went crazy even after I renamed to plugins again.

    • To have your plugins available again you would want to revert the name of the plugins that you changed to their original names and they should appear again.

      Admin

  6. You can always be counted on when I need you! I was getting the critical error but never got the email so was clueless. I followed your steps (although I panicked for a moment after I renamed the folder) and sure enough-I found the plugin causing the problems.

    Thank you so much for your help

  7. Just wanted to say thanks for this clear article. It’s all you need to know in this situation. Resolved this issue with this, saving me a lot of googling, and life’s too short for googling :-).

  8. what should I do when I try to install a plugin or any theme and my WordPress website show a critical situation on the to bar.
    I’ll fix it earlier now if I install every theme it appears again.. please let me know what can do?

  9. I got the critical error message and I can’t view my website. I signed into my cPanel and went to the plug-ins folder in the file manager. When I right click on the plug-ins folder there is no “rename” option to select. I don’t know what to do to get my website back.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.