Explore Bato Web Agency Webflow Certified Partner Profile Explore Bato Web Agency Webflow Certified Partner Profile

How do you enable WP_DEBUG, and where can you find debug.log?

Illustration without a description Illustration without a description

Open wp-config.php in the active WordPress root and create a backup before editing it. Set WP_DEBUG to the boolean value true, enable WP_DEBUG_LOG, and set WP_DEBUG_DISPLAY to false on a public site. Place the definitions before the line that says WordPress has finished loading configuration.

 

With the standard setting, WordPress writes messages to wp-content/debug.log. The file may appear only after an error, warning, or explicit log call occurs. The web-server user needs permission to write in the content directory. Hosting PHP logs can contain fatal startup errors that happen before WordPress logging begins.

 

Reproduce the problem once, note the time, and read the first relevant message and its call stack. A log may contain routine notices alongside the failure, so match the entry to the exact action. Review the file privately because URLs, server paths, user data, and plugin details can appear in logged context.

 

Disable temporary debugging after the investigation and delete or protect a large log file. Keep on-screen error display disabled in production. For continuing monitoring, use the host’s protected logging system or an application logging service with retention and access controls instead of leaving an unrestricted file to grow.