Hey ${desensitizationEmail}, to make sure your account security, please verify your email address here. Verify Email
For your account security, please link your email. Verify Email

${articleTitle}

How to Fix the Critical Error in WordPress

261 10 mins article
Date Created: Aug. 16, 2022 14:23:04 Last Edited: Aug. 11, 2023 06:42:35

This tutorial aims to teach you how to fix critical errors in WordPress.

The critical error message itself is not very useful for finding the cause of the problem and fixing it. Fortunately, WordPress also sends an email to your site's admin email address.

Many WordPress sites now have issues sending emails, so you may not receive this important email notification. If you are one of these users, don't worry. We'll show you how to fix critical errors without email.

On the other hand, if you do receive an email notification for a technical WordPress issue, then we'll show you how to understand it and use it to restore your site.

Method 1: Fix Critical Errors with WordPress Debug Emails

Method 2: Manually Fix Critical Errors in WordPress

 

1. Fix Critical Errors with WordPress Debug Emails

First, you need to access the inbox of the email address you use as your WordPress admin email on your website.

Not sure which email address you use as your admin email? This is the email address you provided when you installed WordPress.

In your inbox, you'll see an email with the subject "Your site is experiencing technical problems. " In it, you will find more useful information on what causes serious errors on your WordPress site.

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

The email also includes a special link that allows you to log into the WordPress website in recovery mode to fix and investigate the problem.

At the bottom of the email, you'll see more details about the error, including the specific file and code that triggered it.

In the example below, some code on line 614 in our theme's functions.php file is responsible for triggering the error.

 

Here is another example that shows error details caused by a malfunctioning WordPress plugin.

 

Now you just need to click on the link for WordPress Recovery Mode, which will take you to your WordPress admin area.

You will be asked to log in to continue.

After logging in, you will see a notification informing you about the critical error, what caused the error, and a link to where to fix the error.

For example, the screenshot below notifies us of a critical error caused by the plugin with a link to the plugin's page.

 

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

You can go ahead and disable the plugin now.

Then you can simply find an alternative WordPress plugin, or see if you can get support from the plugin developer.

Again, if the question is about your topic, you'll see a link to the Topics page. At the bottom of the page, you can see the topic causing the problem.

In most cases, your WordPress site will now start working fine.

However, if you are still seeing critical errors in WordPress, then you can try the troubleshooting steps in the next step.

 

2. Manually fix critical errors in WordPress

If you don't receive the WordPress critical issue notification email, here are some ways you can troubleshoot and fix critical errors in WordPress.

If the error was caused by a recent action you took, you can simply undo the action and the problem will be resolved.

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

On the other hand, if you are not sure, then you can just follow the steps below.

a. Disable all WordPress plugins

The easiest way to disable a faulty WordPress plugin is to deactivate it. However, due to a critical error, you do not have access to the admin area and do not know which plugin to deactivate.

To fix this, we will deactivate all WordPress plugins. Don't worry, once you have access to your WordPress admin area, you can easily reactivate them.

Simply connect to your WordPress site 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.

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

Next, change the name of the plugins folder to whatever you like. In our example, we'll call it "plugins.deactivate".

After doing this, all your plugins will be disabled.

Basically, WordPress looks in the plugins folder to load activated plugins on your website. When it can't find the plugins folder, it can't activate plugins at all and automatically sets them to deactivate.

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

Note: Don't forget to rename the plugins.deactivated folder back to "plugins", whether or not the critical bug has been resolved. WordPress will then recognize the folder and you will be able to reactivate them one by one from the WordPress dashboard so you can determine which folder is causing the critical error.

b. Switch to the default theme

The next step in fixing the critical error is to switch the WordPress theme to the default one. If it is caused by some code in the current WordPress theme, this will fix the critical error problem.

Just go to the WordPress.org theme directory and download a fresh copy of the official default theme for 2020 or 2021.

 

Next, you need to extract the theme files to your computer. This will create a folder with the subject name on your computer.

 

Now you need to connect to your WordPress site using an FTP client or the file manager application in your hosting control panel. Once connected, navigate to the /wp-content/themes folder and you will see a list of all the themes installed on the site.

 

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

 

Your WordPress site does not have a theme installed right now. To fix this, go ahead and upload the default theme folder you downloaded earlier.

 

Once done, you can try to visit your website.

If the critical error was caused by your WordPress theme, it should now be gone and you will be able to access your website.

c. Reinstall WordPress

Corrupted WordPress core files or malware can also trigger critical bugs in WordPress. The easiest way to fix this is to reinstall WordPress.

Just go to WordPress.org and download a fresh copy of WordPress to your computer. After downloading the file, you need to extract it to your computer. This will create a folder called "WordPress" with all the files needed for reinstallation.

 

Next, you need to connect to your WordPress site using an FTP client or the file manager application in your hosting control panel.

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

 

Now select WordPress the files in the folder and upload them to your website. Your FTP client will ask you if you want to overwrite these files or skip them. You need to select "Override" and check the box next to the "Always use this action" option.

Click the "OK" button to continue. Your FTP client will now replace all core WordPress files with fresh copies on your computer.

Once done, you can try visiting your website and see if that resolves the error.

If the key is caused by corrupt WordPress core files or malware, the error should now go away.

 

We hope this article helped you troubleshoot and fix critical bugs in WordPress.

You could also refer FAQ-Troubleshooting to get more information about how fixing errors.

With any uncertainties, please turn to our online agent.