Skip to content

Instantly share code, notes, and snippets.

@thomasplevy
Last active April 26, 2016 15:53
Show Gist options
  • Save thomasplevy/bd63e052255f8c285bbb to your computer and use it in GitHub Desktop.
Save thomasplevy/bd63e052255f8c285bbb to your computer and use it in GitHub Desktop.
a great way to safely view error messages when your WordPress whitescreens
<?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