How to easily enable/disable debug mode in WordPress

The first thing to do is to add the following code to your wp-config.php file. This file is located at the root of your WordPress install.

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

Once done, simply add a GET parameter to the url of the page you’d like to debug, as shown below:

http://www.wprecipes.com/contact?debug=debug

Thanks to Joost de Valk for this great tip!

Looking for WordPress hosting? Try WP Web Host. Prices starts at $5/month and you can try it for free!

How to easily enable/disable debug mode in WordPress

One thought on “How to easily enable/disable debug mode in WordPress”

Leave a Reply

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