Author :
|
Published On :
October 1, 2025

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

October 1, 2025

Table of Contents

Share this blog
There Has Been a Critical Error on This Website

Oh no! When you open up your site, you view a scary message, not your homepage, but a message that says: There has been a critical error on this site. It seems like you were locked out of your online home. Don’t worry! This is a usual problem with WordPress users, and you can normally rectify it on your own.

Consider it as a light bulb in your home going off. That does not imply that the entire house is broken. All you have to do is locate the appropriate bulb and change it. This guide will assist you in finding that broken bulb on your website and repairing it step by step in extremely simple terms.

Let’s see how big WordPress is. It is not only you, there are millions of people using it daily.  

  • WordPress is used to build more than 43 percent of all sites on the internet. That’s almost half of the web!  
  • WordPress serves more than 810 million websites all over the world. That’s a massive community.  
  • Free plugins are available in excess of 60,000. These are the cool features that are added through these plugins and at times they may create problems, the reason why we are here.

This bug is also referred to as the White Screen of Death and occurs when an element of your webpage code fails. How to Fix “There has been a critical error on this website”. 

This tutorial will take you through the easiest and quickest methods of repairing this mistake and restoring your site online.

Common Causes of the “Critical Error” in WordPress

There Has Been a Critical Error on This Website

We should have a quick look at the typical cause of this problem before we dive into the process of fixing things. Being made aware of the cause can assist you in repairing it sooner and prevent its occurrence in the future.

This How to Fix ‘there has been a critical error on this website” is, most of the time, due to one of the following things: 

  • A Plugin Issue: This is the most widespread cause. You could have installed a new plugin, or an old one might be having a problem following an update. Plugins are applications on your phone. There are times when a single application may crash and create issues with the entire phone.  
  • An Issue with Your Theme: The theme of your site decides what your site looks like. Similar to plugins, a theme may contain a bug or may fail to be compatible with a new version of WordPress or another compatible plugin.  
  • Running Out of Memory: Your website requires some memory to execute, just like your computer. When a task demands excessive memory on your site, it may crash. This is termed a PHP memory limit problem.  
  • WordPress Core Files problems: WordPress core files, which are the files that enable WordPress to be functional, can be corrupted or damaged, particularly during an update.

And since we know the usual suspects, now we can begin our detective work and correct the problem. We will start with the simplest solutions.

Ways to Fix "There Has Been a Critical Error on This Website"

How to Fix “There has been a critical error on this website”. These are seven steps that you can undertake to resolve this error. Go through them sequentially, as in the case of Step 1 to Step 7. The solution to most people lies in the first few steps!

1. Enable WordPress Debug Mode

The initial thing to do is to request that WordPress provide further information on the error. WordPress simply displays an error message by default. However, as the owner of the website, you can enable a special debug mode, which will reveal the actual technical cause of the crash.  

Consider the following example: when your car breaks down, the dashboard may simply display a general engine problem light. The debug mode is akin to putting a computer into the car to be told in a detailed manner that the spark plug in cylinder number 3 is not functioning. It provides you with the precise information.

Step-by-Step: How to enable

In order to enable a mode of debugging, a file named wp-config.php is to be edited. This is a highly significant file of your WordPress set-up. It is located in the root of your site, which can be accessed with a utility known as a File Manager in the control panel of your hosting service (such as cPanel, or the hPanel of Hostinger) or via an FTP program such as FileZilla.  

There Has Been a Critical Error on This Website

You should log in to your hosting account and access the File Manager.  

There Has Been a Critical Error on This Website
  • Browse to the central folder in your website. This is typically referred to as public_html or your website name.  
There Has Been a Critical Error on This Website
  • Locate the file, wp-config.php. Right-click on it and select Edit.  
There Has Been a Critical Error on This Website
  • Keep on scrolling up until you get to a line that states:  /* That’s all, stop editing! Happy publishing. */
There Has Been a Critical Error on This Website

Let’s quickly see what these three lines do:

  •  define( ‘WP_DEBUG’, true ); – Enables debug mode.  
  •  define( ‘WP_DEBUG_LOG’, true); – WordPress is instructed to save all the details of errors in a special file which is really helpful.  
  •  define( ‘WP_DEBUG_DISPLAY’, false ); – It hides the errors to people who access your site, so they do not see the code on the screen. You can leave the errors in the log file.  
Save your modification to the wp-config.php file.

The use of debug logs to find the precise problem.  

  • You have now turned on the debug log. Now, go back to your website and refresh the page where you were seeing the critical error. WordPress shall write the details in a log file.  
  • The second step is to open the File Manager and check the folder of wp-content. We now have a new file named debug.log. Open this file.  

It might appear as incomprehensible code, but there is nothing to be concerned about. Look for clues. Read the final few lines of the file. The mistake message will normally provide details of which file is leading to the issue. A file path will frequently contain /plugins/ or /themes/.  

Here is one such example:

PHP Fatal error: function some-faulty-plugin redeclared in /home/yourwebsite/public_html/wp-content/plugins/some-faulty-plugin/ plugin-file.php on line 55.  

Look at that path! It even mentions the problem is in a folder named plugins and even mentions the name of the plugin: some-faulty-plugin. You see what it is that is giving you the trouble! 

Safety Tips

Always be sure to make a copy of your wp-config.php file before making any changes. You can do this by copying the file and renaming it as wp-config-backup.php.  

Note: You should switch off debug mode when you have resolved the issue. Turn around to the wp-config.php file and remove the lines you have inserted or replace true with false such as: define( ‘WP_DEBUG’, false); This matters in terms of security.  

In case the debug log indicated a particular plugin or theme, you could directly go to the following measures to resolve it. 

2. Deactivate Plugins via FTP or cPanel

There Has Been a Critical Error on This Website

As we have observed, the most important cause of the critical error is a faulty plugin. How to Fix “there has been a critical error on this website.” In case you are unable to log into your WordPress administration dashboard to disable the plugins in the usual manner, you can do it by hand through your hosting File Manager or FTP. This technique causes WordPress to disable all your extensions simultaneously.  

In case your site begins functioning after this, then you are certain that there was a problem with a plugin. And then you need to discover which one.

Here’s how to do it:  

  • Access your hosting File Manager or access your site via FTP.  
  • Go to the wp-content.  
  • This folder contains a folder called plugins.  
  • Rename this folder. Right-click the folders that contain the plugins and change the name to say such things as plugins old or deactivated.  

How to Fix “There has been a critical error on this website”. What does this do? You can rename the folder, and it will not be visible to WordPress. WordPress will search the folder of the plugins, and nothing will be found, and all the running plugins will be automatically turned off.  

Now, try to visit your website. If it loads, congratulations! You have established that there is a problem created by a plugin. 

So, what’s next? You should identify the affected specific plugin.

  • Return to your File Manager and change the name of the plugins_old to plugins. This will restore the folder, yet you will still have all your plugins turned off.  
  • Now, use your WordPress administration. Now you ought to have access to it.  
  • Go to the Plugins page. You will find that everything is switched off in all your plugins.  
  • Begin setting them on, one after the other. Install a plugin, go to your site, refresh the page, and check whether it is functional.  
  • Continue until your website collapses once again. The most recent plugin that was switched on is the one that is triggering the critical error.  

After locating the broken plugin, you can either delete it using the Plugins page or you can revert to the File Manager and delete the folder containing that particular plugin. Then you can find another plugin or find the developer of the plugin and ask him or her to help.

3. Switch to a Default Theme

There Has Been a Critical Error on This Website

In case the error was not solved by disabling the plugins, the second step is to check your website. The conflict between your theme, WordPress, or a plug-in may also lead to a critical error.

The easiest method of testing whether your theme is the source of the problem is to change to a default WordPress theme, like Twenty Twenty-Four or Twenty Twenty-Three. The WordPress team is the one that created these themes; thus, they are very stable and reliable.

Due to the fact that you cannot access your dashboard as an administrator, you will have to do this manually, as we did with the plugins.

The manual way to change the theme.

  • Access your website with your hosting File Manager or FTP client.
  • Navigate to the wp-content/themes. Within this folder, each theme that you have installed will have a folder.
  • Locate the theme that you are using.
  • Rename that folder. As an example, when your theme is called MyAwesomeTheme, you rename the folder MyAwesomeTheme_old.

WordPress will be alerted when you rename the folder because it will realize that the current theme is gone. It will automatically change to a default theme in case one is present. WordPress will always have a default theme, and this ought to be fine.

Visit your website now and reload the page. Should the site load, then you have discovered that the theme was the issue.

Theme Conflict Resolution

In case your theme was the cause, the following are some of the steps you can follow:

  • Update themes: When you have logged in to your WordPress administration account (after it is working), look for an update to your theme. An update might fix the bug.
  • Refer to the theme developer: You can inform the people who made the theme of the problem. They may fix it or provide you with a fix.
  • Check the theme files: When you have recently made changes to the functions.php file of your theme or any other file, a mistake in the code may be the reason. Attempt to undo the changes you have just made.
  • Select a new theme: In case you are unable to resolve the issue, you might have to select another theme to use on your site.
  • Switching back is easy: All you have to do is go back to the File Manager and rename the folder of your theme to its original name. It is possible to do this, but remember that this can restore the error.

4. Check PHP Version/PHP Setting

In case the problem is not with the plugins and themes, it is time to visit the server settings of your site. The PHP version and PHP memory limit are the two most vital to be checked.

What is PHP? Think of WordPress as a car. The WordPress files are the body, seats, and steering wheel of the vehicle. PHP is what drives the car. In case the engine is weak or very old, the vehicle will not perform well.

WordPress requires a recent version of PHP to operate efficiently and safely.

How to verify the PHP version from the hosting control panel:

Your hosting company should have a control panel that you can use to check and upgrade your PHP version. This is the general popular host guide:

There Has Been a Critical Error on This Website
  • On Hostinger: Log in to hPanel, and then Advanced PHP Configuration. You will be able to see your current PHP version and can switch it out of a dropdown.
  • On GoDaddy or Bluehost (using cPanel): Log in to your cPanel. Find an icon that should be named Multi PHP Manager or Select PHP Version. Here you will find your current version and have the option of a newer version.

Recommended PHP version for WordPress.

According to WordPress, the version of PHP that is currently recommended is 7.4 or higher. To perform optimally and to be secure, it is prudent to use the most recent stable version of your host, i.e., PHP 8.0, 8.1, or 8.2. The version that is being used, such as PHP 5.,6 is not safe and may lead to errors.

Attempt to upgrade your PHP to a more recent version (e.g. 7.3 to 8.0), make the changes, and re-check your site. This is a minor update that usually corrects the serious error.

Fixing memory limit issues in wp-config.php.

There are times when your site has a big task to be performed, such as running a large plugin or uploading a large picture. That task requires memory. In case WordPress runs out of memory when performing the task, it may crash and display a critical error.

  • The default memory limit of your host may be insufficient. You can try increasing it.
  • Once again, open the wp-config.php file with the File Manager.
  • Right before the line, that is all, stop editing! Add the following line to happy publishing. define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
  • This code allows WordPress to utilise up to 256 megabytes of memory, which is generally sufficient for most websites.

5. Install WordPress Core Files

When you have done all the above and the mistake remains, then some of the main WordPress files could be corrupt. This may occur when an update is interrupted.

No need to panic, as you can replace such core files without losing any of your content, such as posts, pages or images. Your personal stuff is safely stored in the wp-contents folder and in your database, which we will not touch.

We will simply replace the default components of the WordPress engine.

There Has Been a Critical Error on This Website

Download Fresh WordPress Files

  • Go to WordPress.org.
  • Press the Get WordPress button and save the most recent version in the form of a ZIP file to your computer.
  • Extract the file in your computer. Now there will be a folder called wordpress.
  • Now use these new files in place of the old files on your server. This is possible using your host File Manager or an FTP client.

Note: Do not delete any files or folders that are important.

The following are the steps involved to do it safely:

There Has Been a Critical Error on This Website
  • Access your site: using File Manager or FTP.
  • Removing the old core folders: Delete the folders of wp-admin and wp-includes: In the main directory (such as public-html), delete the folders of wp-admin and wp-includes. Do NOT delete the folder of wp-content. It contains your themes, plugins and media uploads.
  • Copy the new core folders: In the wordpress folder, which you have unzipped, copy the new core folders, wp-admin and wp-includes, to your server.
There Has Been a Critical Error on This Website
  • Upload loose core files: Secondly, upload all the single files in the wordpress folder on your computer to your server. When the system prompts whether you would like to overwrite the existing files, respond yes. This overwrites the old core files with new ones.
  • DO NOT override your wp-config.php file: This file contains your database connection information. The downloaded new WordPress has a file named wp-config-sample.php. Just ignore it.

6. Restore from Backup

In case you have got this far and are still at a standstill, restoring your site using a backup is a good and sure choice. A backup is a backup copy of your site when it was working fine. Restoring it allows you to travel back in time to that point when the mistake did not occur.

There Has Been a Critical Error on This Website

When to restore a backup. You need to restore a backup when:

  • All of the steps that were taken before had failed.
  • You can precisely tell when something went wrong, e.g. immediately after installing a plugin. You are able to restore a backup that was made right before that.
  • You have no time to troubleshoot and only need your site restored to its online presence.
  • The majority of good hosting providers will automatically make daily or weekly copies of your site. You can still create your own backups using a WordPress backup plugin.

Prevent The Critical Error in the Future

How to Fix “There has been a critical error on this website.” Correcting the mistake is one thing, but it is even better to avoid repeating such a mistake. The following are some of the easy best practices that can help to maintain your WordPress site health and error-free:

Here’s a concise version of your WordPress maintenance tips:

  • Update Carefully: Update plugins, themes, and WordPress core one at a time and check your site after each.

  • Use a Staging Site: Test changes on a duplicate site before applying them live.

  • Regular Backups: Enable automatic daily backups to quickly restore your site if needed.

  • Remove Unused Plugins/Themes: Delete inactive items to avoid conflicts or security risks.

  • Choose Quality Plugins/Themes: Use only trusted sources, check reviews, ratings, and last update dates.

If you want, I can also make an even snappier, one-paragraph version perfect for quick reading or blog intros.

Conclusion

It is stressful to see the message There has been a critical error on this website and it is a solvable issue. With the tips outlined in this guide, you can be a detective on a website, diagnose the problem, and fix it step by step.

Begin with the easy stuff: go to the debug mode to get hints, and then examine your plugins and theme. How to Fix “There has been a critical error on this website.” When that does not work, check your PHP settings, and you can think of installing the WordPress core files again. And in case of doubt, get your backup or request the help of your hosting support team. The better you are informed as to the functioning of WordPress, the more assured you will be in running your site. You now have information to challenge one of its most widespread fallacies!

FAQs

Can I lose my data by turning off the plugins or changing the themes?

No, you won’t lose any data. Inactivating a plug-in merely disables it. Its settings are safe as well as your content. Changing themes will just replace the design; your posts, pages and pictures remain.

Can the wp-config.php file be safely edited?

It is safe if you are careful. It is always important to have a copy of the file and then make a backup copy of that file before modifying anything. Add/change only the particular lines of code with references to this guide.

What should be the frequency of my site backup?

You need to back up daily in case you update your site daily (such as a blog or an online store). When you update once a week or less, weekly backups are normally sufficient. Automated daily backup is provided in most hosting plans.

So why is the use of an updated PHP version so important?

The more recent versions of PHP are safe and quick. Running your site with an outdated version of PHP is just like running an obsolete operating system; it is slower and more prone to attacks. PHP updates will make your site faster and more secure.

Related Posts