Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a plugin that I know I never want to update. I am aware that this is NOT best practice, but in this case it must be done. Is there any way to stop WordPress from prompting me to auto-update a particular plugin (but still alert as normal for all other plugins).

share|improve this question
4  
Increase the version number inside the plugin's main file.. eg. 99.9 ...and also make that same change inside the readme file for good measure(though i don't think that's actually required).. –  t31os Aug 9 '11 at 0:12
    
Will adjusting the version numbers still work if the plugin updates its version numbers to something like 1.10.1? –  npc Sep 25 '13 at 19:33

4 Answers 4

you place this in your theme's functions.php

//Disable update notification for individual plugins - see my example of plugin block-spam-by-math-reloaded as to how to use this function
function filter_plugin_updates( $value ) {    
unset( $value->response['block-spam-by-math-reloaded/block-spam-by-math-reloaded.php'] );    
return $value;
}
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );
share|improve this answer
    
I don't understand why there's a Google +1 button code in your answer... Probably a left over... –  brasofilo Jun 29 '12 at 19:38
    
left over. Sorry. –  Tara Jun 30 '12 at 21:05
    
This solution throws a warning while enabling or disabling any other plugin. Warning: Attempt to modify property of non-object in /home/XXXXXX/public_html/wp-content/themes/XXXXXXX/custom-functions.php on line 15 –  gurung Jan 11 at 3:58
up vote 6 down vote accepted

T31os's answer was right: Increase the version number inside the plugin's main file.. eg. 99.9 ... and also make that same change inside the readme file for good measure(though i don't think that's actually required).. – t31os

share|improve this answer
    
This worked better for me. Thanks. –  gurung Jan 11 at 3:58

Or you just rename it so it is 'not' the same plugin.
You need to rename not just the folder but also in the readme and plugin header.

share|improve this answer

While Tara's answer works well, it requires the programmer to enter the path to the main plugin file and it is only functional while that particular theme is enabled. An alternative solution might look like this:

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

Place this code at the top of the main .php file of the plugin you wish to disable. If you plan on using this more than once in your site, change the _1234 in the filter and function name to a different set of random numbers to avoid duplicate function names.

Chances are that if you are disabling updates for a particular plugin, it's because you're editing it for some reason... so adding a few extra lines to that plugin should be viable.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.