[WP] How to Fix the “There Has Been a Critical Error on Your Website” Error?

My blog can access the front end, but when I try to access the admin panel. My Blog is dead. In this blog you can read an investigation step and solution here.

My blog can access the front end, but when I try to access the admin panel. My Blog is dead. In this blog you can read an investigation step and solution here.

Investigation

  • Enable debug mode by editing the wp-config.php file. set flag below.
    • WP_DEBUG – triggers the debug mode in WordPress.
    • WP_DEBUG_DISPLAY – shows debug messages on the pages’ HTML.
    • WP_DEBUG_LOG – stores error details in the debug.log file.
    • SCRIPT_DEBUG – runs the “dev” versions of core CSS and JavaScript files instead of the minified versions.
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', true );
define( 'WP_DEBUG_LOG', true );
define( 'SCRIPT_DEBUG', true );
  • View the debug message from the browser

OK, I have found the root cause, It is from WordPress Plug-in All in One SEO – Best WordPress SEO Plugin

Solution

disable plug-in by renaming folder wp-content/plugins to incorrect name such as
- old all-in-one-seo-pack
- new _all-in-one-seo-pack

  • FTP to your WordPress Host and Navigate to wp-content/plugins
  • rename plugin that shows an error in the debug log.
  • Refresh WordPress Again.
  • WordPress will detect some directories that are missing and automatically disable the plugin. ( All in One SEO)
  • My Blog is back !!!! (Can access front and back end)

Recap Step Note

if Enable WordPress debug mode doesn't help or you can’t access the admin panel,

- wp-content/plugins conflict check

Note: if  you have access to the WordPress admin area, disable all pluin first and reactivate plugins one by one

  • disable all plugins in wp-content/plugins (rename the plugins folder to plugins.backup )
  • Refresh your site. If it loads normally, that indicates a conflicting plugin.
  • rename plugins.backup folder to plugins
  • try to reactivate plugins one by one, reloading the web page every time.
- wp-content/themes conflict check (Switch to a Default Theme)

Note: if  you have access to the WordPress admin area, try switch the active theme to a WordPress default one such as Twenty Twenty-Four - WordPress theme | WordPress.org

  • upload default WordPress theme (Download from: WordPress Themes | WordPress.org)
  • disable your active theme such as mytheme2024 in wp-content/themes (rename mytheme2024 folder to mytheme2024.backup)
  • Refresh your site. If it loads normally, that indicates a conflicting theme.

Discover more from naiwaen@DebuggingSoft

Subscribe to get the latest posts to your email.