Matthew Hodge
Full Stack Developer

WordPress along with its plugins directory has a folder called mu-plugins which when created inside the wp-content directory, will "force" WordPress to load the "must use" plugins from this directory.

A typical fresh install of WordPress has the following inside the plugins: default - plugins

Lets say just for arguments sake that you would like to set the error reporting level in PHP to display all errors BUT not deprecation warnings.

You can then create the following file in the mu-plugins directory as per below

/wp-content/mu-plugins/error-reporting.php
<?php 
/*
    Plugin Name: PHP - Don't report deprecation warnings
    Description: Don't report deprecation warnings
*/
error_reporting(E_ALL & ~E_DEPRECATED);

Now when you refresh your plugins page you will notice the new link "Must-Use" which will show the plugins WordPress has been told to load.

must use plugin added

If you open the Must-Use link you will see the plugins listed which are being force loaded i.e you cannot activate, deactivate or remove (as the name implied, Must Use!)

must use plugin list

Now you will not have your log files building up with deprecation notices!