Skip to content

Instantly share code, notes, and snippets.

@danieljwonder
Created December 20, 2018 21:30
Show Gist options
  • Select an option

  • Save danieljwonder/79c3eb29d35a52b53b0859bdb2e5729f to your computer and use it in GitHub Desktop.

Select an option

Save danieljwonder/79c3eb29d35a52b53b0859bdb2e5729f to your computer and use it in GitHub Desktop.
Better WordPress Error Reporting Configuration
<?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