Post Pic

How to disable plugin updates on your WordPress blog

By default, WordPress automatically checks if plugins updates are available, and if yes, ask you to install it. It is useful in most cases, but when building websites for clients you may not want them to updates plugins, for example if you modified a plugin especially for them. Here is an easy way to disable plugin updates on any WordPress blog.

Nothing complicated: Simply paste the following code into your functions.php, save it, and you're done.

remove_action( 'load-update-core.php', 'wp_update_plugins' );
add_filter( 'pre_site_transient_update_plugins', create_function( '$a', "return null;" ) );

Thanks to WP Snippets for the useful tip!

16 Responses

Apr 24 2012 17:17

Why do you want to remove updates on Plugins?

Surely updates are a necessity as they provide security fixes and useful improvements to the current code.

Apr 24 2012 17:43

Seriously, please stop with this “without a plugin” crap. Here: http://wordpress.org/extend/plugins/disable-wordpress-plugin-updates/

Thank you.

Apr 24 2012 17:49

I’m not saying “disable plugin updates, they are useless” but in SOME cases this snippet can be useful and that’s why I published it.

Apr 24 2012 18:37

The title of this post might as well be, “How to get your clients hacked.” If they shouldn’t be applying updates, why do they have an admin account? This is a rather dangerous way to address the kind of issue described in the post. (The issue described is a quite legitimate issue, but there are safe ways of addressing it. :-) )

Web applications aren’t static websites; they need to have someone responsible maintaining and updating them to address security issues. That person should have rights to update plugins, and others shouldn’t have the ability to do so in the first place.

Apr 25 2012 00:10

This may come in handy for a couple of clients for which I have installed WP. Just for my piece of mind so I won’t be forced to check their plugins anymore haha

Apr 25 2012 07:46

Useful and handy tip. It time to delete that crappy plugin.

Apr 25 2012 10:13

I really don’t understand why you would want to disable plugin updates. Surely you need to update your plugins frequently to make sure any security holes are fixed?

Apr 25 2012 19:37

This is great! and very handy when you have taken time to customize a plug in and want to make sure those changes aren´t lost.

thank you!

Apr 25 2012 21:15

Initially, I was thinking “Why would I want to disable plugins” until you pointed out customizing plugins and preventing the end-user from updating and breaking it in the future. Then, it made sense.

Apr 27 2012 12:03

This implementation is incorrect. You shouldn’t really remove a core action from WordPress.

Instead you should read the documentation on configuring your WP Config.
http://codex.wordpress.org/Editing_wp-config.php

define(‘DISALLOW_FILE_EDIT’,true); // Disable theme and plugin editor
define(‘DISALLOW_FILE_MODS’,true); // Disable core and plugin updates

Hope you find that useful.

Apr 28 2012 10:03

@Jason: You’re right, this is a way better implementation. I didn’t knew about it, thanks!

May 01 2012 07:32

I think this will be useful if plugins updates can be disabled based upon single plugin and user. Say I modified a plugin and I don’t want anybody except me to see the update notice.

Jun 14 2012 11:00

How to enable them again after disabling?

Removing “remove_action( ‘load-update-core.php’, ‘wp_update_plugins’ );
add_filter( ‘pre_site_transient_update_plugins’, create_function( ‘$a’, “return null;” ) );” from my functions.php does not work.

Jul 18 2012 00:06

This is very helpful. I’ve got some plugins that I tweak and when I update them I need to tweak them again. sometimes this is a PIA and I need to schedule the time to do it. If the client is just updating the plugin every time it the alert tells them to it will cause functionality issues.

Also, let’s face it, some plugins are complex and the updates sometimes are not stable initially. I like to wait a bit and see what the changes are and if complicated wait to see if it’s stable. If my clients are just updating every time they log in, this can’t be done.

This is not every-time every case. But I’ll be using it an am appreciative.
Thanks!!

Nov 02 2012 12:26

superb! It will help me a lot. Is there any code snippets to disable theme updates? My clients always pressurize me to update themes when it appears.

Dec 10 2012 21:55

I don’t wish to delete ALL update messages. Just those I choose not to install. It’s irritating to have to have them continue to show! How can I delete SPECIFIC update notifications?

Trackbacks:

Leave a Comment

* Name, Email, Comment are Required

WP Theme of the week

Sponsored Likebox