Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress WordPress Theme Development Finishing Your WordPress Theme Testing Your WordPress Theme

Best WP_DEBUG practices?

Hello everyone,

During the video, Zac mentions only having WP_DEBUG set to true during development and not production.

Why would that be considered the best practice? Does having WP_DEBUG set to True slow a website down at all?

Thanks for helping to clarify this!

Patrick Boehner
Patrick Boehner
2,005 Points

Keeping WP_DEBUG is a bit like leaving your dirty laundry out for everyone to see (especially if you have WP_DEBUG_DISPLAY turned on, then they will see it on the page itself). Besides the embarrassment of having errors on display for others to see (doesn't really build confidence), if one of those errors were to reveal a vulnerability that was exploitable you would be leaving yourself open to being take advantage of (regardless of its on display or in a log).