Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

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

We’ve come across the dreaded ‘critical error’ more times than we’d like to admit. It’s frustrating because all you get is a message saying: ‘There has been a critical error on this website. Please check your site admin email inbox for instructions.’ It also includes a link to the WordPress debugging guide.

In this guide, we will show you how we prevent this error from happening, what causes it, and how you can fix it without needing any special skills.

Fixing the critical error in WordPress

What Is the Critical Error in WordPress?

Like many WordPress users, we’ve also encountered the critical error in WordPress. A lot of users also reached out to our Premium WordPress Support service, looking for a fix for this error.

This error stops WordPress from loading all the scripts it needs to function properly.

In the past, this WordPress error would lead to a white screen of death or a fatal error message. Many beginners found it confusing and hard to fix without help.

Since WordPress 5.2, instead of a blank screen, you’ll 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.

Critical error in WordPress

You’ll also get an email sent to your admin email address for the site.

This email usually contains more details about what caused the issue, often pointing to a problematic plugin or theme.

It also includes a link to access your WordPress dashboard in recovery mode, which we’ve found helpful when troubleshooting.

WordPress recovery mode email

In some cases, the error message might not instruct you to check your email, simply stating that your site is experiencing a critical error.

This usually happens when WordPress can’t load the necessary files to trigger recovery mode or send the email. We’ve seen this situation arise when server issues prevent certain features from working as expected.

Critical error in WordPress without email instructions

What Causes the Critical Error in WordPress?

From our experience, the ‘critical error’ in WordPress usually happens because of a malfunctioning plugin, script, or piece of code that prevents WordPress from loading properly.

WordPress can’t load the files it needs to run when the code doesn’t work as expected. We’ve seen this happen when custom code or untested scripts are added to a site.

If you recently copied and pasted code snippets from a tutorial, they might be the source of the problem.

Most top WordPress plugins are thoroughly tested, making them less likely to cause critical errors. However, we’ve seen rare cases where conflicts between plugins or issues with custom code can still trigger the error.

Now, let’s walk you through fixing the critical error in WordPress and running your website smoothly.

Fixing the Critical Error in WordPress (2 Methods)

The critical error message itself is not very useful for finding and fixing the issue’s cause. Luckily, WordPress also sends an email to the admin email address of your website.

Many WordPress websites are not configured to send emails using SMTP. As a result, users may not receive an email despite WordPress telling them that it has sent one.

Similarly, some WordPress sites may only see the critical error message without instructions to check the email. That’s because WordPress couldn’t load files it needed to send an email or make recovery mode available.

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 received the WordPress technical issue email notification, we will show you how to interpret it and use it to restore your website.

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

Fixing the Critical Error With WordPress Debugging Email

First, you need to visit the inbox for your website’s WordPress administration email address.

Are you unsure which email address you used as the admin email? It is the email address you provided when installing WordPress.

If your site is on Bluehost or you used a WordPress auto-installer, your admin email address will likely be the same one you used for your WordPress hosting account.

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

For instance, the following screenshot shows that the critical error was caused by the WordPress theme on our test site.

Critical error caused by a WordPress theme

The email also includes a unique link allowing you to log in to your WordPress website in recovery mode to investigate and fix the issue.

You will see even more detailed information about the error, including the specific file and code that triggered it, at the bottom of the email.

In the example below, some code on line 614 of our theme’s functions.php file triggers the error.

Recovery email error details

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

As you can see, the message highlights the plugin name and the line of code causing the error.

Plugin error details

Now, you just 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.

Recovery mode login

Once you are logged in, you will see a notification about the critical error, what caused it, and a link to where to fix it.

For instance, in the following screenshot, WordPress is notifying us about the critical error caused by the plugin with a link to the Plugins page.

WordPress recovery mode dashboard

If you click the link, it will show you the problem plugin. It will also show you exactly which line of code caused the error.

You can go ahead and deactivate the plugin for now by clicking on ‘Deactivate’.

Deactivate plugin

Then, you can simply look for an alternative WordPress plugin or see if you can get support from the plugin developers.

Similarly, you will see a link to the Themes page if the problem lies with your theme. At the bottom of the page, it will say which theme is causing the issue.

Broken theme

You can change your WordPress theme. Alternatively, you can delete the broken one and reinstall a fresh copy of it from the official source to see if that resolves the issue.

Once you have addressed the issue, click on the ‘Exit Recovery Mode’ button at the top.

Exiting the recovery mode in WordPress

In most cases, your WordPress website would now start working normally.

However, if you still see the critical error in WordPress, you can try the troubleshooting steps in the next section.

Fixing the Critical Error in WordPress Manually (Without Email)

If you didn’t receive the WordPress critical issue notification email, this method will teach you how to troubleshoot and fix the critical error in WordPress.

If the error was caused by a recent action you took, then you can undo that action to fix the issue.

For example, if you installed a new plugin and activating it caused the critical error, you just need to deactivate it (we will show you how to do that in the first step below).

On the other hand, if you are unsure what caused the error, you can simply follow these steps.

1. Deactivate All WordPress Plugins

A common cause of the WordPress critical error is plugin conflict or plugin incompatibility. To fix this, you just need to disable the faulty plugin by deactivating it.

However, due to the critical error, you won’t have access to the admin area (WordPress backend) or 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 web 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 the ‘Rename’ option.

Next, change the plugins folder name to anything you like. In our example, we will call it ‘plugins.deactivated’.

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 them and automatically sets them as deactivated.

You can now visit your website to see if the critical error message has disappeared.

Important: If the critical error issue has been resolved, remember to rename the plugins folder. WordPress will then recognize the folder, and you can reactivate the plugins one by one from the WordPress dashboard to identify which one caused the critical error.

For more details, see our tutorial on how to deactivate all WordPress plugins.

2. Switch to a Default Theme

The next step in troubleshooting the critical error is switching your WordPress theme to a default one. If some code in your current WordPress theme is causing the problem, this will fix the critical error.

Simply go to the WordPress.org theme directory and download a fresh copy of a default theme like Twenty Twenty-Two or Twenty Twenty-Three.

Download a default theme

Next, you need to unzip the theme file to your computer by clicking on ‘Extract All’.

This will create a folder with the theme name on your computer.

Extract theme files

Now, you need to connect to your WordPress site using an FTP client or the File Manager app in your hosting control panel.

Once you have connected, navigate to the /wp-content/themes folder, and you will see a list of all the themes installed on your website.

Download themes as backup

Go ahead and download all of these folders to your computer as a backup.

After that, you need to delete all the theme folders from your website.

Delete themes

Your WordPress site now doesn’t have a theme installed.

To fix this, upload the default theme folder you downloaded earlier.

Upload theme folder

Once this process has finished, you can try visiting your website.

If your WordPress theme caused the critical error, then the error message should have disappeared, and you will be able to access your website.

3. Reinstall WordPress

A corrupt WordPress core file or malware could also trigger a 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.

WordPress files

Next, connect to your WordPress site using an FTP client or the File Manager app in your hosting account’s dashboard or cPanel (control panel).

Once connected, navigate to the root folder of your website. This is the folder that contains the wp-admin, wp-content, wp-includes, and wp-admin folders.

Upload core WordPress files

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’.

Overwrite core files

Then, simply click on the ‘OK’ button to continue. Your FTP client will now replace your core WordPress files with fresh copies from your computer.

Once it has finished, you can try visiting your website to see if this resolves the error.

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

4. Turn On Debugging in WordPress

WordPress comes with a built-in debugging system that allows you to catch errors, save them in a log file, and troubleshoot issues.

To turn it on, you need to enable debug mode by editing the wp-config.php file. Just locate the following line:

define( 'WP_DEBUG', false );

Now, go ahead and replace this line with the following code:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', true );
define( 'WP_DEBUG_LOG', true );
define( 'SCRIPT_DEBUG', true );

If you visit your WordPress website now, it will show you debugging information and the critical error message.

Debug critical error

Debug mode not only shows PHP errors but warnings and notices, too. This helps you find out what is causing the problem so that you can fix it.

It will also save error logs in the debug.log file and save the file in the /wp-content/ folder.

5. Increase PHP Memory Limit

Your hosting web server is like any other computer. It needs memory to efficiently run multiple applications at the same time.

If your server doesn’t have enough resources to run PHP, then it may crash or become unresponsive. This could trigger a critical error in WordPress.

To fix this, you can increase the PHP memory limit by telling your hosting server to use more memory for PHP.

You can do that by entering the following line into your wp-config.php file:

define( 'WP_MEMORY_LIMIT', '512M' );

Don’t forget to save and upload your changes to the server.

For more details, you can see our tutorial on how to increase the PHP memory limit in WordPress.

Now, you can try visiting your website to see if this has resolved the critical error.

6. Upgrade Your PHP Version

WordPress requires PHP version 7.4 or greater. If your WordPress hosting server uses an older version of PHP, it may not work well and cause a critical error.

If you have access to the WordPress recovery mode, you can see which PHP version your site is using by visiting the Tools » Site Health page and switching to the Info tab.

How to check the PHP version on your WordPress website

From here, scroll down to the Server section and click to expand it.

There, you will see the PHP version installed on your hosting server.

Find PHP version

If it is lower than 7.4, then you need to update the PHP version.

Most good WordPress hosting companies allow you to easily do that from your hosting account control panel. For details, please see our article on how to update your PHP version on popular WordPress hosting providers.

7. Hire Someone to Fix The Error

Expert Tip: If all else fails and you are unable to fix the error, then you can consider hiring WPBeginner’s Premium WordPress Support service. For a small one-time fee, our team of WordPress engineers will fix the error for you quickly and safely.

How to Avoid the ‘Critical Error’ in the Future

WordPress is an open-source system built with very high standards. However, sometimes code conflicts can still trigger errors.

Here are a few things you can do to ensure it doesn’t cause downtime for your website and customers.

1. Always Have Automated Backups

Backups are the best security against common WordPress errors. They also come in handy if your website is hacked or affected by malware.

We recommend using Duplicator. It allows you to easily set up automated backups and store them securely on the cloud. More importantly, it lets you restore your website from the backup with one click.

Is Duplicator the right backup and migration plugin for you?

Note: A free version called Duplicator Lite is also available with fewer features.

We use Duplicator on WPBeginner and most of our websites. See our full Duplicator review for more details.

Next time you make a big change to your website, such as installing a new plugin, switching themes, or adding a custom code snippet, make sure to create a quick on-demand backup as a precaution.

2. Ensure WordPress Email Deliverability

In many cases, WordPress will try to send you an email with a link to the recovery mode. If you get this email, you will be able to fix the critical error more quickly and efficiently.

Unfortunately, we have seen many WordPress websites with non-working email functionality, and the site owners were not even aware of it.

You don’t just need emails to fix the critical error. You also need them to recover passwords, new user registration, and other important WordPress notifications.

Luckily, there is an easy fix available called WP Mail SMTP. It lets you fix WordPress email issues by sending WordPress emails through proper authentication.

WP Mail SMTP

Note: There is also a free version available called WP Mail SMTP Lite.

We use WP Mail SMTP on all our websites to ensure our users and team members never miss a crucial email. To learn more, check our WP Mail SMTP review.

We have a step-by-step guide on how to set up WP Mail SMTP on any WordPress hosting platform.

3. Manage Custom Code Snippets Safely

You may occasionally encounter tutorials asking you to add custom code to your WordPress site. Most users end up adding those snippets to their theme’s functions.php file.

Now, if there is a mistake in the code, your website will immediately become inaccessible, showing a critical error.

Luckily, there is a safer way to add code using the WPCode plugin. It is a WordPress code snippet plugin manager that makes it easy to add custom code to your site. More importantly, it comes with built-in checks that automatically disable a code if it causes any errors.

WPCode

Note: There is also a free version available called WPCode lite.

We use WPCode on our websites and have found its code library feature particularly helpful. It has a ton of code snippets for many useful functionalities. To learn more, take a look at our detailed WPCode review.

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 fix WordPress stuck in maintenance mode or our guide on how to contact WordPress support.

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. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

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

63 CommentsLeave a Reply

  1. Jiří Vaněk

    Since I often deal with a broken WordPress without access to email or recovery mode, step two is incredibly valuable and worth studying. Finding the issue can sometimes feel like detective work, and it requires a lot of patience. Tutorials like this are a treasure in such moments, and having a guide on where to start is priceless. I’ve already used this method from the tutorial several times, and each time I eventually managed to find the problem with the plugin. Thank you so much, because skills like these are incredibly useful, and it’s good to know these basics. They save many sleepless nights.

  2. Daniel

    Thanks a lot, you saved my day

    Accessed via terminal then renamed the plugins folder, then back to the original name and found the one causing the issue.

    Thanks again!

    • WPBeginner Support

      You’re welcome, glad our guide was helpful!

      Admin

  3. Benjamin

    First just go in and manually update your plugins one by one. That worked for me.

    • WPBeginner Support

      It will not always allow you to log into your site but updating plugins can help with fixing the error.

      Admin

  4. Daniel Okeke

    Thank you very much. It worked for me. I was so scared when I saw the error, but your post guided me step by step. I really appreciate.

  5. Abdulrazaq Imam

    WP Beginner always to the rescue!

  6. Andrew

    Thanks so much for this! I was lost… updated plugins and my site went down. Didn’t get an email from Wordpress. I followed your instructions to deactivate plugins to find the offender. Success! My site is back up and running.

    • WPBeginner Support

      Glad to hear our guide was able to help! :)

      Admin

  7. Elliot Walker

    Thanks for the guide. Do you know if there is a tool to monitor and notify me if my site has a Wordpress error like this? Can an UpTime monitor tell if a page is not navigable and is displaying such messages?

  8. rahul

    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.

    • WPBeginner Support

      Your hosting provider may have customized their file manager. You would want to try right-clicking the file or reaching out to your hosting provider and they should be able to assist!

      Admin

  9. AhmanPg

    Updating to the newest PHP versions often resolves the issue, since some new plugin updates wont work with older PHP vers

    • WPBeginner Support

      Not always, sometimes a plugin or theme may not be set up to work with the newest version of PHP but that can help in some situations :)

      Admin

  10. Bert Beckers

    I’m having this issue on a multisite install. After deleting some outdated (and unsupported) plugins, suddently one of my sites showed this error. Is there any way to get into the admin panel without the automated email?

    • WPBeginner Support

      You would want to take a look at the second method in this guide for troubleshooting without the email.

      Admin

  11. Keith

    This post is still really helpful. LIFE SAVER! Removing and re-introducing the plugins worked! Thanks so much for providing this information.

    • WPBeginner Support

      Glad our guide helped :)

      Admin

  12. saad

    thank you so much

    • WPBeginner Support

      You’re welcome!

      Admin

  13. Marie

    I get this error on one page only. When a WPforms form is submitted. I’ve done everything on this page and still get the error on that one page. The form does actually work despite users getting this error

    • WPBeginner Support

      We would recommend reaching out to WPForms’ support directly if that is the plugin causing the error and they can help troubleshoot the error.

      Admin

  14. Anu

    Thank you so much. It was very helpful.

    • WPBeginner Support

      Glad our guide was helpful!

      Admin

  15. Mel

    I am working on a test site for the company I work for. I got the critical error message but no email. I can’t figure out how to get back on my site to fix it as all I see is the message itself. Thank you!

    • WPBeginner Support

      The manual method from this article should help you with how to handle it :)

      Admin

  16. Herbert Thiel

    Thank you so much for being here. It seems whenever I have an issue and I Google it I wind up here to get the right (helpful) answer. So now I come here first.

    • WPBeginner Support

      Glad our articles have helped and we hope you continue to find our guides helpful :)

      Admin

  17. Paul

    This is an excellent tutorial and enabled me to get my ancient website up and running again – caused by out of date plugins. Thank you so much.

    • WPBeginner Support

      Glad our guide could help you get up and running again!

      Admin

  18. Carlos Rodriguez

    Thanks for this article, it was very helpful, WP should send this link rather than the one they send on a critical error link they send.

    Cheers!

    • WPBeginner Support

      You’re welcome! Glad our guide could help and maybe one day :)

      Admin

  19. Lynda

    I am so very happy that I found this resource page. It was really helpful and saved me from paying someone to fix the issue. I followed the instructions under “Manually (Without Email)”. Use my host site to make the changes to the plugins folder as per the instructions and IT WORKS!!!
    THANK YOU SO MUCH!

    • WPBeginner Support

      Thank you for your thanks and glad to hear our guide could help!

      Admin

  20. Abby

    Thanks for this, really helpful. I deleted the plugin using the manual method, renaming the plugin folder, saving me a ton of time!

    • WPBeginner Support

      You’re welcome! Glad to hear our recommendation helped!

      Admin

  21. Julio

    Thank you for the help, I appreciate that!

    • WPBeginner Support

      You’re welcome!

      Admin

  22. Rob Mccolley

    In item #3 above, there’s no step-by-step for the File Manager method of reinstalling WordPress.

    You write that either FTP or File Manager can be used, but offer steps for FTP only. Did I miss something?

    Thanks.

    • WPBeginner Support

      The file manager varies between hosting providers which is why we do not have a detailed guide on how to use it at the moment. If you check with your hosting provider they should be able to assist you :)

      Admin

  23. Sudeep

    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

    • WPBeginner Support

      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

      • Sudeep

        Okay. Thanks. Will do that

  24. RAGHUL DHARMARAJAN

    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.

    • WPBeginner Support

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

      Admin

  25. Sumit Sharma

    Thanks a ton for this post. Keep up the great work.

    • WPBeginner Support

      Glad our guide was helpful!

      Admin

  26. Carly

    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.

    • WPBeginner Support

      Glad our guide could help you solve this error!

      Admin

  27. Craig

    Thank you so much – your article was brilliantly clear & saved lots of stress!

    • WPBeginner Support

      Glad our article was helpful!

      Admin

  28. Margaret agard

    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!

    • WPBeginner Support

      Happy to hear our guide could help and hope you slept well! :)

      Admin

  29. Jamesetta

    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.

    • WPBeginner Support

      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

  30. Stefanie

    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

    • WPBeginner Support

      Glad our guide could help!

      Admin

  31. Dennis

    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 :-).

    • WPBeginner Support

      Glad our guide was able to help :)

      Admin

  32. momin

    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?

  33. Christine

    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.