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

Seeing the message “There has been a critical error on this website” can be alarming—especially when your site suddenly goes down. This error usually appears when WordPress encounters a fatal PHP error and cannot continue loading the site.

In this guide, we’ll explain what causes this error and provide step-by-step solutions to fix it safely.




What Does “There Has Been a Critical Error on This Website” Mean?

This error indicates that WordPress encountered a fatal error—most often due to:

  • Faulty or incompatible plugins
  • Theme conflicts
  • PHP version issues
  • Corrupted WordPress core files
  • Server memory limits

Unlike older WordPress versions that showed a blank white screen, newer versions display this user-friendly error message.


Step 1: Enable WordPress Debug Mode

Debug mode helps identify the exact error.

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

Edit the wp-config.php file and add the above lines. Reload your site to view the exact error message.


Step 2: Check the Admin Email for Error Details

WordPress automatically sends an email to the site admin email address with:

  • The file causing the error
  • The plugin or theme name
  • A recovery mode login link

Use the recovery link to log in and fix the issue.




Step 3: Deactivate All Plugins via FTP

Plugins are the most common cause of critical errors.

  1. Connect to your site using FTP or File Manager
  2. Navigate to /wp-content/
  3. Rename the plugins folder to plugins_old

If the site works, rename the folder back and activate plugins one-by-one to find the culprit.


Step 4: Switch to a Default WordPress Theme

If plugins aren’t the issue, the theme might be.

  1. Go to /wp-content/themes/
  2. Rename your active theme folder
  3. WordPress will automatically switch to a default theme like Twenty Twenty-Four

Step 5: Increase PHP Memory Limit

Low memory limits can trigger fatal errors.

define('WP_MEMORY_LIMIT', '256M');

Add this line to wp-config.php and refresh your site.




Step 6: Check PHP Version Compatibility

Some plugins and themes are not compatible with newer PHP versions.

Try switching between PHP 7.4 or PHP 8.0 from your hosting control panel.


Step 7: Re-upload WordPress Core Files

If core files are corrupted:

  1. Download a fresh copy of WordPress
  2. Upload only the wp-admin and wp-includes folders
  3. Do NOT overwrite wp-content

Step 8: Check Server Error Logs

Look for error logs in:

  • /wp-content/debug.log
  • Hosting control panel → Error Logs

These logs often reveal the exact cause.


How to Prevent This Error in the Future

  • Update plugins and themes regularly
  • Avoid using nulled or outdated plugins
  • Use a staging site before updates
  • Take daily backups
  • Monitor PHP compatibility

Final Thoughts

The “There Has Been a Critical Error on This Website” message may look serious, but in most cases, it can be fixed within minutes by identifying plugin, theme, or PHP issues.

Facebook
WhatsApp
Twitter
LinkedIn
Pinterest

Leave a Comment

Your email address will not be published. Required fields are marked *

Related Articles from the Series

fix-500-internal-server-error-wordpress-thumbnail
How to Fix 500 Internal Server Error in WordPress
What Is a 500 Internal Server Error in WordPress? The 500 Internal Server Error is one of the most common...
wordpress-harmful-software-warning-fix-thumbnail
Website Showing “Harmful Software” Warning Even After Fresh WordPress Installation – Causes & Fixes
Many WordPress developers assume that deleting all files and installing a fresh copy of WordPress will...
website-with-harmful-software-warning-thumbnail
Website Showing “Harmful Software” Warning When Loading – What It Means & How to Fix It Fast
Seeing a “Website with Harmful Software” or “This site is unsafe” warning when loading a website can...
php-tips-clean-secure-code-thumbnail
PHP Tips to Write Clean and Secure Code
PHP powers a huge portion of the web, including WordPress and many popular CMS platforms. While PHP is...
javascript-tips-cleaner-code-thumbnail
JavaScript Tips to Write Cleaner Code
JavaScript is the backbone of modern web development. From simple interactions to complex web applications,...
css-tips-cleaner-faster-styles-thumbnail
15 CSS Tips to Write Cleaner and Faster Styles
Writing CSS is easy—but writing clean, maintainable, and fast CSS is a real skill. As websites grow,...
make-image-clickable-in-html-thumbnail
How to Make an Image Clickable in HTML
Making an image clickable is a common requirement in web development. You may want users to click an...
add-tooltip-in-html-without-javascript-thumbnail
How to Add a Tooltip in HTML Without JavaScript
Tooltips are small text popups that appear when users hover over an element. They help display additional...
open-link-in-new-tab-html-thumbnail
How to Open a Link in a New Tab Using HTML
Opening links in a new browser tab is a common requirement in web development, especially for external...
replace-enter-title-here-text-for-custom-post-types-thumbnail
Replace Enter Title Here Text for Custom Post Types
Use the below code snippet to change the default ‘Enter the Title Here’ placeholder on the add new post...
Scroll to Top