Skip to content

Instantly share code, notes, and snippets.

@mahdiyazdani
Last active September 24, 2016 23:57
Show Gist options
  • Save mahdiyazdani/feeedd671e9b7f59eeee4366f7173dca to your computer and use it in GitHub Desktop.
Save mahdiyazdani/feeedd671e9b7f59eeee4366f7173dca to your computer and use it in GitHub Desktop.
Hide PHP Warnings and Errors in WordPress
<?php
/**
* Replace this line from your wp-config.php file
* "define('WP_DEBUG', false);"
* with these commands below.
*/
ini_set('log_errors', 'On');
ini_set('display_errors', 'Off');
ini_set('error_reporting', E_ALL);
define('WP_DEBUG', false);
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