fbpx

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.

Fix Wp Critical Error Og

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.

Wp Criticial 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.

Critical Error Wp Email

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 Wp Email

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

Critical Error Details Plugin Wpemail

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.

Loginwp Recoverymode

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.

Recoverymode Info

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

Brokentheme

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.

Exitrecoverymode

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.

Renamepluginsfolder

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

Plugindeactivatefolder

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.

Downloaddefaulttheme

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

Themefolderunzipped

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.

Downloadthemes

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 Themes

Your WordPress site now has no theme installed. To fix this, go ahead and upload the default theme folder you downloaded earlier.

Uploaddefaulttheme

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.

Wpfolder

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.

Uploadwpfiles

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.

Overwritewpfiles

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.



[ad_2]

Source link

Digital Strategy Consultants (DSC) © 2019 - 2024 All Rights Reserved|About Us|Privacy Policy

Refund Policy|Terms & Condition|Blog|Sitemap