Last active
April 26, 2016 15:53
-
-
Save thomasplevy/bd63e052255f8c285bbb to your computer and use it in GitHub Desktop.
a great way to safely view error messages when your WordPress whitescreens
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 // do not add this line to your file when copying! | |
// add this to your wp-config.php file | |
// navigate to the whitescreen page and add ?debug=debug to the url | |
// eg: http://mywebsite.com/problempage?debug=debug | |
// or on a page with query string variables already http://mywebsite.com/problempage?variable=123&debug=debug | |
if ( isset( $_GET['debug'] ) && 'debug' == $_GET['debug'] ) { | |
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_DISPLAY', true ); | |
define( 'SCRIPT_DEBUG', true ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment