How to Enable WordPress Debug Mode to Find and Fix Errors

Your Site Has Errors You Cannot See. Debug Mode Reveals Exactly What Is Broken and Where.

By default, WordPress hides error messages — displaying a white screen or silently failing instead of telling you what went wrong. Debug mode reveals those errors, logging them to a file where you can identify and fix the root cause. It is the first tool every WordPress developer reaches for when something breaks.

“Error messages look alarming, but they are clues — not catastrophes. Debug mode turns a mysterious white screen into a specific problem you can solve.”

Enabling WordPress Debug Mode

Edit wp-config.php and add these lines before “That’s all, stop editing”: define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false); WP_DEBUG enables debugging. WP_DEBUG_LOG writes errors to /wp-content/debug.log — the file you check for clues. WP_DEBUG_DISPLAY set to false hides errors from visitors. Always set this — you do not want error messages visible on your live site. After enabling: reproduce the problem. Check debug.log for the error message. The message tells you the specific file, line number, and type of error. Search the error online or provide it to a developer. Disable when done: Debug mode has a small performance impact. Turn it off after you have fixed the issue. For professional troubleshooting, see our WordPress Services page.

“Debug mode is like turning on the lights in a dark room. Suddenly you can see what is broken — and seeing the problem is the first step to fixing it.”