How to define WP_DEBUG as true outside of wp-config.php?

Question

I am trying to create a debugging mode in one of my plugins so users can easily enable WP_DEBUG on their own, and hopefully report back to us with helpful error messages. Right now we ask them to modify their wp-config.php, but that’s beyond some users’ capabilities. I was hoping to just add define( 'WP_DEBUG', true );in our plugin if the user has checked that option, but it appears you can only enable WP_DEBUG from the wp-config.php file.

Does anyone know of any way to enable WP_DEBUG from anywhere else but wp-config? Or is there another useful WP function that I could be using instead?

Thanks,
Dalton

0
Dalton 2 years 2020-01-07T08:41:06-05:00 0 Answers 40 views 0

Leave an answer

Browse
Browse