Skip to content
Skip to content

How to Enable WordPress Debug Logs

If you're troubleshooting issues on your WordPress site, enabling error logs can help you identify what's going wrong behind the scenes. WordPress has a built-in debugging system that allows you to log PHP errors, warnings, and notices to a file. In this tutorial, we’ll show you how to enable WordPress error logging step by step, so you can easily track down and fix problems.

  • Connect to your server via FTP (you can use a free FTP client such as FileZilla).
  • Edit wp-config.php and add the following lines above this line: /* That's all, stop editing! Happy publishing. */
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);
  • Next, visit the page where the WordPress error occurs. This will trigger the debug log to record any PHP or critical errors.
  • To view or download the error logs, go to the root of your WordPress installation via FTP and navigate to the /wp-content/debug.log file. You can open the debug.log file using any text editor.

New: Check out our latest fast & minimal Dental Skin