Last active
August 29, 2015 14:14
-
-
Save karlazz/d6330b8192c413259452 to your computer and use it in GitHub Desktop.
enhance wp-config to easily toggle debugging
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
| if (isset($_GET['debug']) ) { | |
| define('WP_DEBUG',true); | |
| if ( $_GET['debug']=='log') { | |
| // Enable Debug logging to the /wp-content/debug.log file | |
| // The web user will have to have write permission to the file | |
| /* uncomment next to use wordpress file default of wp-content/debug.log, make sure of write permission */ | |
| //define('WP_DEBUG_LOG', true); | |
| /* or use a file in the wp-content/uploads directory, which should always have write perms on it */ | |
| @ini_set('error_log', dirname(__FILE__) . '/wp-content/uploads/debug.log'); | |
| // Disable display of errors and warnings | |
| define('WP_DEBUG_DISPLAY', false); | |
| @ini_set('display_errors',0); | |
| } | |
| } | |
| else | |
| define('WP_DEBUG', false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment