◦ Comprehensive security
◦ 24/7 support
WordPress Guide → WP-CLI → Automatic Updates
WordPress automatic updates for plugins & themes
Want to use the command line to enable and disable WordPress automatic updates for plugins/themes? Learn how to use the WP-CLI tool to manage auto updates!
How to enable & disable WordPress automatic updates for plugins & themes using WP-CLI
WP-CLI is a command-line tool for managing your WordPress installations.
Get fast, reliable hosting for WordPress
Power your site with the industry’s fastest, most optimized WordPress hosting
Prerequisites
- SSH Access: If you are a Liquid Web Cloud client, SSH access is enabled by default.
- SSH Credentials: Locating your SSH credentials in managed WordPress and managed WooCommerce hosting.
- SSH Client to Use for the Connection:
To start, log in to your website server using you4 SSH credentials via the SSH client. Once in, make sure you’re in the valid directory, and in this case, we’ll need to be in the directory of your WordPress installation:
[wpclitesting@host ~]$ cd public_html/
If you can see your WordPress configuration files listed, you’re in the right place:
[wpclitesting@host public_html]$ ls
cgi-bin license.txt wp-activate.php wp-blog-header.php wp-config.php wp-content wp-includes wp-load.php wp-mail.php wp-signup.php xmlrpc.php
index.php readme.html wp-admin wp-comments-post.php wp-config-sample.php wp-cron.php wp-links-opml.php wp-login.php wp-settings.php wp-trackback.php
WordPress automatic updates for plugins
Detailed information about the command we’re going to use for this can be found in the wp plugin auto-updates <command> documentation, but you can also always get help directly in the command line:
[wpclitesting@host public_html]$ wp help plugin auto-updates
To begin with, let’s start by checking the status of the WordPress automatic updates for all our plugins with the following command:
[wpclitesting@host public_html]$ wp plugin auto-updates status –all
+———————+———-+
| name | status |
+———————+———-+
| akismet | disabled |
| hello | disabled |
| pagelayer | disabled |
| popularfx-templates | disabled |
+———————+———-+
However, if you wish to check the status of WordPress automatic updates for some particular plugin, you can specify it in the command like this:
[wpclitesting@host public_html]$ wp plugin auto-updates status pagelayer
+———–+———-+
| name | status |
+———–+———-+
| pagelayer | disabled |
+———–+———-+
Now, if we would like to enable WordPress automatic updates for some particular plugin, we can do it like this:
[wpclitesting@host public_html]$ wp plugin auto-updates enable pagelayer
Success: Enabled 1 of 1 plugin auto-updates.
[wpclitesting@host public_html]$ wp plugin auto-updates status pagelayer
+———–+———+
| name | status |
+———–+———+
| pagelayer | enabled |
+———–+———+
And, in case we decide to enable the WordPress automatic updates for all our plugins, we can also do it with a single command:
[wpclitesting@host public_html]$ wp plugin auto-updates enable –all
Success: Enabled 4 of 4 plugin auto-updates.
[wpclitesting@host public_html]$ wp plugin auto-updates status –all
+———————+———+
| name | status |
+———————+———+
| akismet | enabled |
| hello | enabled |
| pagelayer | enabled |
| popularfx-templates | enabled |
+———————+———+
Now, if we change our mind and want to disable automatic updates for a single plugin or for all of them, we can easily do that with WP-CLI as well:
[wpclitesting@host public_html]$ wp plugin auto-updates disable pagelayer
Success: Disabled 1 of 1 plugin auto-updates.
[wpclitesting@host public_html]$ wp plugin auto-updates status pagelayer
+———–+———-+
| name | status |
+———–+———-+
| pagelayer | disabled |
+———–+———-+
[wpclitesting@host public_html]$ wp plugin auto-updates disable pagelayer
Success: Disabled 1 of 1 plugin auto-updates.
[wpclitesting@host public_html]$ wp plugin auto-updates disable –all
Success: Disabled 4 of 4 plugin auto-updates.
[wpclitesting@host public_html]$ wp plugin auto-updates status –all
+———————+———-+
| name | status |
+———————+———-+
| akismet | disabled |
| hello | disabled |
| pagelayer | disabled |
| popularfx-templates | disabled |
+———————+———-+
WordPress automatic updates for themes
Similar to the previous command, we can also get help on how to use the command directly in the command line, or, if you prefer, you can open up the wp theme auto-updates <command> documentation as a guide.
[wpclitesting@host public_html]$ wp help theme auto-updates
The command usage is quite similar to the previously used one, and to check the status of WordPress automatic updates for all our themes, we can use the following command:
[wpclitesting@host public_html]$ wp help theme [wpclitesting@host public_html]$ wp theme auto-updates status –all
+—————–+———-+
| name | status |
+—————–+———-+
| popularfx | disabled |
| twentynineteen | disabled |
| twentytwenty | disabled |
| twentytwentyone | disabled |
+—————–+———-+
If you would like to check are automatic updates enabled for some specific theme, you can do it by specifying the theme name in the command like this:
[wpclitesting@host public_html]$ wp help theme auto[wpclitesting@host public_html]$ wp theme auto-updates status twentynineteen
+—————-+———-+
| name | status |
+—————-+———-+
| twentynineteen | disabled |
+—————-+———-+
To change the status of automatic updates and enable them, for example, for the twentynineteen theme, use this command:
[wpclitesting@host public_html]$ wp theme auto-updates enable twentynineteen
Success: Enabled 1 of 1 theme auto-updates.
[wpclitesting@host public_html]$ wp theme auto-updates status twentynineteen
+—————-+———+
| name | status |
+—————-+———+
| twentynineteen | enabled |
+—————-+———+
But if you would like to enable the automatic updates for all the themes you have, you can do that as well:
[wpclitesting@host public_html]$ wp theme auto-updates enable –all
Success: Enabled 4 of 4 theme auto-updates.
[wpclitesting@host public_html]$ wp theme auto-updates status –all
+—————–+———+
| name | status |
+—————–+———+
| popularfx | enabled |
| twentynineteen | enabled |
| twentytwenty | enabled |
| twentytwentyone | enabled |
+—————–+———+
Of course, if you wish to disable automatic updates for one theme or for all of them, you can accomplish that with WP-CLI:
[wpclitesting@host public_html]$ wp theme auto-updates disable –all
Success: Disabled 4 of 4 theme auto-updates.
[wpclitesting@host public_html]$ wp theme auto-updates status –all
+—————–+———-+
| name | status |
+—————–+———-+
| popularfx | disabled |
| twentynineteen | disabled |
| twentytwenty | disabled |
| twentytwentyone | disabled |
+—————–+———-+
[wpclitesting@host public_html]$ wp theme auto-updates disable twentynineteen
Success: Disabled 1 of 1 theme auto-updates.
[wpclitesting@host public_html]$ wp theme auto-updates status twentynineteen
+—————-+———-+
| name | status |
+—————-+———-+
| twentynineteen | disabled |
+—————-+———-+
Getting started with verifying WordPress checksums
WP-CLI is a versatile and nifty tool that helps us manage WordPress installation quickly and efficiently with basic command-line knowledge. Also, keeping your plugins and themes up to date is one of the essential things for having a secure website.
When you’re ready to upgrade your WordPress hosting, Liquid Web can help. We’ve been offering the premium hosting for WordPress sites for decades—with the fastest speeds, best uptime guarantees, and most robust security features. Click below to explore options or start a chat to connect with one of our WordPress hosting experts right now.
Knowing how to verify the checksums of WordPress core files, all plugins installed from WordPress.org, and specific plugins installed from WordPress.org using simple-to-use WP-CLI commands will give you peace of mind in knowing that there are no non-standard files that exist in those folder directories.
Additional resources
What is WordPress? →
A complete beginner’s guide—from use cases, to basics, to how to get started
Rollback a plugin or theme using WP-CLI →
In this article, we’ll be running through some valuable commands for rolling back your site.
How to integrate WordPress and Slack →
If your org uses Slack and WordPress, there are several ways you can tie them together.