How To Turn On Debug Messages For WordPress
By default WordPress will turn off all debugging messages so the visitor to the site can't see any error messages showing anything wrong with the code.
If you do any WordPress development such as new plugins or theme development then this can cause a problem as you won't see if you have any of the settings wrongs.
Turning on debug mode will display all warnings or error messages you have with any installed plugins or themes. This makes it easy to spot if any are out of date or using old WordPress functions which are not supported any more.
Turn On Debugging
To turn on debug messages you need to open up your wp-config.php file and find the line.
Comment out this line a replace it with.
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true);
You must remember to turn this off when you put your website live or the visitor will be able to see all your debugging messages.
Learn how to code with Treehouse
- Learn projects with access to 1000+ videos
- Practice live with our Code Challenge Engine
- Get help in our members-only forums
Join the weekly newsletter
Sign up for our newsletter. You'll be updated on new tutorials as they come available.
Subscribe today and get a 50% discount code to Paulund