Add debug mode to WordPress

Most of us that develop things to WordPress have seen it – The white screen of death. But there is no reason to be alarmed, there is actually a really simple way of figuring out what is wrong.

Add this simple code to your wp-config.php.

if (isset($_GET['debug']) && $_GET['debug'] == 'secret')
  define('WP_DEBUG', true);

Next time you you want to see debug message you simply add ?debug=secret at the end of your URL like this.

Of course you should change “secret” to something else…

About Fredrik Malmgren

Fredrik Malmgren is an entrepreneur, project manager and developer specialized in WordPress. Read more about me or get in contact with me. You can also find me on Twitter. (@fredrikmalmgren).
This entry was posted in Tutorials, WordPress and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *