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
As is often the case, we already know how to enable and disable WordPress automatic updates for plugins/themes directly from WordPress and the Nexcess Portal:
As an alternative method in this article, we'll focus on how to accomplish this via the commands provided in the WP-CLI tool:
...a listing of all currently available WP-CLI commands with links to documentation on usage and subcommands.
In short, WP-CLI is a command-line tool for managing your WordPress installations.
SSH Access: If you are a Nexcess Cloud client, SSH access is enabled by default, but the How to enable SSH access article covers this topic as well.
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:
If you can see your WordPress configuration files listed, you’re in the right place:
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:
To begin with, let’s start by checking the status of the WordPress automatic updates for all our plugins with the following command:
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:
Now, if we would like to enable WordPress automatic updates for some particular plugin, we can do it like this:
And, in case we decide to enable the WordPress automatic updates for all our plugins, we can also do it with a single command:
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:
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.
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:
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:
To change the status of automatic updates and enable them, for example, for the twentynineteen theme, use this command:
But if you would like to enable the automatic updates for all the themes you have, you can do that as well:
Of course, if you wish to disable automatic updates for one theme or for all of them, you can accomplish that with WP-CLI:
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.
Useful YouTube > Nexcess Channel Links
Resources for More Information
Support: 24-Hour Assistance
If you need any assistance with the above-mentioned, don't hesitate to reach out. For 24-hour assistance any day of the year, Nexcess customers can contact our support team by email or through your Client Portal.
New Customers: Fully Managed Hosting Solutions
- How to Enable Auto-Updates for Plugins and Themes (via the user interface)
- Nexcess WordPress Plugins and Their Configurations
- How to Deactivate all Plugins and Change the Active Theme Using phpMyAdmin
- How to Update Plugins on your WordPress Site
Updating WordPress Plugins Individually for Admins
How to Disable WordPress Core Updates