Created
November 23, 2018 07:01
-
-
Save manojhl/592a977838769eec2f8de28b17578744 to your computer and use it in GitHub Desktop.
Debugging config for production - Error reporting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Debugging in production | |
* | |
* - Set error reporting to true | |
* - But don't display the errors | |
* - Instead log the errors in a file | |
*/ | |
// For PHP | |
// error_reporting(E_ALL); | |
@ini_set( 'log_errors', 'On' ); | |
@ini_set( 'display_errors', 'Off' ); | |
@ini_set( 'error_log', '/home/blogwwf/public_html/php_error.log' ); | |
// For WordPress | |
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_LOG', true ); | |
define( 'WP_DEBUG_DISPLAY', false ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment