WP-CLI 3.0: What’s New and Actually Useful for WordPress Developers?
The first major release in years. Update right away? Yes, but take five minutes to check first 🙂 WP-CLI 3.0 came out on December 1. We only take what you’ll actually use in day-to-day WordPress work. What can we do?…
Anatoliy Dovgun
2 min read
The first major release in years. Update right away? Yes, but take five minutes to check first 🙂
WP-CLI 3.0 came out on December 1. We only take what you’ll actually use in day-to-day WordPress work.
What can we do?
Run Abilities from the terminal:wp ability list / can-run / run.
Check site health with one command:wp site-health status / check.
See what’s heavy in the database, and make light dumps:wp db size, wp db export --exclude_tables_data.
Work with revisions without wp-admin:wp post revision diff / restore / prune.
Replace a media file without a new ID:wp media replace.
Catch translation mistakes in CI:wp i18n audit --format=github-actions.
What to check before you update:
PHP 7.2.24+, and the update itself is now wp cli update --major.
`wp package` no longer bundles Composer inside the Phar. Check your packages (e.g. wp-cli/profile-command).
`memory_limit -1` is no longer forced. Big imports can fail.
`wp search-replace` unserializes only stdClass by default.
Plugins and themes under Git/SVN are skipped by wp plugin update / wp theme update.
AI can type the command. Only you press Enter. — Anatoliy Dovgun, with love from a WordPress developer · 4WP.dev, for WordPress developers
1. Update and check the environment
BASH
wp cli update --major
wp cli info
Without --major, wp cli update no longer jumps across major versions. wp cli info now warns when memory_limit is set low, so look at it before your next big import.
2. Abilities from the terminal
BASH
wp ability list
wp ability can-run core/get-site-info
wp ability run core/get-site-info
The same abilities an AI agent calls through MCP, now one command away. Register an ability in your plugin and check it from the terminal before you hand it to the agent. There is also wp ai status for the WordPress 7.0 AI Client.
How abilities are registered and called by agents: the Abilities API series on 4wp.dev.
13 chapters: from wp_register_ability to a site your client manages from an AI app, safely.
3. Site health in one command
BASH
wp site-health status
wp site-health check
The same checks as Tools → Site Health, but in a script, over SSH, in CI.
4. A light copy of the database
BASH
wp db size
wp db export dev.sql --exclude_tables_data=wp_actionscheduler_logs
wp db size now separates data and index size. --exclude_tables_data keeps the table schema but skips its rows: logs, sessions, queues stay out of the local copy.
5. Revisions and media
BASH
wp post revision diff 123 456
wp post revision restore 123
wp media replace 42 updated-photo.jpg
wp media replace keeps the attachment ID and metadata, so every block and post that uses the image stays intact.
6. i18n audit in CI
BASH
wp i18n audit ./4wp-faq --format=github-actions
Scans PHP and JavaScript for common internationalization mistakes and shows them right in the pull request.
In short
Update with --major, then wp cli info.
Abilities: test them in the terminal before the agent does.
--exclude_tables_data for local dumps.
wp i18n audit in CI.
Check packages, memory_limit, search-replace and Git-managed plugins before you update.
Want to try commands like these without breaking anything? Practice in a real terminal on 4wp.dev/wp-cli.