Loading...

Knowledge Base

How to Fix the Critical Error on Your WordPress Website

Experiencing a critical error on your WordPress website can be alarming, but it’s usually caused by simple issues such as outdated PHP versions, faulty plugins, or incorrect configurations. This guide walks you through practical troubleshooting steps—checking error logs, enabling WP_DEBUG, updating PHP, and disabling plugins—to help you quickly identify and fix the critical error and restore your WordPress site.

A critical error in WordPress often appears as:


There has been a critical error on your website. Please check your site admin email inbox for instructions.

This issue must be fixed immediately, as it usually indicates a PHP, plugin, or theme conflict.

Fix Critical Error

Below are the steps to troubleshoot and fix the WordPress critical error:

Prechecks 

  • Make sure the admin email address is correct, and the email function of your host works.
  • Check your Spam folder. Some emails, particularly this one, often get routed to your Spam folder.
  • Make sure your PHP is updated. (Most issues are resolved by doing this.)

Troubleshooting steps:

  1. Log in to your Customer Portal.
  2. Click Hosting on the left-hand menu.

    Customer Portal - Hosting tab
     

    • If you have multiple hosting plans, a list will appear. Click Websites under the hosting plan you want to manage.

      HostGator Hosting Tab Manage Button
       

  1. Click the Manage button of the site that's having the error.

    Manage button
     

  2. Go to Quick Links  and click on File Manager.

    Quick links- File Manager
     

  3. To locate the Error log in the File Manager, click public_html. If you have multiple domains, access the folder of the domain that has the error.

    Public_Html
     

  4. Look for the error_log. The latest error entry will be at the bottom, which has the date and time indicated. You can use this error_log file to identify the cause of your site's error prompt. 

    Error Log
     

  5. However, if you still don't see any error message, proceed to the following steps:
  6. Enable wp_debug and wp_debug_log by going back to public_html, or the folder of your domains, if you have multiple domains.
  7. In the public_html, look for wp_config. Do a right-click and choose Edit.

    WP Config
     

  8. Look for the script define( 'WP_DEBUG', false );. This is right before the comment, "That's all, stop editing! Happy publishing" at the bottom.

    Define WP Debug False
     

  9. Insert define( 'WP_DEBUG_LOG', false ); on the next line.

    Define WP Debug Log False
     

  10. Replace false with true.

    Define WP Debug Log True
     

  11. Click Save Changes on the upper-right side.

    Confirm Save Changes
     

  • Attempt to disable all plugins and use one of the default themes through your WordPress Dashboard.

    If you cannot access the WordPress Dashboard, use the Enable/Disable WordPress Plugins using Database article to disable them through the phpMyAdmin database.
     
  • Once the plugins are disabled, you should then be able to access the WordPress Dashboard.
  • Refresh your website. If the problem goes away, enable the plugins one by one to identify the source of the issue. 

Here are additional helpful articles about WordPress troubleshooting:

Still have questions or concerns? Please contact HostGator's Support Team via phone or chat so we can assist you!

Loading...