Back to Top

Disable updates for plugin in WordPress

Disable updates for specific plugin in WordPress

Most of WordPress plugins get updated on regular intervals so whenever you log in to your WordPress admin panel, you will get the notification for updates of plugins, themes or core files. Generally, Developers do the changes in the WordPress plugin if hook or filter doesn’t work so Disable updates for a specific plugin in WordPress is helpful to them.

Sometimes you want to do some changes in plugin functionality or style so you have to modify plugin core files so once you update the plugin, your changes will be lost. At that time, it is necessary for you to Disable updates for the specific plugin in WordPress so if any other developers are working on your site can’t update the code otherwise, your code will be lost.

Hence, You can disable specific plugin update notifications. So, Here I am going to show small code snippet which will disable update notification for specific plugin in WordPress

You need to add a few lines of code into your functions.php file or wp-config.php file to disable updates for specific plugin in WordPress.

Disable updates for a specific plugin for WordPress is kind of blocking the Plugin Update. Above code snippet called the filter site_transient_update_plugins in which unset the plugin from update list and this is selectively disable updates for plugin in WordPress

You may also like:

To Configure Auto Updates in WordPress
To add custom column to the list page in WordPress
Remove suffix from taxonomies in WordPress

Here, in above example replace the value in response to your desired plugin’s directory file path and the main PHP file name.You can unset as many plugins you want when you want to stop a plugin from updating.If the code was not working for you, write in comment section.I would like to help you to solve any issue.

Share:
Share on Facebook3

Share on LinkedIn0Tweet about this on TwitterShare on Google+0Buffer this pageDigg thisShare on Reddit0

Comments (8)

  1. First, this could be better placed in your /wp-content/mu-plugins/ folder rather than theme functions.php or wordpress wp-config.php.
    Second, I was searching around and found the same code and it’s noted that this can throw a warning at times if the value is not set. An improvement would be:
    function disable_plugin_updates( $value ) {
    if ( (isset($value) && (is_object($value) ) {
    if (isset($value->response['akismet/akismet.php']) {
    unset( $value->response['akismet/akismet.php'] );
    }
    return $value;
    }
    add_filter( 'site_transient_update_plugins', 'disable_plugin_updates' );

    1. whoops missed a } bracket after the unset line, lol.

      1. Actually if (isset($value->response[‘akismet/akismet.php’]) is missing a closing )

  2. Dammit, why not simply write THE RIGHT snippet of code??

    function disable_plugin_updates( $value ) {
    if ( (isset($value) && (is_object($value) ) {
    if (isset( $value->response[‘akismet/akismet.php’] )) {
    unset( $value->response[‘akismet/akismet.php’] );
    }
    }
    return $value;
    }
    add_filter( ‘site_transient_update_plugins’, ‘disable_plugin_updates’ );

  3. Very good. Thanks you

  4. Thank you very much. You made my day.

  5. Hey guys

    You can also use below function in itself plugin:

    function disable_plugin_updates( $value ) {
    unset( $value->response[ plugin_basename(__FILE__) ]);
    return $value;
    }
    add_filter( ‘site_transient_update_plugins’, ‘disable_plugin_updates’ );

    have a fun 🙂

    1. Superb script
      i need like your scrip
      thanks

Leave a Reply

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

Most Popular Posts

Angularjs 2 Tutorial for Beginners

Posted on 12 months ago

Bhumi

how to use the CSS3 Gradient Effect

Posted on 5 years ago

Zinal

LESS CSS – Nested Rules

Posted on 2 years ago

Bhumi

What is Reflection in PHP

Posted on 2 years ago

Bhumi

MySQL coalesce() function

Updated 17 years ago

Bhumi

How to use JavaScript Promise API?

Updated 17 years ago

Bhumi

What are Lambdas and Closures in PHP?

Updated 17 years ago

Bhumi

An Introduction to Gulp JS

Updated 2 months ago

Bhumi

The Reader’s Poll – June 2015

Posted on 2 years ago

Bhumi

The Reader’s Poll – August 2014

Posted on 3 years ago

Bhumi

The Reader’s Poll – June 2014

Posted on 3 years ago

Bhumi

The Readers’ Poll – May 2014

Posted on 3 years ago

Bhumi

The Readers’ Poll – August 2013

Posted on 4 years ago

Bhumi