After reading this post about the “WordPress white screen of death” I wanted to quickly share with you a quick hack I do in almost all WordPress installs I manage, that allows me to quickly switch on debug mode when needed.
In the file wp-config.php, usually found in your WordPress root, do the following:
if ( isset($_GET['debug']) && $_GET['debug'] == 'debug') define('WP_DEBUG', true);
Now I can open any page, and if something goes wrong there, like a white screen of death, I add
?debug=debug to its URL and see what’s causing the trouble. Pretty easy huh? :)
Now it might be wise to change that second ‘debug’ to a key of your own choosing, so not everyone out there can open debug mode on your blog.