There is nothing more daunting than the message on your website reading, ‘There has been a critical error on this website’. Please check your site admin email inbox for instructions,’ including a link to the WordPress debugging guide. Every second that passes is driving away visitors as they encounter a blatant error screen. However, there might be cases when site owners do not receive the email and have to locate the issue by themselves.
Thankfully, resolving this critical error often involves a straightforward solution, such as adding a small PHP function or removing a problematic plugin. In this guide, we’ll walk you through these steps, as well as discuss the root causes of this error and how to prevent it from recurring.
What is the Critical Error in WordPress?
Critical Error is an error that stops WordPress from loading all the needed scripts to work perfectly.
Earlier, this WordPress error generated a white death screen or a fatal error message on the screen. Consequently, most beginners did not find it very helpful and struggled to fix the issue themselves.
Therefore, in recent versions of WordPress, users now see a generic error message saying, ‘There has been a critical error on this website.’ Please check your site admin email inbox for instructions, including a link to the WordPress debugging guide.
What Causes the Critical Error in WordPress?
The critical error in WordPress often stems from a PHP-related issue, such as a code, plugin, or theme error or a memory limit breach. A database connection issue is also possible.
If you have recently copied and pasted code snippets from a tutorial to your website, it may instigate a critical error.
A conflict with another WordPress plugin or custom code may also trigger the screen reading ‘There has been a critical error on this website’.
Now let’s look at how we can fix this error and get your site back.
How to Fix ‘There has been a critical error on this website’?
The critical error itself is not very effective for finding and fixing the issue’s cause. Fortunately, WordPress also sends an email to the admin email address of the website. Many WordPress sites are not configured to send mail using SMTP, due to, which they might not receive the mail despite WordPress telling them it has sent the mail.
On the other hand, several WordPress websites may encounter the message ‘There has been a critical error on this website’ without instructions to check the mail.
This is because WordPress was unable to load files it needed to load the files to make recovery mode available.
Fixing ‘There has been a Critical Error on this website’ With WordPress Debugging Email
First, check the inbox for the email address associated with your website’s WordPress administration.
Are you uncertain about the email address you used as the admin email? It is the email address you provided during the installation of WordPress.
If your site is hosted on Bluehost or if you used a WordPress auto-installer, your admin email address will be the same one you used for your WordPress hosting account.
Keep an eye on your inbox for an upcoming email titled “Your Site is Experiencing a Technical Issue.” This email will contain crucial information about the cause of the critical error on your WordPress website.
‘There has been a critical error on this website’ message on our test website was caused by the WordPress theme, as illustrated in the screenshot below.
The email includes a unique link that enables you to enter your WordPress website in recovery mode for investigating and fixing the issue.
The email contains detailed information about the error, including the specific file and code that triggered it at the bottom of the page.
The error in the example below is caused by the code on line 614 of our theme’s functions.php file.
Check out the example below demonstrating how a malfunctioning WordPress plugin can cause errors.
As indicated, the message highlights the plugin name and the specific line of code that is triggering the error.
Next, just click on the WordPress recovery mode link, which will direct you to your WordPress admin area.
You will then be asked to log in to continue.
Once you are logged in, you will receive a notification that explains the critical error and its cause and provides a link to the solution. For example, in the screenshot below, WordPress notifies us of a critical error caused by a plugin and offers a link to the Plugins page.
Clicking on the link will take you to the problematic plugin and show you the specific line of code that triggered the error.
To temporarily deactivate the plugin, click on “Deactivate”.
Then, you can search for a different WordPress plugin or contact the plugin developers for support. Similarly, if the problem is related to your theme, you will find a link to the Themes page.
At the bottom of the page, the problematic theme causing the issue will be indicated.
If you encounter a critical issue on your WordPress website because of a problematic theme, you can tackle this challenge in several ways.
You can change your WordPress theme or, alternatively, delete the broken theme and reinstall a fresh copy from the official source to see if that resolves the issue. Once you have addressed the issue, click the ‘Exit Recovery Mode’ button at the top.
In most cases, your WordPress website should start working normally. However, you can try the troubleshooting steps in the next section if you still see the critical error.
Fixing ‘There has been a Critical Error on this website’ Manually (Without Email)
If you have not received the email notification about ‘There has been a critical error on this website’ in WordPress, this guide will help you troubleshoot and resolve the critical error in WordPress.
If the error resulted from a recent action, you can undo that action to resolve the issue.
For instance, if you installed a new plugin and activating it caused a critical error, simply deactivate it (we will show you how to do that in the first step below).
On the other hand, if you’re not quite sure what led to the error, don’t worry! Just follow these steps.
1. Deactivate All WordPress Plugins
A common cause of the WordPress showing ‘There has been critical error on this website’ is plugin conflict or plugin incompatibility. To fix this, you just need to disable the faulty plugin by deactivating it. Here’s
If you face the critical error due to a plugin conflict or incompatibility, you can resolve it by deactivating the problematic plugin. However, if the error prevents access to the admin area, you won’t be able to identify the specific plugin causing the issue.
To address this, you can deactivate all WordPress plugins. You can easily reactivate them once you regain access to your WordPress admin area. Here are the steps:
Connect to your WordPress website using an FTP client or the File Manager app in your web hosting control panel.
Navigate to the wp-content folder.
Locate the ‘plugins’ folder within wp-content and rename it to something else, such as ‘plugins deactivated.’
By renaming the plugins folder, WordPress will not be able to activate any plugins, effectively deactivating them all. You can then check your website to see if the critical error message has been resolved.
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. Do not 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. 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 ‘There has been a critical error on this website’ message has disappeared.
Important: After resolving the critical error issue, remember to rename the ‘plugins’ folder. WordPress will then be able to recognize the folder, allowing you to reactivate the plugins one by one from the WordPress dashboard in order to identify the one that caused the critical error.
2. Switch to a Default Theme
To troubleshoot the critical error, consider switching your WordPress theme to a default one, as it could resolve the problem if the code causes the issue in your current theme.
1. Go to the WordPress.org theme directory and download a fresh copy of the default theme, such as Twenty Twenty-Two or Twenty Twenty-Three.
2. Unzip the theme file on your computer, which will create a folder with the theme name.
3. Connect to your WordPress site using an FTP client or the File Manager app in your hosting control panel.
4. Navigate to the /wp-content/themes folder and download all the theme folders to your computer as a backup.
5. Delete all the theme folders from your website. Your WordPress website now doesn’t have an installed theme.
6. Upload the default theme folder that you downloaded earlier.
7. Once the upload is completed, visit your website to check if the critical error has been resolved. This step confirms the success of the troubleshooting process.
If the critical error is caused by your WordPress theme, the error message will no longer appear, and you will be able to access your website.
3. Reinstall WordPress
If the page reading ‘There has been a critical error on this website’ occurs in WordPress, it could be due to a corrupt core file or malware. Fortunately, reinstalling WordPress is the most effective solution for fixing this issue.
- Head over to WordPress.org and make sure to download a fresh copy of WordPress onto your computer.
- After you download the file, unzip it on your computer. This will create a folder named ‘WordPress’ containing all the files needed for the reinstallation.
3. Further, connect to your WordPress site employing an FTP (File Transfer Protocol) client or the File Manager app in the hosting account’s dashboard or cPanel (control panel).
4. Once connected, go to your website’s main folder. This folder contains the wp-admin, wp-includes, wp-content, and wp-admin folders.
5. Navigate to WordPress folder on your computer, select the necessary files, and then transfer them to your website to bring your vision to life.
6. Your FTP client will prompt you to choose whether to overwrite these files or skip them. To overwrite, select the option ‘Overwrite’ and check the box labeled ‘Always use this action.”
7. Then, simply click the ‘OK’ button to proceed. Your FTP client will replace your core WordPress files with fresh copies from your computer.
Once you finish, visit your website to check if this resolves the error. If the critical error was triggered by a corrupt WordPress core file or malware, the error message should disappear now.
4. Turn On Debugging in WordPress
WordPress has a built-in debugging system that enables you to identify errors, save them in a log file, and troubleshoot any issues. To activate this feature, you will need to enable debug mode by editing the wp-config.php file. Simply locate the following line:
define( 'WP_DEBUG', false );
Now, replace the line with 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 display debugging information and the critical error message.
In debug mode, PHP errors, warnings, and notices are displayed, which helps identify the cause of the problem for fixing. Additionally, error logs are saved in the debug.log file, located in the /wp-content/ folder.
5. Increase PHP Memory Limit
Your web hosting server is similar to any other computer in that it requires memory to efficiently run multiple applications simultaneously.
If your server lacks the resources to run PHP, it may crash or become unresponsive, potentially leading to a ‘There has been a critical error on this website’ in WordPress.
To fix this issue, you can enhance the PHP memory limit by instructing your hosting server to allocate more memory for PHP. You can accomplish this by adding the following line to your wp-config.php file.
define( 'WP_MEMORY_LIMIT', '512M' );
Remember to save and upload your modifications to the server.
Now, why don’t you give your website a visit to check if this has fixed the critical error?
6. Upgrade Your PHP Version
WordPress requires PHP version 7.4 or higher. Using an older PHP version may cause critical errors on your hosting server.
If you can connect to the WordPress recovery mode, you can check the PHP version of your site by visiting the Tools » Site Health page and switching to the Info tab.
- Now, Scroll down to the Server section.
- Click to expand the Server section.
- Look for the PHP version information within the expanded Server section.
- If the version is lower than 7.4, you need to update it.
We trust that this article has assisted you in troubleshooting and resolving the critical error in WordPress.