How to Fix the “Critical Error” on Your WordPress Website

If you’ve encountered the message “There has been a critical error on this website,” don’t panic. This issue is common among WordPress users and is typically a result of a plugin conflict, theme issue, or PHP error. In this blog post, we’ll walk you through the steps to troubleshoot and resolve this error quickly.

Error: “There has been a critical error on this website.”

Answer: This error is often caused by plugin conflicts, theme issues, or PHP errors. To resolve it, enable debug mode, deactivate plugins, switch themes, or increase PHP memory.

Learn more about troubleshooting WordPress.


Step 1: Enable Debug Mode

WordPress has a built-in debug mode that can help identify the source of the problem.

  1. Access your website’s files using FTP or your hosting control panel’s File Manager.
  2. Locate the wp-config.php file in the root directory.
  3. Add the following line of code before the line that says /* That's all, stop editing! */:
    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);
  4. Save the file and reload your website. The error details will be recorded in the wp-content/debug.log file.

Step 2: Deactivate All Plugins

A common cause of the critical error is a faulty plugin. To identify the culprit:

  1. Go to your hosting control panel and access the File Manager or use FTP.
  2. Navigate to the wp-content/plugins folder.
  3. Rename the plugins folder to something like plugins_old to deactivate all plugins.
  4. Check if the website loads. If it does, rename the folder back to plugins and activate the plugins one by one to find the problematic one.

Step 3: Switch to a Default Theme

Your current theme might be causing the issue. To test this:

  1. Navigate to the wp-content/themes folder.
  2. Rename your active theme’s folder to something like theme_old.
  3. WordPress will automatically switch to a default theme like Twenty Twenty-Three.
  4. Check if the error is resolved. If it is, the issue lies within your theme.

Step 4: Increase PHP Memory Limit

Sometimes, the critical error occurs due to insufficient PHP memory.

  1. Access the wp-config.php file.
  2. Add the following line of code:
    define('WP_MEMORY_LIMIT', '256M');
  3. Save the file and refresh your website.

Step 5: Reinstall Core WordPress Files

If none of the above steps work, corrupted core files might be the issue.

  1. Download the latest version of WordPress from WordPress.org.
  2. Extract the ZIP file and upload everything except the wp-content folder via FTP to your website’s root directory.
  3. Overwrite the existing files.

Step 6: Contact Your Hosting Provider

If you’re still having issues, your hosting provider can help. They can identify server-related problems or provide advanced troubleshooting.

Need Help

At Morshadul.com, we specialize in troubleshooting WordPress errors and optimizing websites for peak performance. Whether you’re dealing with a critical error or need ongoing website support, our expert team is here to help.

Visit Morshadul.com today to get professional assistance and ensure your WordPress website runs smoothly. Don’t let errors hold you back—contact us now!

Please follow and like us:

মন্তব্য করুন

আপনার ই-মেইল এ্যাড্রেস প্রকাশিত হবে না। * চিহ্নিত বিষয়গুলো আবশ্যক।

Scroll to top
bn_BDবাংলা