Developers, Please Debug!

When developing plugins or themes for WordPress, please, please, please, add this bit of code to your test site’s wp-config.php file:

define('WP_DEBUG', true); # Debugging

If your test site is public and you only want the debug information to show up for yourself, restrict it to your IP address:

if ($_SERVER['REMOTE_ADDR'] == '') define('WP_DEBUG', true);

There's no reason to release a plugin or theme into the wild that's laden with uninitialized variables, deprecated functions, undefined indexes, and so on. Turning debugging on will force you to either ignore the warning messages or will encourage you to clean up your code.

Now you know, and knowing is half the battle. The other half is outclassing the competition. :)

Leave a Comment

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

Use your Gravatar-enabled email address while commenting to automatically enhance your comment with some of Gravatar's open profile data.

Comments must be made in accordance with the comment policy. This site uses Akismet to reduce spam; learn how your comment data is processed.

You may use Markdown to format your comments; additionally, these HTML tags and attributes may be used: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.

the Rick Beckman archive
Scroll to Top