Created
December 20, 2018 21:30
-
-
Save danieljwonder/79c3eb29d35a52b53b0859bdb2e5729f to your computer and use it in GitHub Desktop.
Better WordPress Error Reporting Configuration
This file contains hidden or 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 | |
| /* | |
| * Better WordPress Error Reporting Configuration | |
| * | |
| * Instructions: Add the following code to your `wp-config.php` file before the stop editing notice. | |
| */ | |
| // PHP Error Reporting | |
| ini_set('log_errors', 1); // Enable PHP Error Reporting | |
| ini_set('display_errors', 0); // Hide errors from front-end | |
| ini_set('error_reporting', E_ALL ); // Set level to report **all** errors | |
| // WordPress Error Reporting | |
| define('WP_DEBUG', false); // Disable front-end notifications | |
| define('WP_DEBUG_LOG', true); // Write errors to `/wp-content/debug.log` | |
| define('WP_DEBUG_DISPLAY', false); // Hide errors from front-end | |
| /* That's all, stop editing! Happy blogging. */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment