How to disable update notifications in WordPress

wordpress_iconsSometimes “new” doesn’t always mean “better” or “suitable”.

Sometimes we require older versions of plugins and I’d rather WordPress would not tell me that there’s a newer version available. After all, I might accidentally update a plugin – or perhaps my clients do, breaking the site or overwriting customisations.

Let’s take a look at how we can disable those notifications, both for single plugins and for the entire site.

Disable update notifications for a single plugin

You can do this by adding a filter that tells WordPress not to check a certain plugin. You’ll need to know the plugin’s folder as well as the actual main plugin file that’s called. For example, if you’d like to use a legacy version of the popular NextGen Gallery, you’d use something like this:

// remove update notifications for NextGen Gallery
function filter_plugin_updates( $value ) {
    unset( $value->response['nextgen-gallery/nggallery.php'] );
    return $value;
}
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );

See that value in the line that begins with unset? There we have your plugin folder, followed by the main plugin file. The easiest way to figure this out is if you head over to Plugins – Editor and select the plugin in question from the drop down on the top right.

The first line in bold tells you the folder and main plugin file (in this case akismet/akismet.php)

The first line in bold tells you the folder and main plugin file (in this case akismet/akismet.php)

Where to put that code?

You have several choices, pick one that best suits you:

  • in the wp-config.php file (works site wide, no matter what theme is used)
  • in your theme’s functions.php file (will work only with that theme)
  • in the main plugin’s file (not recommended, should you ever update that change is gone)

Place the code at the end of the file, just before the closing php tag.

Thanks to this thread on Stack Exchange for the suggestions.

Disable all update notifications for WordPress Core, Themes or Plugins

Add this code to the bottom of your theme’s functions.php file, or add it to wp-config.php.

$zendash_updates = function ($a) {
	global $wp_version;
	return (object) array ('last_checked' => time(), 'version_checked' => $wp_version, );
}
add_filter ('pre_site_transient_update_core', $zendash_updates); // for Core
add_filter ('pre_site_transient_update_themes', $zendash_updates); // for Themes
add_filter ('pre_site_transient_update_plugins', $zendash_updates); // for Plugins

Thanks to El Yobo for this suggestion. Note that this will throw up an error message though if you’ve set WordPress debug mode to true.

Disable notifications for everything

I’ve been incorporating these things into a brand new plugin: with Zen Dash you can disable these update notifications selectively, and also remove dashboard widgets and menu items. Sometimes less is indeed more.

You can download Zen Dash from the official WordPress Repository.





Jay is the CEO and founder of WP Hosting, a boutique style managed WordPress hosting and support service. He has been working with Plesk since version 9 and is a qualified Parallels Automation Professional. In his spare time he likes to develop iOS apps and WordPress plugins, or drawing on tablet devices. He blogs about his coding journey at http://wpguru.co.uk and http://pinkstone.co.uk.