Last active
March 28, 2017 10:16
-
-
Save GarySwift/dd53acd4b595d04ab7b9b6fc27181e24 to your computer and use it in GitHub Desktop.
WordPress Debug mode for developing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * For developers: WordPress debugging mode. | |
| * | |
| * Change this to true to enable the display of notices during development. | |
| * It is strongly recommended that plugin and theme developers use WP_DEBUG | |
| * in their development environments. | |
| * | |
| * For information on other constants that can be used for debugging, | |
| * visit the Codex. | |
| * | |
| * @link https://codex.wordpress.org/Debugging_in_WordPress | |
| */ | |
| $debug=true;// Turn on/off Wordpress debugging (and log it in debug.log) | |
| if($debug) { | |
| // Turn debugging on | |
| define('WP_DEBUG', true); | |
| // Tell WordPress to log everything to /wp-content/debug.log | |
| define('WP_DEBUG_LOG', true); | |
| // Turn on the display of error messages on your site | |
| define('WP_DEBUG_DISPLAY', true); | |
| } | |
| else { | |
| define('WP_DEBUG', false); | |
| define('WP_DEBUG_LOG', false); | |
| define('WP_DEBUG_DISPLAY', false); | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the debug settings I use when developing new WordPress sites.