Day: June 21, 2021

WordPress critical errorWordPress critical error

The critical error page is the white screen of death for WordPress. Troubleshooting is a bit complex in this scenario, as it involves debugging, understanding the logs, and working on cPanel. This guide is here to help make these things less complex for you to fix the issue conveniently.

Causes of this issue:

This error can occur after updating any plugins or themes. It is generally caused due to a conflict with one of these things.

Troubleshooting the issue:

1. Recovery link email:

When this error occurs, WordPress will send an email to the admin`s account containing the error log, which will help narrow down the root cause. You will then know which solution to try. (Don`t forget to check the spam folder as well.

BTW, if you are interested in WordPress maintenance services, click here now.

This email will also contain a recovery link to access your WordPress website in recovery mode.

A. Theme

If the error log mentioned anything about a theme causing the error, then try this method.

To check if the current theme is causing this issue, switch to a default theme. If the error is resolved after activating a new theme, then we know the problem lies in the theme you are using. So, find a compatible version of that theme or an alternative theme to work with.

If switching the themes didn’t solve the error, then try the plugins method.

B. Plugins

If the error log in the email says that it was caused due to one of your plugins, try this method.

If you know which plugin caused the error, then deactivate that plugin. If the error disappears after that, then find a compatible version of that plugin or an alternative for it.

If you don’t know which plugin caused the error, then you will have to check each plugin one by one to find the faulty piece.

If, due to some reason, you didn`t receive this email, you will have to troubleshoot the cause yourself. But don`t worry, it will take some extra effort, but this guide will help you with it.

Now, if you cannot access your WordPress account due to this error, you can solve the theme or plugin conflict using cPanel as mentioned below.

2. Conflicting Theme:

If you know that this error is caused due to a theme conflict and you cannot access your WordPress account, try this method to solve it through cPanel.

Using your cPanel account, locate your current theme folder (which will differ for each user) through this path: File Manager > public_html > wp_content > themes > YOUR-THEME. 

Rename the folder to something else like YOUR-THEME_OFF. Renaming the theme folder will deactivate the current theme. Now, when you access the website, it will load with a default theme and if the error disappears, then find a compatible version of this theme or an alternative theme to work with to fix it.

3. Conflicting Plugins:

If you know that the error is caused due to a plugin conflict and you cannot access your WordPress account, try this method.

Through your cPanel account, locate the plugins folder under this path: File Manager > public_html > wp_content. 

Rename the plugins folder to something like pluginsOFF. Doing this will deactivate all the plugins as WordPress will not be able to locate the plugins folder. Now when you load your website, if the error disappears, then it is confirmed that the issue is caused due to a conflicting plugin.

On the WordPress plugin page, it might display an error of the sort that plugins don’t exist. Now, again rename the pluginsOFF folder back to its original name plugins. On refreshing the website, you will see that the plugins are deactivated.

Now, activate each plugin one by one to find out which one is causing this error. Then find a compatible version of that plugin or an alternative plugin and replace the current plugin with it.

4. Debug:

When this error occurs, it displays the below message.

“There has been a critical error on your website. Please check your site admin email for instructions.

“Learn more about debugging in WordPress.”

From this message, you don’t get to know anything about the cause of the error. If you haven’t received the email, then you don’t have direct access to the error logs. So, debugging will help you find those logs. 

To debug WordPress, you need to go to your cPanel account and look for the wp_config.php file under this path: File Manager > public_html. You have to edit this config file and add the below-mentioned code before the line

/* That`s all, stop editing! Happy blogging. */

define (‘WP_DEBUG’, true);

define (‘WP_DEBUG_LOG’, true);

The WP_DEBUG is a constant which is set to false by default. As we need to turn on the debug mode, we will set this to true. WP_DEBUG_LOG is a constant which, when set to true along with the WP_DEBUG constant, will log the errors in a debug.log file.

So, the error logs will be stored in this file if you need to access them later. This log file can be found on under this path: File Manager > public_html > wp_content.

Now, when you load your WordPress website, the error logs will be displayed along with the error message. So, we can now find out whether the error was caused due to a plugin conflict or a theme conflict. Accordingly, follow the steps mentioned above to fix it.

After resolving this error, do not forget to remove the added code from the config file. Otherwise, it will keep displaying warnings and other errors on your website.

We hope that with this detailed guide and its easy-to-follow steps, you were able to fix this error without much trouble.