2026年11月13日

2026年11月13日

Disable Auto-Updates for Specific WordPress Plugins (Filter, WP-CLI)

This article is a localized edition of the Japanese original. Read the Japanese original

Since WordPress 5.5 you can turn auto-updates on or off for each plugin. That lets you stop auto-updates only for plugins you want to test before updating, such as WooCommerce, or for plugins you have modified, while leaving everything else to update automatically.

This article covers the three methods below. The steps and code were tested in November 2026 on WordPress 7.1 (Japanese edition) and WP-CLI 2.12.

Method Best for
Switch it in the admin screen Toggling a few plugins by hand
auto_update_plugin filter Locking the setting so it cannot be changed from the admin screen, or applying the same setting across several sites
WP-CLI Switching many plugins at once on the server, or scripting the procedure

Toggle auto-updates for a specific plugin in the admin screen

  1. In the admin screen, open "Plugins" → "Installed Plugins".
  2. In the "Automatic Updates" column of the list, each plugin has an "Enable auto-updates" or "Disable auto-updates" link. Click "Disable auto-updates" for the plugin you want to stop.

To switch several plugins at once, select their checkboxes, choose "Enable Auto-updates" or "Disable Auto-updates" from "Bulk actions", and click "Apply".

This setting is stored in the database in the auto_update_plugins option, as the list of plugins with auto-updates enabled. Newly installed plugins start with auto-updates disabled.

Stop auto-updates for specific plugins with the auto_update_plugin filter

Any administrator can change the admin-screen setting. If you want auto-updates for a particular plugin to stay off, use the auto_update_plugin filter.

Where to put the code

If you put it in your theme's functions.php, the setting disappears when you switch themes. We recommend saving it as a single file in wp-content/mu-plugins/ (a must-use plugin). Create the mu-plugins folder if it does not exist. PHP files in this folder are loaded without being activated and cannot be deactivated from the admin screen.

Save the following as wp-content/mu-plugins/disable-plugin-autoupdate.php.

<?php
/**
 * Plugin Name: Disable auto-updates for specific plugins
 * Description: Turns off auto-updates only for the listed plugins.
 */

add_filter( 'auto_update_plugin', function ( $update, $item ) {
	// Plugins to keep off auto-updates (plugin-folder/main-file)
	$disabled = array(
		'woocommerce/woocommerce.php',
		'elementor/elementor.php',
	);

	if ( isset( $item->plugin ) && in_array( $item->plugin, $disabled, true ) ) {
		return false;
	}

	// Everything else follows the admin-screen setting ($update can be null)
	return $update;
}, 10, 2 );

$item->plugin holds the "plugin folder/main file" value, such as woocommerce/woocommerce.php. You can look up the values for installed plugins with this WP-CLI command.

wp plugin list --fields=name,file,auto_update

Why the arguments have no type declarations

The first argument of this filter, $update, is not always true or false; it can also be null. When WordPress renders the plugin list, it calls auto_update_plugin with null to find out whether a filter is forcing the value, and treats any return value other than null as "forced".

So if you declare the argument as bool, as below, opening the plugin list causes a fatal TypeError (must be of type bool, null given).

// Wrong: TypeError when null is passed to $update
add_filter( 'auto_update_plugin', function ( bool $update, object $item ): bool {
	return $update;
}, 10, 2 );

For plugins you are not targeting, return the $update you received unchanged. If you return true or false, every plugin becomes a "forced setting" and can no longer be toggled from the admin screen.

How it looks in the admin screen

For plugins where the filter returns false, the link in the "Automatic Updates" column disappears and "Auto-updates disabled" is shown instead. You cannot turn it back on from the admin screen. Plugins not covered by the filter can still be toggled with "Enable auto-updates" and "Disable auto-updates" as before.

Toggle auto-updates with WP-CLI

In WP-CLI, use the wp plugin auto-updates command. The arguments are plugin slugs (the name column of wp plugin list).

# Show the auto-update status of all plugins
wp plugin auto-updates status --all

# Disable auto-updates for specific plugins
wp plugin auto-updates disable woocommerce elementor

# Enable auto-updates for a specific plugin
wp plugin auto-updates enable akismet

# Disable / enable auto-updates for all plugins
wp plugin auto-updates disable --all
wp plugin auto-updates enable --all

# View the stored setting (the list of plugins with auto-updates enabled)
wp option get auto_update_plugins --format=json

wp plugin auto-updates changes the same auto_update_plugins option as the admin screen. status also shows this stored value and does not reflect what the auto_update_plugin filter forces. If you enable a plugin that the filter blocks, it is shown as enabled, but the actual auto-update is still stopped by the filter.

On multisite, this setting is stored network-wide (as a site option). To read the value directly, use wp site option get auto_update_plugins --format=json.

How this differs from stopping all auto-updates

If you want to stop auto-updates for all plugins rather than specific ones, use the following filters. Core minor updates (including security fixes) keep running.

<?php
// Stop auto-updates for all plugins
add_filter( 'auto_update_plugin', '__return_false' );

// Also stop theme auto-updates
add_filter( 'auto_update_theme', '__return_false' );

By contrast, adding the following constant to wp-config.php stops every automatic update, including core, plugins, themes and translations.

define( 'AUTOMATIC_UPDATER_DISABLED', true );

With this constant set to true, you cannot keep only core minor updates through filters such as allow_minor_auto_core_updates, because the automatic update system itself is disabled. If you only want to stop specific plugins, do not use this constant; use the filter from the previous section.

Adjust the auto-update email notifications

When plugin auto-updates finish, a results email is sent to the site's administration email address. You can turn the notification off or change the recipients with filters.

<?php
// Do not send the plugin auto-update results email
add_filter( 'auto_plugin_update_send_email', '__return_false' );

To change the recipients, use the auto_plugin_theme_update_email filter, which receives the email before it is sent (to, subject, body, headers). You can pass several recipients to to as an array.

<?php
add_filter( 'auto_plugin_theme_update_email', function ( $email ) {
	$email['to'] = array( 'admin@example.com', 'dev@example.com' );
	return $email;
} );

To run your own code after all automatic updates have finished, use the automatic_updates_complete action. The example below writes the names of updated plugins to the PHP error log.

<?php
add_action( 'automatic_updates_complete', function ( $results ) {
	if ( empty( $results['plugin'] ) ) {
		return;
	}
	$names = array();
	foreach ( $results['plugin'] as $result ) {
		$names[] = $result->name;
	}
	error_log( 'Plugin auto-updates: ' . implode( ', ', $names ) );
} );

Update plugins with auto-updates turned off by hand

For plugins with auto-updates turned off, check regularly for new versions, take a backup, and then update them manually. Do not leave updates that include security fixes uninstalled.

# List plugins with updates available (does not update anything)
wp plugin update --all --dry-run

# Update only a specific plugin
wp plugin update woocommerce

In the admin screen, you can update from "Dashboard" → "Updates", or with "Update now" under "Plugins" → "Installed Plugins".

Related articles

Questions about WordPress? The publisher of this site is based in Japan and replies in Japanese. Contact (Japanese)

お気軽にご相談ください

お見積りへ お問い合わせへ
▲