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).