Your Trusted Web Hosting Partner Since 2018

How to Fix the “There Has Been a Critical Error on This Website” in WordPress

How to Fix the “There Has Been a Critical Error on This Website” in WordPress

1 “There has been a critical error on this website” – not what you want to read when using WordPress, if you know what I mean. This message usually means something’s not quite right on your site, and it’s not loading properly. In this post we’ll explain which common errors may have caused this issue, and step-by-step how to fix each.

Understanding the Critical Error Message

Understand the error message before trying to resolve it. WordPress displays this notice when it encounters a fatal PHP error. This can result from several factors, among which may include incompatible plugins, themes, or even server issues.

Error Causes: The Error Related Common Causes

  • Plugin Conflicts: A badly or incompatibly coded plugin can create havoc with your functionality site.
  • Theme Issues: Using outdated or incompatible themes can throw critical errors.
  • PHP Version Incompatibility: Well, maybe your server is running an old version of PHP that is incompatible with your WordPress site.
  • Memory Limit Exhaustion: This error might result from your website overspending the allocated memory limit.
  • A corrupted .htaccess file can cause a host of other problems, and this error is no different.

Step-by-Step Solutions

1. Enable Debugging Mode

  • Before you start anything, enable WordPress debugging to get more information about the error.
  • Open the file at /wp-config.php in the root directory of your WordPress directory.
  • Find the line with define(‘WP_DEBUG’, false); and replace it with:
    This will log errors to a file named debug.log in the wp-content directory, and you can refer back to these without having them display to your users.
				
					define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
				
			

2. Disable All Plugins

By and large, malfunctioning plugins are causing it. Here’s how you can disable all of them:

  • Access your site via FTP or your hosting provider’s file manager.
  • Rename the folder named plugins to another folder named plugins_old within the directory wp-content.
  • Check your website. If you can view your site, that is on you – that is a problem with the plugin.

How to find the problematic plugin: rename the folder back to plugins and reactivate each plugin individually via the WordPress dashboard.

3. Switch to a Default Theme

If enabling/disabling plugins does not solve the problem, then it could be something to do with your theme.

  • Switch to the wp-content/themes directory.
  • Rename the active theme folder to something like mytheme_old.
  • WordPress will fall back to a default theme, probably Twenty Twenty-One or Twenty Twenty-Two.

Try out your site again. If that loads, then your theme is likely the one.

4. Boost PHP Memory Limit

Just in case your site is running out of memory, increase PHP memory limit.

  • Edit wp-config.php file.
  • Add the following line in place of the one that says: /* That’s all, stop editing! Happy blogging.
				
					define('WP_MEMORY_LIMIT', '256M');
				
			

5. PHP Version Test

Your server should be using a compatible PHP version. WordPress has recommended a PHP version of at least 7.4. As such, go through your hosting control panel and test for an update for the PHP version.

6. Reset the .htaccess File

A corrupted .htaccess file can also trigger this error. To reset it:
  • Rename the current .htaccess file to .htaccess_old.
  • Go to your WordPress dashboard, then Settings > Permalinks and click on ‘Save Changes’ to regenerate the .htaccess file.

7. Restore from Backup

For most people this would be the quickest fix, it will depend on how often you have a recent backup of your site. Most providers of hosting will have some backup solution, so check with them if unsure.

Conclusion

However frustrating it is to encounter the “There has been a critical error on this website” message, these troubleshooting steps should help you effectively find and solve the problem. Never forget to update your plugins, themes, and WordPress core as this often minimizes issues like one.

By following this guide, you’ll be back on track in no time, ensuring your WordPress site runs smoothly and efficiently.

Additional Tips for Prevention

  • Keep your themes and plugins updated.
  • Regularly back up your site.
  • Keep monitoring the performance and error logs of your website.

In case of a snag, look for your hosting provider or a professional developer who can bail you out. Happy blogging!

Subscribe to our Resources

Get latest industry news and updates

Scroll to Top