Around here we build all of our sites to handle 99.99999% of all updates that come along, including updates to the WordPress core, themes and plugins. We do that by making sure we follow a strict programming structure that will comply with those updates, like using child themes and not modifying anything in plugin files. This is a super important feature to our websites as most updates are security related. That means if you don’t update your plugins or theme files, you leave yourself open to a potential security risk and your site may get hacked. And that aint good for nobody.

Why Would You Disable a Plugin on WordPress

But every once in a great while, we come across the need to completely disable a plugin due to a couple possible reasons:

  • The developer makes substantial changes to the code that cause other features to break.
  • The customer requests complex functionality but doesn’t have the budget to cover it, so customizing an existing plugin cuts down on costs. Definitely don’t do this one very often, but once in a great while it comes up.
  • Some other developer built our clients site and manipulated a plugin so much that updating it breaks everything.

Here are the recommendations I have on solving this issue.

Option 1 – Install a Plugin to Disable Updates (Easiest, but bloated)

Install a Plugin to Disable Updates (Easiest, but bloated)

If you’re not familiar with WordPress yet, plugins are like phone apps; There’s a plugin for everything. I don’t really like this option because it seems backwards to add a plugin just to stop another plugin from updating. Nonetheless, this is definitely the easiest option because it requires zero programming experience.

Option 2 – Prevent Plugin Update Notification (Cleanest, but Not 100%)

Prevent Plugin Update Notification Cleanest but Not 100

This option is good, but it leaves you open to one big vulnerability when it comes to updates sneaking past you. Just because you may not see your plugin notification on your own website, that doesn’t mean it will be safe from updates if you use a management software like MainWP or InfiniteWP. They will still return as updatable and could easily be updated. But if you’re not using a 3rd party manager like those mentioned above, this could be an easy fix and requires only a little programming skills.

From the plugins root PHP file, add the following code right under the commented out plugin details:

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

Option 3 – Fake the Version of the Plugin (Dirtiest, but Solid)

Fake the Version of the Plugin (Dirtiest, but Solid)

This is the option I decided to go with on my particular situation. There’s a commented out section at the top of the main plugin file that contains the version number of the plugin. In order to prevent update notifications from happening, you can spoof the version number in that file to be a number far ahead of the current number. Like if you’re on version 1.0, and you never ever want to see an update again, set the version to 100.0. Guaranteed it won’t live past that. Here’s a snippet:

Before disabling updates:

/*
Plugin Name: LastGEN Gallery
Plugin URI: https://www.lastgen-gallery.com/
Description: A LastGENeration Gallery for WordPress
Version: 1.9.11
*/

After disabling updates:

/*
Plugin Name: LastGEN Gallery
Plugin URI: https://www.lastgen-gallery.com/
Description: A LastGENeration Gallery for WordPress
Version: 100.0
*/

Summary

Lots of good options here, but they all come with the huge caveat of “NEVER DO THIS”… heh. Like I said at the beginning, most updates are for good reasons, either new features and functions or more importantly security related. You want those updates and if you’re a developer you’re hopefully building your sites in such a way that allows you to apply any updates that come along. BUT in the off chance you have done everything right, and still find your self in a situation that requires it, you now know the available ways to fix the problem.