telephone: (920) 215-1842
facsimile: (866) 456-2115

Remove Update Checks for a WordPress Plugin

WordCamp Chicago 2010While I was attending WordPress WordCamp 2010 in Chicago I met Pete Mall. He gave a great presentation titled “Beginner’s Plugin Development”. I contacted him regarding more information on how to remove the update notification you receive when a developer updates their plugin. Many of us tweak the design or internal workings of a plugin and we don’t want it updated by mistake in the future.

This may be helpful if you are running a custom version of a plugin from the repository and you don’t want to accidentally update the plugin and lose the customizations, or if you are running a private plugin and don’t want WordPress to check for updates from the plugin repository. WordPress doesn’t know if your plugin is in the WordPress plugins repository and it will request the update check on all installed plugins.

WordPress checks for updates using wp_update_plugins() in wp-includes/update.php but there are NO hooks in this function which could be used to exclude your plugin from the update check. However, you can hook into http_request_args and remove your plugin from the query arguments passed in the http request. You can add the following code to your plugin to prevent WordPress from checking for updates for your plugin:

add_filter() takes in four parameters and you can read more about it in the codex here.

add_filter( 'http_request_args', 'dm_prevent_update_check', 10, 2 );
function dm_prevent_update_check( $r, $url ) {
	if ( 0 === strpos( $url, '' ) ) {
		$my_plugin = plugin_basename( __FILE__ );
		$plugins = unserialize( $r['body']['plugins'] );
		unset( $plugins->plugins[$my_plugin] );
		unset( $plugins->active[array_search( $my_plugin, $plugins->active )] );
		$r['body']['plugins'] = serialize( $plugins );
	return $r;

Remember you need to add the code above to only the specific plugins you don’t wish to udpate.

If you are already receiving a notice stating that your plugin needs to be updated. A value called “_transient_update_plugins” in the WordPress database is the reason. To do this insert the following command into your wp-includes/update.php file at the top. Refresh your plugin list page and remove the snippet after the database is updated.

	get_site_transient( 'update_plugins' ); // unset the plugin
	set_site_transient( 'update_plugins', '' ); // reset plugin database information


While using this solution I realized I can only use it on one plug-in per WordPress installation without writing additional code. I thought a WordPress plugin sure would be nice. Here is a current plug-in by a group of guys. Several of them I have meet. WP Manage Plugins It has a weird interface issue on the admin side. For support please visit the Support Forum.


I hope this saves you time!

9 Responses

  1. It should beset_site_transient( 'update_plugins', '' ) to clear the cache or you can unserialize and iterate through it and unset it for your plugin.

  2. Pete Mall on Jun. 14th, 2010 at 6:55 pm
    • Thanks for the tip I have the post updated.

    • Jason Gegere on Jun. 14th, 2010 at 6:59 pm
  3. This hack doesn’t seem to work in WordPress 3.0.1, after copy/pasting it (exactly!) into a plugin file it generates this error :

    Fatal error: Cannot redeclare dm_prevent_update_check() (previously declared in in on line 36

  4. Rene on Aug. 29th, 2010 at 4:24 am
    • The issue with using this code in a plugin is you can only use it once otherwise you will have redeclaration issues.

      A plugin that I have been using now is WP-Manage-Plugins. There seems to be a small interface issue when using WordPress 3.0-3.1 but a browser refresh makes plugins usable again, just an admin glitch. I will add a new post when I have more information regarding a solid solution.

    • Jason Gegere on Sep. 15th, 2010 at 11:32 pm
  5. Another more easy and pretty reliable way to prevent a customized plugin from updating is to set its version number to something a lot higher than its current version number.

    The solution presented here or Pete’s solution didn’t work reliably for me (or didn’t work at all).

  6. Matthias on Oct. 18th, 2010 at 2:58 am
  7. Thanx for your post! It really help me! :)

  8. MOst_53 on Oct. 29th, 2010 at 2:44 am
  9. Awesome post! Thanks for this bit of code.

  10. Devin Walker on Nov. 10th, 2010 at 7:05 pm
  11. Thanks, I’ve been trying to figure out how to disable WordPress plugins that have modified from being eligible for version updates. This is what I was looking for!

  12. Gabriel Silverman on Oct. 6th, 2011 at 3:01 pm
  13. Meh, I just indicate version of my plugin 999, good enough for me :)

  14. promaty on Feb. 20th, 2012 at 5:51 am

Post a Comment

Do you have a question or comment about this post. Please share! Your email address will not be published. Required fields are marked *