Cookbook › WP-CLI
Update plugins with WP-CLI
Paste into ChatGPT or ClaudeUse WP-CLI to list my plugins that have an update available. Then update WooCommerce and tell me the old and new version.
Changes your site. Standard asks you first in wp-admin; Trusted does it directly.
What happens
Section titled “What happens”- Your assistant runs
wp plugin listto see versions and available updates. - It runs
wp plugin update woocommerce. WordPress downloads the update from WordPress.org and installs it. - It reads the version back, so you know the update really happened.
Try also
Section titled “Try also”- “Use WP-CLI to install and activate the Classic Editor plugin.”
- “Is WordPress itself up to date? Update it if not.”
- “Turn on auto-updates for Yoast SEO.”
Good to know
Section titled “Good to know”- Updates come from WordPress.org only. Plugins sold elsewhere update the way their vendor provides.
- Keep a backup before big updates: see Back up your site first. An update can’t be undone with a click.