Skip to content

Managing WordPress Auto Updates with WP-CLI

WordPress, by default will only automatically update the installed version of core if it’s a maintenance or security release, or an update to a development release if you’re running a development version.

UpdateDefault on New WordPress Install
WordPress Core (Major Updates)No
WordPress Core (Minor Updates)Yes
WordPress Core (Development Updates)Yes
PluginsNo
ThemesNo

Through the wp-admin dashboard, you can enable WordPress Core (Major Updates), plugin updates and theme updates. Theme updates can be a bit of a pain, since you need to enable these one by one.

WP-CLI, the command line tool for WordPress, can make changing these settings easier.

Enable Auto Updates

To enable updates for all major core releases, type:

wp option update auto_update_core_major enabled

This will update WordPress version 6.4.0 to 6.5.0, for example. This option is disabled by default on new WordPress installations.

To enable updates for all minor core releases, type:

wp option update auto_update_core_minor enabled

This will update WordPress version 6.4.1 to 6.4.2, for example. This option is enabled by default on new WordPress installations.

To enable updates for all development releases, type:

wp option update auto_update_core_dev enabled

This will update WordPress version 6.4.1-beta1 to 6.4.2-beta2, for example. This option is enabled by default on new WordPress installations.

To enable auto-update for all plugins, type:

wp plugin auto-updates enable --all

To enable auto-update for all themes, type:

wp theme auto-updates enable --all

Disabling Auto Updates

To disable updates for all major core releases, type:

wp option update auto_update_core_major disabled

To disable updates for all minor core releases, type:

wp option update auto_update_core_minor disabled

To disable updates for all development releases, type:

wp option update auto_update_core_dev disabled

To disable auto-update for all plugins, type:

wp plugin auto-updates disable --all

To disable auto-update for all themes, type:

wp theme auto-updates disable --all

2 Comments

  1. Kirk Kirk

    This is a great article! I’m wondering if it’s possible to have auto major version updates automatically, but only once it’s stabilized a bit.

    So if you have 6.3.2 installed, and 6.4.0 comes out, the .0 release will be ignored until 6.4.1 comes out.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.