How to Disable Auto-updates for Plugins in WordPress?

Disabling auto updates for individual plugins in most cases is normally not needed. As default, plugins won’t update by themselves unless you tell them to, and this is something you need to change in the WP admin’s plugin page.

But for some instances, it might be good to force disable auto updates. One use case is when you have an extensive network with updates enabled for a plugin. This means that you can not navigate to a subsite and disable auto-updates for that plugin there.

If this is not what you’re looking for, then we also have an article outlining how to disable auto updates for all plugins, themes and WP core itself.

Disabling auto updates using a must-use plugin

There are different ways of disabling updates per plugin, but the recommended way is to use a must-use plugin. This ensures you that the plugin will never update unless you actually go in and remove the must-use plugin.

Begin by choosing the text editor of your choice and paste the block of code below. If you’re logged in via SSH you can use nano or vim in the wp-content/mu-plugins folder with your desired file name (nano ~/public/wp-content/mu-plugins/my-mu-plugin.php):

<?php
function filter_plugin_updates( $value ) {
    unset( $value->response['plugin-folder-name/plugin-file-name.php'] );
    return $value;
}

add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );

The only thing you need to change with this code is the plugin folder name and its main PHP file in the response array. Our plugin Servebolt Optimizer would for example be:

<?php
function filter_plugin_updates( $value ) {
    unset( $value->response['servebolt-optimizer/servebolt-optimizer.php'] );
    return $value;
}

add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );
Image showing relative path to Servebolt Optimizer
Relative Path to Servebolt Optimizer

Save that PHP file with whatever name you want inside the mu-plugins directory.

Be aware that you now won’t be able to upgrade the plugin from WP admin. Should you want to update you either need to do that manually, or disable the mu-plugin. The yellow field shown below won’t simply exist:

Servebolt Optimizer in WP admin plugins with update available
Servebolt Optimizer with an update available. Will not show with auto-updates turned off

And as always, should you have any additional questions please don’t hesitate to contact our support chat at servebolt.com!