Hibiscus Technolab

​Encountering the “There has been a critical error on this website” message in WordPress can be frustrating, but this error is often related to issues that are relatively simple to fix. Here’s a detailed guide to help you troubleshoot and resolve it effectively:

Enable Debugging Mode

Connect to your site via FTP or use your hosting file manager.Open wp-config.php and add the following line before “/* That’s all, stop editing! Happy publishing. */”:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

This will generate a debug log in the wp-content folder (file: debug.log), which can help identify what is causing the error.

Deactivate Plugins

A common cause of the critical error is a faulty plugin. To rule this out:

  • Access your site’s files via FTP or the file manager.
  • Navigate to wp-content and rename the plugins folder to something like plugins_old.
  • Check your site; if it loads correctly, one of your plugins was likely the issue.
  • To identify the culprit, revert the folder name to plugins and then rename each plugin folder individually, checking the site after each change.

Switch to a Default Theme

Sometimes, the theme can cause compatibility issues, resulting in this critical error.

  • Rename your active theme’s folder (located under wp-content/themes).
  • WordPress will automatically revert to a default theme like Twenty Twenty-One. Check if the error persists. If the site loads, the issue lies with your theme.

Increase PHP Limits

Insufficient PHP memory can also cause this error. To increase your PHP limits:

  • Edit your wp-config.php file.
  • Add the following line just above /* That's all, stop editing! Happy publishing. */
define('WP_MEMORY_LIMIT', '256M');

Alternatively, you can increase PHP limits via your hosting control panel if it provides an option for PHP configuration.

Check for a Corrupt .htaccess File

A corrupt .htaccess file can also cause a critical error. To resolve this:

  • Access your site’s root directory via FTP.
  • Rename the .htaccess file to .htaccess_old.
  • Try reloading your site. If it works, go to Settings > Permalinks and click “Save Changes” to generate a new .htaccess file.

Reinstall WordPress Core Files

If none of the above steps work, you can attempt to reinstall WordPress core files:

  • In the WordPress dashboard, go to Dashboard > Updates.
  • Click on Reinstall Now to replace the WordPress core files. This can fix issues caused by corrupt or missing files.

Check Error Logs on Your Hosting Server

Your hosting provider might also maintain server-side error logs, which can help you pinpoint the issue. Check with your host’s support team or access error logs via your hosting control panel to gather more information.

Contact a WordPress expert

If you’ve tried all the steps above and the issue persists, it’s time to contact a WordPress expert or place an order for WordPress debugging. We will resolve the issue mostly within a few minutes.

Elina Carter

Elina Carter

Elina is a content strategist and digital solutions expert at Hibiscus Technolab. With a keen eye for design trends and a passion for crafting user-first web experiences, she specializes in helping businesses grow through tailored WordPress development, SEO, and marketing solutions. When she's not optimizing websites, you’ll find her exploring UI/UX innovations or writing about the latest in digital technology.

Elina Carter

Elina is a content strategist and digital solutions expert at Hibiscus Technolab. With a keen eye for design trends and a passion for crafting user-first web experiences, she specializes in helping businesses grow through tailored WordPress development, SEO, and marketing solutions. When she's not optimizing websites, you’ll find her exploring UI/UX innovations or writing about the latest in digital technology.

https://hibiscustechnolab.com