WordPress debugging, the easy way
WordPress debugging, the easy way
When developing or debugging, it is useful to display errors. But when your site is live, you might not want to show your potential errors to the entire world. Here is simple solution to display errors only when a debug=debug parameter is found on the url.
The first thing to do is to paste the following code into wp-config.php:
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