How to Stop Individual Plugins from Updating in WordPress

  • SumoMe

plugin-updatesIt is always important to keep plugins in a WordPress installation updated however if you have been working with it long enough, you may have encountered instances wherein you DO NOT want to update some of them. These plugins in particular are usually those that are modified to serve a specific purpose. In the event the developer of the plugin rolls out a new version, WordPress notifies you, the admin, that it needs updating. For a modified plugin, you may not want to go for this update because once you do all your customization will be wiped out. One way to avoid this is to turn off update notifications from your modified plugins. Luckily there is an easy way to do it.

Simply open your current theme’s functions.php and add this code:


function filter_plugin_updates( $value ) {
 unset( $value->response['twitter-widget-pro/wp-twitter-widget.php'] );
 return $value;
}
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );

The code snippet above unsets plugin updates from the Twitter Widget Pro plugin given that the parameter is the directory of its main PHP file in Line 2.

'twitter-widget-pro/wp-twitter-widget.php'

Here is a code snippet for stopping Akismet from nagging you for updates:


function filter_plugin_updates( $value ) {
 unset( $value->response['akismet/akismet.php'] );
 return $value;
}
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );

Similarly, the parameter provided is the directory of Akismet’s main PHP file:

'akismet/akismet.php'

Remember that these directories are relative to WordPress’s plugins directory in wp-content folder of the installation.

You just have to specify the directory of the plugin’s main PHP file.

Refresh your admin panel afterwards and you will notice that the notifications for the plugins you just unset is gone. Neat!

About maca

Hello, my name is Karlo Macariola. I once dreamed to be a painter or an animator but when I typed my first line of code I immediately fell in love with programming. Today my passions are with web development and web design though sometimes I still withdraw to my first love which is drawing. DeviantArt | Twitter | Facebook
This entry was posted in Web Development & Design and tagged . Bookmark the permalink.

One Response to How to Stop Individual Plugins from Updating in WordPress

  1. Jeff says:

    what if i want to stop 2 or more plugins from updating? how do i do that?
    thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *