Skip to content

How to fix the “There has been a critical error on this website”

You are here:
< All Topics
Table of Contents

“There has been a critical error on this website” is an error message that appears on a WordPress website when something unexpected has gone wrong. It can be caused by various reasons, including plugin conflicts, theme issues, memory limit exhaustion, and others.

This error can result in a broken or inaccessible website and needs to be resolved promptly to restore its functionality.

In this post we’re going to learn how to Fix critical error on website (WordPress sites).

critical error on website

Reasons why you get the error message “there has been a critical error on this website”

The error message “There has been a critical error on this website” is typically caused by one of the following reasons:

  1. Plugin conflict: One or more plugins installed on your website may be causing a conflict and resulting in the error.
  2. Theme issue: The issue could be with the theme installed on your website.
  3. Memory limit exhaustion: The website may be exceeding its allotted memory limit, causing the error.
  4. Corrupted core files: The WordPress core files may have become corrupted, resulting in the error.
  5. Database connection issues: The error can also occur if there are issues with connecting to the website’s database.

It’s important to identify the root cause of the error and resolve it promptly to restore the functionality of your website.

How to find and fix the “Critical Error on Website”

how to fix there has been a critical error on this website, wordpress error

To find the root cause of the “There has been a critical error on this website” issue, you can follow these steps:

  1. Disable plugins: Access your website via FTP or cPanel, navigate to file manager > the wordpress installation path the “wp-content” folder, and rename the “plugins” folder to “plugins_old”. This disables all plugins on your website and helps identify if a plugin is causing the issue.
  2. Check theme: If the error still persists, access the root directory and rename the “themes” folder to “themes_old”. This disables the theme and helps identify if the theme is causing the issue.
  3. Check PHP memory limit: If the error still remains, try increasing the PHP memory limit in the “wp-config.php” file by adding this code: “define(‘WP_MEMORY_LIMIT’, ‘256M’);”.
  4. Debug mode: You can also enable debug mode in WordPress to identify the root cause of the error. To do this, add the following code to the “wp-config.php” file: “define( ‘WP_DEBUG’, true );”.
  5. Check the error log: Your website’s error log may contain more information about the cause of the error. This can be accessed through your cPanel or FTP.

To do this, Login to CPanel > goto the files section and click on file manager icon, you will be redirected to the file manager in some seconds.

Cpanel file manager

if its the main domain name just click on the public_html folder and then > WP-Content, and then write click on the plugins folder and rename it, the new name should be plugins. Old and save.

rename wordpress plugins folder

If the error was caused by a theme you should follow the same process as well and rename the themes folder, after regaining access to your dashboard you can enable other themes or plugins and delete the ones you no longer require.

if you’ve done all this and the error still persists then you can move to the final remedy which is php related, this is pretty simple.

Login to your CPanel dashboard and navigate to the “software” section click on “Select PHP version” icon and you’ll be redirected to a new page.

CPanel software select php version

from this page you can simply click on the current php version to switch to a different version, it is recommended to choose either php 8.1, 8.0 or 7.4. select and click on “set as current“.

set new php version

By following these steps, you can identify the root cause of the issue and take steps to resolve it. It’s important to take a backup of your website before making any changes.

Leave a Reply

Table of Contents