Development

WP-CLI 3.0: what breaks when you update, and what's new

· 6 min read
A new machined metal gear standing beside an old worn gear on a desk, with a keyboard and a terminal window on a monitor behind them

WP-CLI 3.0 is out, the first major release since 2.0. Some of your scripts may behave differently after wp cli update. It was released on December 1, 2026, with 3.0.1 following the same day. It needs PHP 7.2.24 or newer. It changes the default way plugin and theme commands load WordPress, stops forcing unlimited memory, and skips Git-managed plugins during updates. It also adds a lot: commands for abilities, AI, blocks and Site Health, proper SQLite support, and lower memory use on big sites. This article covers what to check before you update, then the new commands worth knowing. It’s based on the release notes and the pull requests behind them. WP-CLI 3.0 hasn’t been run for this article.

At a glance

Release3.0.0 on December 1, 2026. 3.0.1, a bug-fix release, came out the same day.
Size99 contributors and 1,444 merged pull requests, the largest WP-CLI release so far
PHP7.2.24 or newer, the same minimum as WordPress. Support for PHP 5.6 to 7.2.23 is gone.
Updatewp cli update. From 3.0 on, moving to the next major version will need wp cli update --major.
New commandswp ability, wp ai, wp block and wp site-health, plus many new subcommands

Before you update: what can break

The release notes list the breaking changes in one section. These are the ones most likely to affect a working setup.

Old PHP stops working

WP-CLI 3.0 needs PHP 7.2.24 or newer. Check with php -v on every server and CI image that runs wp. The command-line PHP can be a different version from the one serving your site. On older PHP, 3.0 stops with a clear error instead of a syntax error, but your scripts still stop. Stay on your current 2.x version there until PHP is upgraded.

Plugin and theme commands now load like the admin

The change comes from pull request 6255. WP-CLI runs WordPress in a “context”. The default used to be cli. It’s now auto, so wp plugin and wp theme commands run in the admin context, while commands like wp eval stay in cli. The change was promised back in 2.6 and fixes subtle failures with paid plugins that expect the admin to be loaded. The flip side is that plugin code meant for the dashboard can now also run during those commands. If a script that lists or updates plugins starts acting differently, try it with --context=cli to see if this is the cause.

No more unlimited memory

According to pull request 6207, WP-CLI used to set PHP’s memory_limit to unlimited every time it loaded WordPress. It now respects your PHP setting. A large export or search-replace that used to finish may now run out of memory if your command-line PHP has a low limit. wp cli info warns when the limit is low. To raise it for one command, run it as php -d memory_limit=1G $(which wp) …, or set a higher limit in the PHP configuration that WP-CLI uses. The $(which wp) trick assumes wp is the Phar itself, not a wrapper script.

Git-managed plugins are skipped during updates

If a plugin or theme folder is a version control (VCS) checkout, such as Git, Subversion or Mercurial, wp plugin update and wp theme update now skip it with a warning. Before, the update replaced the folder and wiped the checkout. That’s a good change, but a deploy script that relied on the old behavior will now leave those plugins on their old version, with only a warning. Add --include-vcs if you really want them updated.

Smaller changes

  • wp search-replace is stricter with serialized objects. It now only rebuilds plain stdClass objects, to block PHP object injection. If your data stores other classes, the release adds a search_replace_unserialize_options hook to allow specific ones.
  • wp plugin status and wp theme status are deprecated. Use list or get instead.
  • wp i18n make-json lost --purge and --no-purge. PO files are now the single source of truth.
  • WP_CLI_SKIP_PROMPT is now WP_CLI_ERROR_RERUN. Update any environment that sets it.
  • Self-updates need SHA-512 checks. The old MD5 check is gone.
  • Composer installs: if you install WP-CLI through Composer and use wp package, require wp-cli/package-command directly. The Phar still includes it.

A safe way to update

  1. Check the command-line PHP version with php -v.
  2. Search your scripts, cron jobs and CI files for wp plugin update, wp theme update, search-replace, plugin status, theme status, make-json --purge and WP_CLI_SKIP_PROMPT.
  3. Update one machine first with wp cli update, then confirm with wp cli version and wp cli info.
  4. Run your usual scripts against a staging copy, especially exports and search-replace on your largest site.
  5. Pin the WP-CLI version in CI images, so a future major release doesn’t arrive unannounced.

New commands worth knowing

Four new command packages ship inside the Phar:

  • wp ability lists, checks and runs abilities from the WordPress Abilities API. wp ability can-run checks whether an ability can run. That makes it a quick way to test the permission checks covered in our article on securing abilities in WordPress 7.2.
  • wp ai shows which AI capabilities are configured and can generate text or images from the command line.
  • wp block lists and inspects block types, patterns, styles, bindings and templates, and can export a template.
  • wp site-health runs Site Health checks and shows the debug information, which is handy for checking many sites from a script.

Other additions that save real time:

  • wp plugin check-update and wp theme check-update show available updates without installing them.
  • wp core check-update-db checks whether a database upgrade is pending.
  • wp post revision diff, restore and prune work with revisions without SQL.
  • wp media replace swaps an attachment’s file but keeps its ID.
  • wp db status gives a quick overview of the database.
  • wp i18n audit scans PHP, Blade and JavaScript files for common translation mistakes, with an output format for GitHub Actions.

SQLite and large sites

Sites that run on SQLite through the SQLite Database Integration plugin now work with wp db, wp search-replace and wp config create. If no mysql or mariadb client is installed, wp db query and wp db import fall back to WordPress’s own database connection. That matters more now that Reprint can pull a site into a local SQLite database.

For big sites, the output formatter can now stream table, JSON, CSV and YAML output. wp post list, wp comment list and wp user list load records in chunks, wp export batches its lookups, and wp search-replace scans each table once instead of once per column. Together with the memory change above, that’s a reason to retest large jobs rather than assume they’ll fail.

Should you update now?

On your own computer, yes, after checking PHP. On servers and in CI, update deliberately: check the scripts listed above, test on staging, and pin the version. Most of the breaking changes fix real problems, like wiping Git checkouts or plugins misbehaving outside the admin. They’re still changes, and a script that worked for years can now take a different path.

Sources