1

Having modified several plugins, I want to stop them being updated (and over-writing the mods).

I don't just want to stop auto-updates, but also inadvertent updates by myself or another admin.

I don't want to disable 'new version available' notifications (because if there's a newer version I want to update to it, after editing to apply appropriate mods).

I'm wondering if there's something I can add to functions.php, which stops named (or all) plugin updates... and can be temporarily 'commented-out' to re-enable a manual update.

UPDATE: After further searches, what I want seems unlikely.

I haven't been able to find a way to retain 'update available' notices AND block updates.

My possible klunky work-around is:

1 Install original plugin. Leave unmodified and inactive. This should get 'update available' notices.

2 Install modified plugin, add 'modified' to name and change slug, activate. This shouldn't get 'update available' notices.

3 Add a message about which plugins are modified on the plugin page.

This way, original plugins can be modified without affecting site function.

Modified plugins won't get updated, and (using the reminder on the plugin page) a periodic visual comparison of version info with the original will show if an updated version is available (and which can be modded appropriately).

If there's a better option, I'll welcome it.

FURTHER UPDATE: I've since found 'Lock Your Updates' plugin (https://en-gb.wordpress.org/plugins/lock-your-updates/), which seems a useful solution.

Easy to set-up, it allows 'new version available' updates but enables plugins to be selected and blocked/unblocked from updates.

There's also a 'notes' feature for reminders on why a plugin is blocked, but I've not been able to get that working.

5
  • There are many WordPress plugins like Easy Updates Manager,Block Plugin Update if you flexible it doing with a plugin. And read wordpress.stackexchange.com/questions/25358/… this also.
    – Ranuka
    Nov 7, 2016 at 8:39
  • inadvertently!? Are you saying, if by mistake you click on update button of plugin then it don't get update?
    – Rishabh
    Nov 7, 2016 at 8:48
  • Don't modify plugin files directly, it could cause several problems, including security. Try to unregister the functions and then register your own modified version.
    – brobken
    Nov 7, 2016 at 8:48
  • @Rishabh ... Yes.
    – glvr
    Nov 7, 2016 at 13:07
  • @Ranuka ... Thanks. Easy Updates Manager looks like it'll be suitable. Isn't the Stack article you link to just to block notifications?
    – glvr
    Nov 8, 2016 at 15:43

2 Answers 2

3

Go into the PHP file for the plugin and change the information in the header comment. For example, this is the one from the Hello Dolly plugin that comes with WordPress:

/**
 * @package Hello_Dolly
 * @version 1.6
 */
/*
Plugin Name: Hello Dolly
Plugin URI: http://wordpress.org/plugins/hello-dolly/
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page.
Author: Matt Mullenweg
Version: 1.6
Author URI: http://ma.tt/
*/

Change the information in here to reflect that it is a "new" plugin. Just make sure you keep any copyright notices and such intact.

2
  • thanks. Does modifying a plugin name block the 'new version available' updates?
    – glvr
    Nov 8, 2016 at 16:05
  • It should. WordPress uses that data to check against the repository and see if new updates are available.
    – Cedon
    Nov 8, 2016 at 22:36
1

Use add_filter( 'auto_update_plugin', '__return_false' ); in your functions.php or plugins main file.

1
  • Thanks. That'll block auto-update. but not an inadvertent manual update by myself or another admin.
    – glvr
    Nov 8, 2016 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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