Skip to content
Back to all guides

WordPress

How to Fix "There has been a critical error on your website."

Have you just opened your WordPress site to suddenly find "There has been a critical error on your website. Learn more about debugging in WordPress."? Even though this might be terrifying, your site isn't lost and there is hope left still!

The Snappyhost team Updated 4 min read
How to Fix "There has been a critical error on your website."

Have you just opened your WordPress site to suddenly find "There has been a critical error on your website. Learn more about debugging in WordPress." even though this might be terrifying, to say the least, your site isn't lost and there is hope left still!

We will be discussing the error in more detail and troubleshooting to fix the error message and prevent it from happening again in the future.

What does "There has been a critical error on your website." mean?

Somewhat similar to the blue screen of death with Windows (Yes, that annoying error sigh), well, WordPress has implemented their own version of this, which we refer to as the white screen of death. The thought alone is scary. The premise of waking up in the morning, making a fresh brew, starting the day by blogging to open your WordPress site, and low and behold "There has been a critical error". The critical error is usually caused by a faulty plugin or theme.

How to Fix the WordPress Error "There has been a critical error on your website" issue

The most obvious and straightforward solution is to restore your website to the previous working version. In order to do that, you need to make sure that your hosting does come with backups provided, but not everyone does. Every Snappyhost WordPress plan includes daily off-site backups you can restore in a couple of clicks.

Let's work from the premise that you don't have backups and you're probably wondering, what do I do? - Well, we're going to discuss the next steps of diagnosing the critical error.

Enabling WordPress Debugging

The most overlooked but simple diagnosis which in my experience of working with WordPress is enabling WordPress debugging. Enabling WordPress debugging will give us a more detailed error as to what could be triggering the critical error message.

To enable WordPress Debugging on your website follow these steps (For cPanel users)

  1. Manage your hosting through cPanel and go to 'File Manager'.
  2. Navigate to the public_html directory. This is where your WordPress installation will typically be, if you have set-up a custom directory path, then switch to the respective directory.
  3. Open/edit the wp-config.php file and looks for the following line 'define('WP_DEBUG', false)' by default this should be set to false. Update this so it reads the following instead 'define('WP_DEBUG', true)' and select save. If for whatever reason this line is not currently in your wp-config.php file, then feel free to add the snippet in.

If you have successfully followed the above steps then congratulations! You have enabled WordPress debugging on your site and we can now get a bit more information to work with.

OK, say the error we have now got is down to a plugin or theme you have active on your site. What are the next steps in fixing the problem?

We'll go over both theme and plugin troubleshooting and hopefully get you back up in running in no time!

Theme Conflict Troubleshooting

In order to disable the theme navigate to the following directory path (This may be different depending on your set-up) 'public_html/wp-content/themes/' - when you're in the aforementioned directory, you should see a list of current themes on your WordPress site. To disable one of the themes, you will need to rename the folder to include DISABLE at the end of the file name (Show in the example below)

Upon doing that, go back to your WordPress site and refresh, you should now no longer be seeing the critical error.

Plugin Conflict Troubleshooting

If it's not the theme, but a plugin issue. Just like the theme troubleshooting, this is similar. If we know the plugin in question we can simply rename the plugin to turn it off. In order to do this, navigate to the 'public_html/wp-content/plugins/' folder and re-name the plugin.

For example, if we know the critical error is caused by wordfence, we can rename this to wordfenceOLD. It's important to note that by disabling the plugin, you won't lose any of your previous settings.

The plugin should now be disabled! If you re-visit your site and refresh, hopefully, the error has gone.

Summary

We hope this blog post finds you well and offers a glimmer of hope in fixing your WordPress critical error. If for whatever reason none of the above has worked, you will need to contact your web host and their support team should be able to shed more light on the issue.

Hosting that keeps up

Fast UK WordPress hosting, managed for you.

LiteSpeed with LSCache, NVMe SSD, staging and daily backups, with free migration from your current host.

Read enough? Let us run the hosting for you.

Move to your own fast, isolated UK hosting with free zero-downtime migration and a real support team behind it.

Rated Excellent by UK customers

Rated Excellent on Trustpilot Excellent · 4.8 out of 5 · 84 reviews on Trustpilot

Super helpful team and always provide a five-star service. Can't recommend using them enough.

Riley Williams Trustpilot

Fantastic support. Great speed at unbelievable value.

Ron Finnegan Trustpilot

Perfect services. Reliable. Top-notch customer support.

Miroslav Trustpilot

Snappy are great! They always fix our problems straightaway and without any fuss!

Anne Trustpilot

Snappy Host is terrific. Tom, Luke and Mark all went above and beyond to help me, and fixed an issue I had had for over two years. If you want fast, helpful service as well as lightning-fast websites, look no further.

Simon M Trustpilot

I must have tried every hosting company out there. Snappy Host has delivered on their promise with excellent speeds, excellent uptime and excellent UK support. I highly recommend them 100%.

Ian Barber Trustpilot

I can't rate the guys at Snappy Host highly enough. They go above and beyond to help, and I couldn't run my websites without them. Highly rated.

Customerroy charles Trustpilot

I have been a customer for several years. I recently had challenges putting my website live and was helped by Tom, whose professionalism and dedication exceeded my expectations. Snappy Host sets a high standard for excellence.

PDA Trustpilot

Snappyhost are first rate. Their service is both professional and yet also personable. You know you are talking to people who know what they are doing, and they have always been on hand when we have needed advice.

Castle Steel Buildings Trustpilot

SnappyHost support is consistently great. I have used them to host my website, which has grown substantially over the years. My site is really fast thanks to the tools they installed, and whenever there is an issue they sort it out. Amazing service.

The Professional Traveller Trustpilot

Our agency manages a number of sites for clients, so we need an efficient, easy-to-use platform. The team have been super helpful through set-up and migrations, all for an unbeatable price.

Josh Trustpilot

Absolutely excellent company that goes above and beyond, and have always helped me virtually instantly when I have needed them.

DJ Eclypse Trustpilot

I have found the team at Snappy Host to be very helpful. A quick chat message or email and they are on the ball resolving any issues. No long, complicated process to reach them.

Segilola Salami Trustpilot

Moved to Snappy Host from Heart, and it was the best decision I have ever made! Really supportive and helpful team who helped me get my emails set up for all my customers with no hassle. 10/10.

Duncan Matthews Trustpilot

I moved all my services to SnappyHost after a terrible experience with UK2. I can't fault them: great service, very reliable, good prices. Highly recommended.

MarkZ Trustpilot

Snappy Host provide hosting with fantastic and friendly support. The range of services is great and their support is quick and helpful. I have many sites with Snappy.

Simon Clay Trustpilot