Updating WordPress plugins with WP-CLI keeps routine maintenance in the shell, which is useful on servers without dashboard access and during controlled change windows where the exact plugin slug matters. The command-driven path also makes it easier to preview pending updates, back up the site first, and apply the same workflow across more than one WordPress install.
The wp plugin update command reads the current site state from the WordPress document root, checks installed plugin versions against the versions available from the official plugin source, and then replaces the plugin files for the selected slugs. It can target one plugin directly, preview the result with –dry-run, or process a broader batch when the maintenance plan allows it.
Plugin updates are write operations that can change code, database behavior, editor screens, or frontend output immediately. Run the command as the account that owns the WordPress files, create a rollback point before touching production, and keep installation or automatic-update policy in separate procedures instead of expanding a maintenance window ad hoc.
$ cd /var/www/example.com/public_html
$ wp plugin list --fields=name,status,update,version,update_version name status update version update_version akismet inactive none 5.6 classic-editor inactive available 1.6.5 1.6.7 hello inactive none 1.7.2 google-site-kit active none 1.175.0
The update and update_version columns are the quickest way to catch a single pending plugin before a broader batch command touches more than intended.
$ wp db export ~/backups/wordpress/pre-plugin-update.sql Success: Exported to '/home/user/backups/wordpress/pre-plugin-update.sql'.
Related: How to back up a WordPress site
$ wp plugin update classic-editor --dry-run Available plugin updates: name status version update_version classic-editor inactive 1.6.5 1.6.7
For a broader maintenance window, preview the same job with wp plugin update --all --dry-run --exclude=plugin-slug when one plugin must stay pinned.
$ wp plugin update classic-editor Downloading update from https://downloads.wordpress.org/plugin/classic-editor.1.6.7.zip... Installing the latest version... Plugin updated successfully. name old_version new_version status classic-editor 1.6.5 1.6.7 Updated Success: Updated 1 of 1 plugins.
When the maintenance window covers every pending plugin, the batch form is wp plugin update --all or wp plugin update --all --exclude=plugin-slug.
$ wp plugin list --fields=name,status,update,version,update_version name status update version update_version akismet inactive none 5.6 classic-editor inactive none 1.6.7 hello inactive none 1.7.2 google-site-kit active none 1.175.0
Plugin file updates can succeed while the site still fails on the next request because of changed settings, PHP compatibility, or a dependent add-on. If the updated plugin causes an outage, disable it quickly and restore the rollback point.