Loading...

Knowledge Base

How to Enable Error Reporting in WordPress

When you need WordPress errors to be visible for debugging. This article explains how to enable error reporting in WordPress.

 

Wordpress by default catches all the errors displayed by PHP. You would see something like this displayed on the websites.

 
Site Error
"The site is experiencing technical difficulties".
"A Critical error has occurred, please contact your Site Administrator".
"The Website cannot be displayed"

 

To display the actual Error

  1. On your cPanel, go to the Wordpress installation directory

  2. Modify the wp-config.php

    • Search for 'WP_DEBUG'

    • Set it to True

    • Refer screenshots for before and after edit

  3. Hit Save and then go to the website. If the line isn't present you need to add it.

  4. The errors will be displayed on the website as well as the error log file.


'WP_DEBUG' set as False

wse_image1


Modified 'WP_DEBUG' to True

wse_image1



For more information, you can also check this link