WordPress debug mode?

If you have some programming background and know what’s debugging, you’d love this one:

In your site’s root directory there’s a file named wp-config.php which holds some security data about your site, including database connection parameters.

This file also includes the line:

define('WP_DEBUG', false);

On your test site, change this setting to true. This will be very revealing.
You’ll find that plugins or code snippets you added are creating many errors which although not fatal (which means the site runs OK anyway), may slow down your pages.

After first hearing of this debug mode, we had a great time and a great learning experience going over each error and fixing it, until the site ran on define('WP_DEBUG', true) with no error message whatsoever.

When finished, even if all errors are fixed, reset to define('WP_DEBUG', false);
This will prevent showing temporary errors that are nothing to do with your code.

You can leave a response, or trackback from your own site.

Leave a Reply

Powered by WordPress | Theme by New WordPress Themes | Icons by IconArchive.com | Hosting by orrdata.com