How to Enable Debug Mode in WordPress?

Sometimes you need to check for errors on a page — especially when troubleshooting something that’s not working correctly.

WordPress has a built-in debug mode, but it’s turned off by default. This means errors and warnings aren’t shown in the browser.

While you can display errors directly in the browser, it’s safer and more professional to log them to a file. That way, your visitors won’t see them, and you’ll have a debug log you can share with a developer.

To enable debugging, open your wp-config.php file and find the line:

define( 'WP_DEBUG', false );

If you just change false to true, errors will appear directly in the browser. To log them instead (recommended), replace that line with:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Now, all errors and warnings will be saved to a file located at wp-content/debug.log.

To test it, just visit the page that’s causing issues — any logged errors will appear in that file.

You can safely ignore Notices and Warnings in most cases — they don’t break your site. Focus on any Errors and check which files or plugins are causing them.

Feel free to send the wp-content/debug.log file to our support team — we’ll review it and help you find a solution.

⚠️ Important: Once the issue is resolved, make sure to switch debug mode back off by restoring:

define( 'WP_DEBUG', false );

Also delete the debug.log file from your server to keep things clean.

Did the answer help you?
Related Questions