Enable WordPress debugging to identify the specific cause of errors, warnings, or "White Screen of Death" issues on your WordPress site. This process allows you to view detailed error messages directly in your browser or within a log file.
Before you begin
You will need:
Site Administrator access to your WordPress site.
Access to your site's files via an FTP client or a File Manager.
Access to the
wp-config.phpfile located in your site's root directory.
Enable WordPress Debugging
Connect to your site's files using an FTP client or your hosting provider's File Manager.
Locate the
wp-config.phpfile in the root directory of your WordPress installation.Open the
wp-config.phpfile and search for the following line:define( 'WP_DEBUG', false );Change the value from
falsetotrue:define( 'WP_DEBUG', true );(Optional) To log errors to a file instead of displaying them on the screen, find or add the following lines below the
WP_DEBUGline:define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );
Confirm the result
If you enabled
WP_DEBUGwithoutWP_DEBUG_DISPLAY, the errors will be recorded in a file nameddebug.loglocated in the/wp-content/directory.If you enabled
WP_DEBUGandWP_DEBUG_DISPLAY, error messages will appear directly on the page where the error occurs.
How to Disable WordPress Debugging After Troubleshooting
Once you have identified and resolved the underlying issue, you must disable debugging to ensure your site remains secure and professional.
Open the
wp-config.phpfile again.Locate the
WP_DEBUGline.Change the value back to
false:define( 'WP_DEBUG', false );If you added the
WP_DEBUG_LOGandWP_DEBUG_DISPLAYlines, you may remove those lines or set their values tofalse.
Limitations
Enabling WP_DEBUG with WP_DEBUG_DISPLAY set to true can expose sensitive information about your server configuration or file paths to public visitors. Only use the display option during active troubleshooting.
