How to show the error causing the ‘There has been a critical error on your website’?
I’m getting the error: ‘There has been a critical error on your website. Learn more about debugging in WordPress.‘.
I’m getting the error: ‘There has been a critical error on your website. Learn more about debugging in WordPress.‘.
I’m developing a site on a server that the client has access to as well and what I’d like to do is show WP_DEBUG only for administrators. Referencing Yoast’s article on a way around this:
I’m trying to disable WP_DEBUG_LOG if and only if debug.log exists. I’d like to hook into wp_footer and test if the file exists and if so disable my debug log. All I’ve found though is that WP_DEBUG_LOG is a constant and can only be changed from the wp-config.php file which is too early for my case. Is there a way to change it from a constant on install and keep it working as normal?
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.