How to Fix “There Has Been a Critical Error on Your Website” WordPress Errors

When you’re cruising along, managing your WordPress site with ease, hitting a major snag like the “There Has Been a Critical Error on Your Website” message can feel like a sudden stop.

This error, akin to the dreaded White Screen of Death from earlier WordPress versions, essentially halts your website in its tracks, replacing your content with a critical error message or a blank page.

The there has been a critical error on this website error message.

So, what’s behind this sudden stop sign on your digital highway?

Understanding the “There Has Been a Critical Error on Your Website” in WordPress

At its core, the critical error in WordPress signals a significant problem that prevents the platform from loading essential scripts. This malfunction can stem from various sources, primarily linked to PHP issues.

PHP, the scripting language that powers WordPress, is crucial for your website’s functionality. When something goes wrong with PHP, whether due to a coding error, a plugin or theme issue, or even a memory limit being exceeded, WordPress can’t proceed as normal.

Common culprits behind this error

The critical error message in WordPress is essentially a distress signal, indicating that the website’s PHP code has encountered a fatal issue it cannot recover from.

This error can spring from several sources, which may involve core WordPress files, plugins, themes, or even external factors like hosting environment limitations.

Here’s a more detailed look at these potential culprits:

PHP Memory Limit: One of the most frequent triggers for this error is exceeding your PHP memory limit. WordPress requires a certain amount of memory to run smoothly, and if your site demands more than what’s available, it hits a wall.

Plugin or Theme Conflicts: Plugins and themes enhance your site but can sometimes conflict with each other or the WordPress core, leading to critical errors. This is especially true if they are not kept up-to-date with the latest WordPress versions.

Coding Errors: Custom code additions or modifications can introduce errors. If you’ve recently added or tweaked code on your site, this could be the root of the problem.

Database Issues: Although less common, database corruption can also result in a critical error message, as WordPress relies heavily on its database to store and retrieve content.

Although the error message might not provide much guidance, understanding the underlying issues can significantly simplify the troubleshooting process. It’s also beneficial to be aware of other common WordPress errors, as they may occur concurrently:

  • ERR_CONNECTION_TIMED_OUT: This occurs when the web server is too slow or overwhelmed.
  • ERR_CACHE_MISS: Encounter this? It’s time to check your site’s cache or PHP tools like plugins, which are often to blame.
  • 500 Internal Server Error: Typically, this serious issue can be traced back to corruption in server files.
  • Error Establishing a Database Connection: This suggests there’s either corruption in your database or an issue with the database server itself.
  • HTTP 503 Service Unavailable: A clear sign there’s a problem with your server.
  • HTTP 502 Bad Gateway: Often a result of your server being overloaded by too much traffic.
  • White Screen of Death (WSOD): A completely blank screen, often without any error message, indicating a PHP or database error.
  • 504 Gateway Timeout Error: This occurs when your server doesn’t receive a timely response from another server it was accessing while attempting to load your site.
  • 403 Forbidden Error: Indicates that server permissions are preventing access to a page or resource on your site.

Should you encounter any other unusual errors, it’s a good idea to check out the specific HTTP code the error produces.

Understanding these potential causes and associated errors is crucial for diagnosing and resolving the critical error message. With this knowledge, you can approach troubleshooting with a clearer direction, whether it’s deactivating plugins, switching themes, increasing PHP memory limits, or consulting with your hosting provider. The goal is always to restore your site’s functionality while minimizing downtime and ensuring a smooth experience for your visitors.

Beyond the error message

Since WordPress 5.2, the platform attempts to be more helpful by sending an admin email with details about the issue and instructions for entering recovery mode. This recovery mode allows you to troubleshoot by deactivating plugins or themes suspected of causing the error. However, if WordPress can’t send this email, you’re left with the generic error message, which can be more puzzling.

Steps to resolve the “There Has Been a Critical Error on Your Website error”

Dealing with this error involves a bit of detective work and patience. How you’ll proceed depends on if you receive an email at the site’s admin email address. Start by checking that first.

Check Your Email

WordPress is helpful in that it sometimes sends an email to the admin address with details about the error and a link to access your site’s admin in recovery mode. This can often give you a head start in diagnosing the issue.

Depending on what caused the error, it’s possible you may not see an instruction to check your email. In that case, it may be that your site’s not able to load the files it needs to send the email or access recovery mode.

Receiving an email is also dependent on your WordPress site being set up to send emails with SMTP. In that case, you may see a message instructing you to check your email even though no email was sent.

How to Fix the Critical Error in WordPress (with and without the email)

Whether you’ve received a helpful email from WordPress or you’re flying blind, there are ways to get your website back on course.

Fixing the critical error with the WordPress debugging email

Upon receiving the “Your Site is Experiencing a Technical Issue” email, your first step is to check your admin email inbox. The email provides a treasure map to the source of the error, often highlighting a problematic plugin or theme. For a more hands-on approach, it offers a unique link to enter WordPress in recovery mode, where you can safely diagnose and treat the issue.

  1. First, locate the email from WordPress with the subject “Your Site is Experiencing a Technical Issue.” This email is sent to the admin email address you provided during WordPress setup.
  2. Read through the email to find specifics about the error, including which plugin or theme might be causing it.
  3. Click on the unique link provided in the email to enter recovery mode on your website. This link bypasses the critical error to let you access the admin dashboard.

Recovery Mode

Once in recovery mode, WordPress will guide you to the heart of the problem, whether it be a rogue plugin or a theme gone awry. Check near the top of the dashboard for messages about what went wrong and how to set things right again.

If it’s a plugin causing turmoil, deactivating it may be your best bet. Don’t worry, you can always seek support from the plugin’s developers or find an alternative solution.

For theme-related issues, switching to a different theme or reinstalling a fresh copy might just do the trick. Remember to exit recovery mode with the red link at the page’s top once you’ve made the necessary fixes.

  1. Click the link in the email and log in at the prompt.
  2. Once logged in, WordPress will notify you of the error’s cause and provide links to the plugins or themes page where the issue originated.
  3. If a plugin is the issue, click on the provided link to navigate to your plugins page, find the problematic plugin, and deactivate it.
  4. If a theme is at fault, you’ll be directed to the themes page. You may need to switch to a default theme or delete and reinstall the problematic theme.
  5. After addressing the issue, click on ‘Exit Recovery Mode’ at the top of your dashboard.

Fixing the critical error in WordPress manually (without email)

You can still fix this without the email. You’ll need to have access to the website’s files and possibly the hosting control panel.

Step 1: Deactivate all WordPress plugins

Plugins and themes are often at the heart of this error. By deactivating all plugins (using FTP if necessary) and switching to a default theme, you can test if the site works again. If it does, reactivate each one by one to find the offender.

Since accessing the admin area might not be an option, use an FTP client or your hosting control panel’s File Manager to navigate to the `wp-content/plugins` folder.

Simply rename the folder to something like `plugins.deactivated` to trick WordPress into deactivating all plugins.

If this maneuver resolves the error, don’t forget to rename the folder back and reactivate the plugins one by one to identify the troublemaker.

  1. Use an FTP client like FileZilla or the File Manager in your hosting control panel to access your website files.
  2. Go to wp-content/plugins.
  3. Right-click on the plugins folder and rename it to something like plugins_deactivated. This deactivates all plugins.
  4. Visit your website to see if the critical error is resolved. If it is, the issue was with one of the plugins.
  5. Rename the folder back to plugins and then reactivate each plugin one by one in your WordPress dashboard to identify which one causes the error.

Step 2: Switch to a default theme

Sometimes, the error springs from your active theme. Download a default WordPress theme (like Twenty Twenty-Two), unzip it, and upload it to `wp-content/themes` via FTP or File Manager. If changing the theme resolves the error, you’ve found your culprit. You can then either stick with the default theme or attempt to fix the original theme.

  1. Go to the WordPress theme directory and download a default theme (e.g., Twenty Twenty-Four).
    Setting a default theme in the WP admin can help troubleshoot the there has been a critical error on this website error.
  2. Unzip the theme on your computer and upload it to wp-content/themes using FTP or File Manager.
  3. Access your WordPress dashboard. If you can’t, WordPress will automatically switch to the default theme if your current theme is missing.
  4. If switching the theme fixes the error, the problem was with your theme.

Step 3: Reinstall WordPress

If the error persists, it might be time to consider a corrupt WordPress core file or malware as the cause. Download a fresh copy of WordPress, unzip it, and use FTP or File Manager to upload the new files, overwriting the old ones. This step can potentially eliminate any corrupted files or sneaky malware that’s causing the error.

  1. Get the latest version from WordPress.org and unzip it on your computer.
  2. Use FTP or File Manager to upload the new WordPress files to your website’s root directory, overwriting the existing files.
  3. Visit your website to see if the issue is resolved.

Step 4: Turn on debugging in WordPress

Activating WordPress’s debugging mode can shine a light on the specific error messages that are causing your site to stumble. This requires adding a few lines to your `wp-config.php` file.

A portion of the wp-config file showing the define(WP_DEBUG true) line added with a text editor

However, the effort can be invaluable in pinpointing the culprit.

  1. Using FTP or File Manager, locate and edit the wp-config.php file in your website’s root directory.
  2. Add the following lines just above the “That’s all, stop editing!” line:
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
  3. Errors will now be logged to wp-content/debug.log. Review this file for clues about the error.

Step 5: Increase PHP memory limit

A lack of memory can lead to critical errors. By adding a line in your `wp-config.php` file, you can increase the PHP memory limit, giving your website more breathing room to operate smoothly.

  1. Open your wp-config.php file again.
  2. Add the following line above the “That’s all, stop editing!” line:
    define('WP_MEMORY_LIMIT', '256M');
  3. Save your changes and upload the file back to your server.

Step 6: Upgrade your PHP version

Ensure your site runs on at least PHP version 7.4. An outdated PHP version can be a silent killer, leading to unexpected errors. Most hosting providers offer an easy way to update your PHP version through the hosting control panel. For example, at 10Web:

  1. Log in to your 10Web dashboard.
  2. Click Manage on the site you’d change to change the PHP version.
  3. Click Hosting Services > Tools.
  4. Select the desired Version from the drop down menu in the PHP version section.
  5. Confirm the selection.
  6. Test the site for compatibility.

Prevention tips

After resolving the critical error, adopting a few preventive measures can help avoid future occurrences. Keeping plugins, themes, and WordPress itself updated is essential. Additionally, using a quality hosting service that offers robust resources and excellent support can make a world of difference. Regular backups are also your safety net; ensure you have a reliable backup solution in place.

Wrapping up

The “There Has Been a Critical Error on Your Website” message is daunting but not insurmountable. By methodically addressing potential causes like memory limits, plugin and theme conflicts, and coding errors, you can steer your WordPress site back to smooth sailing. Remember, the key to a healthy website is regular maintenance and being prepared to troubleshoot when the unexpected happens.

Did any of these troubleshooting steps help you determine what caused your site to go down? Let us know in the comments!

Say goodbye to website errors

Share article

Leave a comment

Your email address will not be published. Required fields are marked *

Your email address will never be published or shared. Required fields are marked *

Comment*

Name *