Skip to content

Instantly share code, notes, and snippets.

@nextab
Created April 6, 2026 14:01
Show Gist options
  • Select an option

  • Save nextab/3a1f0d6ec84dd9de4a0a1b64e61f927f to your computer and use it in GitHub Desktop.

Select an option

Save nextab/3a1f0d6ec84dd9de4a0a1b64e61f927f to your computer and use it in GitHub Desktop.
Minimalistic must use plugin for WordPress that disables deprecated messages and error notices that only clog up your debug.log
<?php
/** Plugin Name: Suppress deprecation warnings.
* Description: Put this in .../wp-content/mu-plugins/ to see fewer deprecation warnings.
*/
if ( ! defined( 'ABSPATH' ) ) {
die( 'We\'re sorry, but you can not directly access this file.' );
}
if ( WP_DEBUG ) {
error_reporting( E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED & ~E_NOTICE & ~E_WARNING );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment