Skip to content

Instantly share code, notes, and snippets.

@narthur
Created March 13, 2016 17:16
Show Gist options
  • Save narthur/30eabef57fd434739ed8 to your computer and use it in GitHub Desktop.
Save narthur/30eabef57fd434739ed8 to your computer and use it in GitHub Desktop.
Enable WordPress debugging
// Source: https://www.smashingmagazine.com/2011/03/ten-things-every-wordpress-plugin-developer-should-know/
// Replace `define('WP_DEBUG', false);` in `wp-config.php` with the following lines:
// Turns WordPress debugging on
define('WP_DEBUG', true);
// Tells WordPress to log everything to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);
// Doesn't force the PHP 'display_errors' variable to be on
define('WP_DEBUG_DISPLAY', false);
// Hides errors from being displayed on-screen
@ini_set('display_errors', 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment