WP-CLI v3.0.1 Release Notes

WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ v3.0.1 is a hotfix release addressing an autoloader precedence regression introduced in v3.0.0 that affected users with older WP-CLI packages installed in their packages directory (~/.wp-cli/packages/).

What’s fixed

  • Prevented installed packages from shadowing WP-CLI framework and bundled classes (wp-cli/wp-cli#6472): Restored strict autoloader precedence (framework > bundled commands > installed packages) and fixed LazyCommand class loading so older bundled command dependencies vendored inside installed packages (such as wp-cli/doctor-command v2.x) can no longer cause split-brain fatal errors in commands like wp plugin list, wp post list, or wp user list.
  • Kept packages metadata in sync across WP-CLI upgrades (wp-cli/package-command#264, v3.1.1): wp package update now syncs the root wp-cli/wp-cli version in ~/.wp-cli/packages/composer.json (reverting safely with a compatibility hint if an installed package doesn’t yet support 3.x), declares bundled WP-CLI commands in replace so third-party packages stop vendoring duplicate copies of bundled commands, and warns when installing or updating a package that is already bundled with WP-CLI.

Updating

Run wp cli update to upgrade to v3.0.1, or download the new Phar directly from the v3.0.1 GitHub release.

If you have community packages installed in ~/.wp-cli/packages/, you can also run wp package update after upgrading to sync your packages directory for 3.0.1.

Thank you

A big thank you to @pbiron (Paul V. Biron) for quickly reporting the issue (wp-cli/wp-cli#6469) and helping test and confirm the fix!

Full changelog

#release, #v3-0-1

WP-CLI v3.0.0 Release Notes

A new major releaseMajor Release A set of releases or versions having the same major version number may be collectively referred to as “X.Y” -- for example version 5.2.x to refer to versions 5.2, 5.2.1, and all other versions in the 5.2. (five dot two dot) branch of that software. Major Releases often are the introduction of new major features and functionality. of WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/, WP-CLI v3.0.0, is now available! For this release, we had 99 contributors collaborate to get 1,444 pull requests merged — making this the largest WP-CLI release to date.

As our first major release since v2.0.0, WP-CLI v3.0.0 raises the minimum PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/index.php requirement to PHP 7.2.24+, bundles four brand-new command packages, brings first-class SQLite support and streaming output for large sites, decouples wp package from embedded Composer, and ships hundreds of new commands, flags, and bug fixes across the ecosystem. Make sure to review the breaking changes before upgrading. As always, you can also skip directly to the detailed changelog if you prefer.

If you already use WP-CLI on PHP 7.2.24+, updating is as simple as wp cli update (going forward from v3.0.0, crossing major versions will require wp cli update --major). Else, check out our website for recommended installation methods.

Breaking changes

Because this is a major release, there are several intentional breaking changes to be aware of before upgrading:

  • Minimum PHP version is now 7.2.24+. WP-CLI v3.0.0 drops support for PHP 5.6 through 7.2.23. The Phar bootstrap now includes a minimum PHP guard, and wp cli update --stable / --nightly check the release manifest’s PHP requirement before updating.
  • Cross-major self-updates require --major. Starting with v3.0.0, wp cli update will no longer jump across major versions unless you pass --major. Self-updates also strictly require SHA-512 verification (the legacy MD5 check has been removed).
  • wp-cli/package-command is decoupled from embedded Composer. The wp package command now drives Composer as a child process rather than bundling composer/composer inside the Phar, and wp-cli/package-command has been moved to require-dev in wp-cli/wp-cli-bundle. Phar users still have wp package out of the box; Composer-based installations that rely on wp package should require wp-cli/package-command directly.
  • Default --context is now auto. Previously defaulting to cli, WP-CLI now automatically selects the appropriate context (admin vs cli) depending on the command being run.
  • Forced infinite memory_limit removed. WP-CLI no longer forces PHP’s memory_limit to -1. Instead, wp cli info warns when your PHP memory_limit or OS-level ulimit -v is set low.
  • VCS-controlled plugins and themes are skipped during updates by default. Plugins and themes managed by GitGit Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. Most modern plugin and theme development is being done with this version control system. https://git-scm.com/, SubversionSVN Apache Subversion (often abbreviated SVN, after its command name svn) is a software versioning and revision control system. Software developers use Subversion to maintain current and historical versions of files such as source code, web pages, and documentation. Its goal is to be a mostly compatible successor to the widely used Concurrent Versions System (CVS). WordPress core and the wordpress.org released code are all centrally managed through SVN. https://subversion.apache.org/., or Mercurial are no longer overwritten during wp plugin update or wp theme update unless explicitly overridden.
  • wp plugin status and wp theme status are deprecated. Use wp plugin list / wp plugin get and wp theme list / wp theme get instead.
  • wp i18n make-json purge flags removed. PO files are now treated as the single source of truth; the --purge / --no-purge flags have been removed from wp i18n make-json.
  • Hardened unserialize() in wp search-replace. unserialize() now defaults to allowed_classes => ['stdClass'] to prevent PHP object injection, with a filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. hook available if you need to allow custom classes.
  • Environment variable rename. WP_CLI_SKIP_PROMPT has been renamed to WP_CLI_ERROR_RERUN
  • Mustache v3. The bundled Mustache library has been upgraded to version 3.

Minimum PHP version bumped to 7.2.24+

In the v2.12.0 release notes, we noted how much trickery was needed to support PHP 8.4 while still keeping compatibility with PHP 5.6. With WP-CLI v3.0.0, we’ve finally bumped the minimum requirement to PHP 7.2.24+ — matching WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. — and added full compatibility up through PHP 8.5.

This unlocked modern PHP features, brought static analysis up to PHPStan level 9 across our repositories, and let us strip away years of legacy compatibility workarounds. We also added a PHP version guard directly into the Phar bootstrap and manifest checks into wp cli update, so older environments get a clear error instead of a syntax failure.

Four newly bundled command packages

WP-CLI v3.0.0 ships with four brand-new official command packages bundled right into the Phar:

WordPress Abilities APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. (wp ability)

Introduced in WordPress 6.9, the Abilities API provides a standardized way to register and discover distinct units of functionality on a site. The new wp ability command lets you list, inspect, validate, and run registered abilities and categories straight from the terminal.

# List all registered abilities
$ wp ability list
+---------------------------+----------------------+----------+------------------------------------------+
| name                      | label                | category | description                              |
+---------------------------+----------------------+----------+------------------------------------------+
| core/get-site-info        | Get Site Information | site     | Returns site information configured i... |
| core/get-user-info        | Get User Information | user     | Returns basic profile details for the... |
| core/get-environment-info | Get Environment Info | site     | Returns core details about the site's... |
+---------------------------+----------------------+----------+------------------------------------------+

# Check permissions and execute an ability
$ wp ability can-run core/get-site-info
$ wp ability run core/get-site-info

WordPress AI Client (wp ai)

Built for WordPress 7.0’s AI Client, wp ai lets you check which AI capabilities are configured, inspect connectors, and generate text (including with image inputs) or images directly from the command line.

# Check which AI capabilities are supported
$ wp ai status
+------------------+-----------+
| Capability       | Supported |
+------------------+-----------+
| Text Generation  | Yes       |
| Image Generation | No        |
+------------------+-----------+

# Generate text from a prompt
$ wp ai generate text "Write a haiku about WordPress"
Success: Generated text:
Open source and free
Empowering creators
WordPress shines bright

BlockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. Editor management (wp block)

The new wp block command gives you full visibility and control over registered block types, block patterns, pattern categories, block styles, block bindings, synced patterns, and block templates & template parts.

# List all registered block types
$ wp block type list

# Inspect a specific block pattern
$ wp block pattern get my-theme/hero

# List styles registered for the core button block
$ wp block style list --block=core/button

# Export a block template to STDOUT
$ wp block template export twentytwentyfour//single --stdout

Site Health (wp site-health)

You can now run WordPress Site Health checks, inspect overall status, and pull Site Health debug information right from WP-CLI with wp site-health.

# Check overall Site Health status
$ wp site-health status

# Run Site Health tests
$ wp site-health check

# List available debug info sections and inspect them
$ wp site-health list-info-sections
$ wp site-health info wp-core

SQLite support and $wpdb fallback for database commands

Working with WordPress sites powered by SQLite (via the SQLite Database Integration pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party., including v3.0) is now a first-class experience across WP-CLI.

The wp db commands, wp search-replace, and wp config create (where --dbname and --dbuser are now optional when SQLite integration is active) all work seamlessly with SQLite databases. In addition, wp db query and wp db import now fall back to $wpdb when neither a mysql nor mariadb client binary is installed in your environment — and WP-CLI now also detects MariaDB 10.5+ binaries (mariadb, mariadb-dump, mariadb-check) before falling back to MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com equivalents.

Streaming output and chunked queries for large sites

Running list or export commands on sites with hundreds of thousands of rows used to chew through memory fast. WP-CLI v3.0.0 introduces true streaming output in Formatter for table, json, csv, and yaml formats whenever commands yield an iterator — keeping only requested fields in memory.

Command packages take advantage of this right away:

  • wp post list, wp comment list, and wp user list now load records in chunks.
  • wp export batches term, metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress., and comment lookups across posts.
  • wp search-replace scans each table once across all columns instead of repeatedly scanning per column.
  • wp site empty replaces O(n) per-item cache operations with a single wp_cache_flush().

Smarter interactive experience: command autocorrect, better --prompt, and fatal error recovery

We’ve invested heavily in day-to-day ergonomics when working interactively in a terminal:

  • Automatic command suggestions: Mistype a command in an interactive terminal and WP-CLI can offer to run the closest match right away (preserving your positional arguments, and configurable via WP_CLI_AUTOCORRECT). Non-interactive shells and scripts are never blocked by prompts.
  • Richer --prompt mode: Interactive prompts now show argument descriptions, default values, and mask sensitive values (like database passwords) as you type.
  • Helpful fatal error recovery: WP-CLI hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same. into WordPress’s fatal error handler to include backtraces and suggest re-running with --skip-plugins or --skip-themes when a plugin or theme crashes the site.
  • Upgraded wp help: Help screens now render clickable OSC 8 terminal hyperlinks (with footnote fallback), show disabled commands along with the reason they are disabled, link directly to the WP-CLI Handbook, and support --full for recursive help across subcommands.

Decoupled and modernized wp package

Previously, wp package embedded composer/composer directly inside the WP-CLI Phar, inflating Phar size and causing dependency conflicts with Composer plugins and newer PHP versions. In v3.0.0, wp package drives Composer as a child process instead — keeping the Phar lean and compatible.

On top of that, wp package gained several quality-of-life improvements:

  • Uses the Packagist v2 Metadata API and defaults package installations to @stable instead of the default branch.
  • Adds wp package get and wp package is-installed subcommands.
  • Adds --skip-update-check to wp package list, --no-interaction to prevent Git/SSHSSH Secure SHell - a protocol for securely connecting to a remote system in addition to or in place of a password. prompts, and optional package name arguments to wp package update.
# Check if a package is installed and inspect its details
$ wp package is-installed wp-cli/doctor-command
$ wp package get wp-cli/doctor-command

# Update a single package without prompts
$ wp package update wp-cli/doctor-command --no-interaction

New commands for content, media, fonts, icons, and privacy

wp-cli/entity-command and wp-cli/media-command picked up a big wave of new subcommands:

  • Post revisionsRevisions The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision.: wp post revision restore, wp post revision diff, and wp post revision prune let you compare, restore, and clean up old revisions without touching SQL.
  • Media management: wp media replace swaps the underlying file for an existing attachment while keeping its ID and metadata intact (and wp media regenerate --update-attachment-refs updates post content references). wp media prune removes generated thumbnails, and wp media import now supports STDIN, --skip-duplicates, and target directories.
  • Font Library & SVG Icons: Manage WordPress 6.5+ Font Library collections, families, and faces with wp font, and inspect registered SVG icons with wp icon and wp icon collection.
  • Site & term cleanup: Look up multisiteMultisite Multisite is a WordPress feature which allows users to create a network of sites on a single WordPress installation. Available since WordPress version 3.0, Multisite is a continuation of WPMU or WordPress Multiuser project. WordPress MultiUser project was discontinued and its features were included into WordPress core. Advanced Administration Handbook -> Create A Network. blogs directly by URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org with wp site get, remove custom prefixed tables with wp site delete --delete-tables-with-prefix, and prune unused or single-post terms with wp term prune.
  • GDPR privacy requests: Manage personal data export and erasure requests with wp user privacy-request.
# Diff and restore post revisions
$ wp post revision diff 123 456
$ wp post revision restore 123
Success: Restored revision 123.

# Replace an attachment file while keeping its attachment ID
$ wp media replace 42 updated-photo.jpg

# Install a Google Font family via the Font Library
$ wp font family install google-fonts inter

# Prune unused terms from a taxonomy
$ wp term prune post_tag

Expanded database, core, config, and extension management

Everyday site administration commands also gained a lot of new capabilities:

  • Database overview & users: wp db status gives an at-a-glance health overview of your database, wp db users manages MySQL/MariaDB database accounts, wp db size can break down data vs. index sizes separately, and wp db export --exclude_tables_data exports table schemas while skipping specific tables’ data.
  • Core & config: Check whether a database upgrade is pending with wp core check-update-db, format wp core update output with --format, automatically clean up obsolete core files via $_old_files, and use new wp config add and wp config update subcommands.
  • Plugins & themes: Check for updates without installing via wp plugin check-update and wp theme check-update, download ZIP archives without loading WordPress via wp plugin download and wp theme download, install plugin dependencies with --with-dependencies / wp plugin install-dependencies, spot closed WordPress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ plugins, and distinguish block themes from classic themes via the new type field in wp theme list.
# Check if a core database upgrade is needed
$ wp core check-update-db

# Inspect database health or list available plugin updates
$ wp db status
$ wp plugin check-update

# Download a plugin archive without loading WordPress
$ wp plugin download akismet

New wp i18n audit command and i18n upgrades

wp-cli/i18n-command migrates to gettext/gettext v5 and adds a dedicated wp i18n audit command that scans PHP, Blade-PHP, and JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com files for common internationalization mistakes — with json and github-actions output formats ready for CI pipelines.

Other i18n highlights include Blade component prop extraction, wp i18n make-php --pretty-print, wp i18n update-po --purge with updated/unchanged file reporting and automatic PO-Revision-Date updates, and faster JS scanning that skips files without translatable strings.

# Audit a plugin or theme for i18n issues
$ wp i18n audit ./my-plugin

# Output findings as GitHub Actions annotations in CI
$ wp i18n audit ./my-plugin --format=github-actions

Better shell, server, remote, and configuration workflows

  • Interactive shell (wp shell): Now supports --watch and a built-in restart command to reload WordPress changes without leaving your REPL, catches exceptions without losing session state, supports --hook and --quiet, and adds ksh and improved PowerShell support.
  • Built-in server (wp server): Adds --adapt-scheme to rewrite HTTPSHTTPS HTTPS is an acronym for Hyper Text Transfer Protocol Secure. HTTPS is the secure version of HTTP, the protocol over which data is sent between your browser and the website that you are connected to. The 'S' at the end of HTTPS stands for 'Secure'. It means all communications between your browser and the website are encrypted. This is especially helpful for protecting sensitive data like banking information. URLs to HTTPHTTP HTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. in local responses, supports passing arbitrary arguments to the PHP binary after --, and hardens router.php.
  • Remote & global config: Adds global --assume-https and --ssh-args flags, a ssh_config alias property (-F), WP_CLI_ALIAS_GROUPS_PARALLEL for concurrent alias group execution, environment variable configuration and interpolation in wp-cli.yml, system-wide config file loading, and an official JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. Schema for validating wp-cli.yml.

Faster, more modern testing for package authors

For third-party WP-CLI command and package developers, wp-cli/wp-cli-tests received a major overhaul: parallel Behat workers (including throwaway Docker worker containers), Behat 4 support alongside Behat 3, automatic SQLite fallback when MySQL isn’t running, unified diffs on failed assertions, PHPUnit Polyfills v4, and new PHPStan rules & dynamic return-type extensions for WP_CLI::get_config(), WP_CLI::do_hook(), and WP_CLI::add_hook().

Detailed change log

To avoid too much noise in the list below, the following types of pull requests have been omitted:

  • PRs that only bumped dependencies, lock files, or branch aliases.
  • PRs that only regenerated README files or fixed minor documentation typos.
  • PRs that only adjusted CI workflows, coding standards, static analysis configs, or internal tests.

wp-cli/wp-cli-bundle

  • Include command assets and exclude dev-only Symfony packages in Phar builds [#1219]
  • Build the Phar without composer/composer installed [#1215]
  • Fix obsolete MySQL client dependency in Debian package [#1213]
  • Sign the Phar with SHA-512 instead of SHA-256 [#1149]
  • Point Composer users to wp-cli/package-command when wp package is missing [#1111]
  • Add minimum PHP guard to Phar bootstrap [#1089]
  • Update framework workflow: Use default token [#1087]
  • Honor WP_CLI_PHP and WP_CLI_PHP_ARGS in Debian and RPM packages [#1079]
  • Bundle wp-cli/ai-command [#952]
  • Update deb/RPM packaging scripts: add PHP 8.3–8.5, drop PHP < 7.2 [#923]
  • Fix Phar path resolution when renamed from wp-cli.phar [#872]
  • Bundle wp-cli/site-health-command [#857]
  • Move wp-cli/package-command to require-dev [#846]
  • Add ability-command and block-command repos [#824]
  • Exclude wp-cli/wp-cli-tests from Phar [#823]
  • Set custom autoloader-suffix [#764]
  • Require PHP 7.2.24+ [#760]

wp-cli/wp-cli

  • Preserve positional arguments when autocorrecting commands [#6464]
  • Run accepted command suggestions outside a WordPress install [#6462]
  • Only prompt for command suggestions in interactive terminals [#6460]
  • Restore the newline after single-item JSON output [#6459]
  • Load lazily registered command classes from the autoloader that found them [#6455]
  • Defer loading WordPress Core’s Requests autoloader until load_wordpress() [#6454]
  • Let 0 turn off the cache expiry and the cache size limit [#6453]
  • Avoid leaving persistent session tokens behind in admin context [#6436]
  • Handle empty $wpdb->dbname in wp_get_table_names() for drop-ins like HyperDB and LudicrousDB [#6432]
  • Pass the positional arguments to the find_command_to_run_pre hook [#6430]
  • Stream table output when items are given as an iterator [#6427]
  • Only keep the requested fields of items from an iterator [#6426]
  • Stream YAML output when items are given as an iterator [#6425]
  • Cache the checksums of WordPress releases [#6424]
  • Double final consonant for “un”-prefixed verbs in past_tense_verb() [#6423]
  • Stream CSV and JSON output when items are given as an iterator [#6420]
  • Register commands given by class name lazily [#6419]
  • Avoid redundant subprocesses when detecting the MySQL binary [#6418]
  • Build the global parameter spec without rendering help text [#6417]
  • Skip redundant md5 check in cli update [#6416]
  • Prevent hard link traversal in copy_overwrite_files [#6413]
  • Harden Extractor against symbolic links in archives and destinations [#6412]
  • Recognize parameters whose value is optional in DocParser [#6410]
  • Use the tokenizer to replace __FILE__ and __DIR__ in PHP source [#6407]
  • Load WP_CLI_REQUIRE files for protected commands [#6406]
  • Declare composer/semver as a direct dependency [#6405]
  • Update bundled Requests library to v2.0.20 [#6403]
  • Fix wp --info and wp --version being dropped under WP_CLI_STRICT_ARGS_MODE [#6401]
  • Detect restrictive OS-level ulimit -v and warn in wp cli info [#6397]
  • Make Formatter self-register built-in formats on demand [#6395]
  • Use spl_object_id() instead of spl_object_hash() for hook IDs [#6394]
  • Correct the value type of parse_shell_arrays() $assoc_args [#6393]
  • Report likely typos in parameters of catch-all commands [#6392]
  • Skip the SQLite table re-filter on the MySQL-on-SQLite driver [#6391]
  • Support uppercase letters in arguments for completion [#6388]
  • Add hints for commands that are not registered [#6386]
  • Anchor SSH argument safe-set check with \A..\z to reject trailing newlines [#6384]
  • Fix Formatter throwing Error on objects with private/protected properties [#6383]
  • Skip Skip interactive prompts when not running in a terminal [#6379]
  • Use 0755 permissions for cache and extraction directories [#6378]
  • Handle process spawn failures in WP_CLI::runcommand() [#6376]
  • Prevent leading hyphens in SSH connection parameters [#6375]
  • Add make_temp_file() and make_temp_dir() helper functions [#6374]
  • Add recursion guard to merge_yml() [#6372]
  • Reject invalid keys in assoc_args_to_str() [#6371]
  • Require SHA-512 verification for self-update [#6370]
  • Escape temp dir in update success check [#6369]
  • Swap order for protected commands [#6368]
  • Return an empty string from get_sql_dump_command() and get_sql_check_command() when binaries are missing [#6363]
  • Add proper PHP version checks to wp cli update --stable / --nightly [#6362]
  • Escape script paths when launching subprocesses [#6359]
  • Deprecate legacy back_compat_conversions syntaxes [#6356]
  • Require --major for cross-major wp cli update [#6355]
  • Fix auto update check error should not fail the running command [#6345]
  • Add declarative deprecation handling for commands and assoc args [#6343]
  • Use deterministic package URL in wp cli updateUse deterministic package url [#6341]
  • Accept plaintext as an alias of var_export in cli param-dump [#6339]
  • Use where instead of /usr/bin/env which for MySQL binary detection on Windows [#6338]
  • Add ssh_config alias property to pass custom SSH config file via -F [#6334]
  • Trigger handbook regeneration upon new release [#6333]
  • Add OSC 8 hyperlink rendering to wp help description links with footnote fallback [#6332]
  • Improve argument alias parsing and --prompt support [#6323]
  • Prefer tar over PharData [#6319]
  • Check for MariaDB 10.5+ binaries, fall back to MySQL versions [#6316]
  • Fix rerunning command with --skip-plugins after fatal plugin/theme error [#6313]
  • Replace eval() in extract_subdir_path() with safe recursive path parser [#6310]
  • Improve file cache key validation [#6303]
  • Fix parse_str_to_argv() failing to strip quotes from single-character argument values [#6301]
  • Ensure global runtime parameters take precedence over alias configuration [#6299]
  • Harden Phar replacement on Windows during wp cli update [#6297]
  • Fix packages dir & man page regressions [#6296]
  • Add --field=<field> option to wp cli alias get [#6293]
  • Include error backtrace in fatal error handler message [#6291]
  • Improve path handling in extractor [#6290]
  • Rename WP_CLI_SKIP_PROMPT to WP_CLI_ERROR_RERUN [#6289]
  • Improve help screens: show disabled commands with reason and add --full recursive help [#6287]
  • Accept plaintext as an alias for var_export format [#6286]
  • Check --assume-https before unsetting global [#6285]
  • Respect WP_DEBUG and WP_DEBUG_DISPLAY instead of unconditionally overriding display_errors [#6284]
  • Enhance sudo -i call example with quoting caveat for empty/multi-word parameters [#6283]
  • Refactor path-related helper functions into a WP_CLI\Path class [#6282]
  • Move extended root command description higher up in help [#6281]
  • Improve redirect warnings in admin context [#6279]
  • Fix STDIN not being passed to all aliases in an alias group [#6278]
  • Add optional $newline parameter to WP_CLI::log() and WP_CLI::line() [#6276]
  • Fix vagrant SSH strict host key checking failure [#6275]
  • Fix SSH alias path not forwarded to remote when defined as a separate config key [#6274]
  • Add WP-CLI handbook link to wp help output [#6273]
  • Forward active alias to runcommand subprocess [#6272]
  • Resolve admin user dynamically instead of hardcoding user ID 1 [#6270]
  • Fix non-canonical ABSPATH containing single-dot path segments [#6267]
  • Restore WP-CLI autoloaders to front of stack after WordPress loads [#6266]
  • Remove leading newline in fatal error handlerremove leading newline [#6259]
  • Explicitly globalize admin menu variables [#6258]
  • Set $pagenow in admin context more accurately based on current command [#6256]
  • Set default context to “auto” [#6255]
  • Fix has_stdin() misfiring on non-interactive shells (/dev/null STDIN) [#6254]
  • Ensure $menu_order is a global in admin context [#6251]
  • Fix --ssh option with docker scheme ignored when set at root of wp-cli.yml [#6249]
  • Add is_stream() utility and update normalize_path() to handle PHP stream wrappers [#6248]
  • Clean up current_screen on ms_loaded [#6246]
  • Fix autoloader priority to prevent loading old framework classes from packages [#6243]
  • Fix Phar path resolution when WP_CLI_PHAR_PATH includes phar:// prefix [#6242]
  • Fix undefined index notice in debug_backtrace_on_exit [#6241]
  • Fix double-escaped SSH commands [#6240]
  • Show detailed error messages from ms_not_installed() on Multisite [#6239]
  • Make Formatter extensibleExtensible This is the ability to add additional functionality to the code. Plugins extend the WordPress core software. with custom format handlers for multi-item and single-value outputs [#6238]
  • Fix SHOW TABLES filtering for SQLite [#6235]
  • Don’t warn for missing fields on empty lists [#6232]
  • Fix SSH aliases with separate path lines on tcsh [#6231]
  • Fix HTTP URLs converted to HTTPS in wp core install [#6229]
  • Add --assume-https flag to fix URL scheme issues for all WordPress URL functions [#6228]
  • Fix PowerShell command substitution argument parsing [#6227]
  • Strip ANSI codes for pagers without color support [#6226]
  • Improve GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged by the repository owner. https://github.com/ API rate limit error handling and documentation [#6222]
  • Add $skin arg to get_upgrader() [#6219]
  • Fix autoloader priority so locally installed packages fully override Phar-bundled versions [#6218]
  • Fix custom WP_DEBUG_LOG paths not being respected [#6217]
  • Support --quiet on @all to suppress alias names while preserving command output [#6216]
  • Fix disabled_commands not merging on config inheritance [#6215]
  • Fix tilde expansion in SSH alias paths [#6214]
  • Fix remote config loading when aliases contain connection properties [#6210]
  • Fix overly specific exception catching in Runner.php [#6209]
  • Add locale configuration option for WP-CLI [#6208]
  • Remove forced infinite memory_limit [#6207]
  • Add global --ssh-args argument for SSH/Docker/Vagrant execution [#6206]
  • Differentiate commands from namespaces in --debug output [#6205]
  • Hook into WordPress fatal error handler to suggest --skip-plugins/--skip-themes on fatal errors [#6203]
  • Fix regression from field reordering [#6201]
  • Fix associative argument quote handling in WP_CLI::runcommand() [#6200]
  • Fix table formatting to truncate overly large values [#6199]
  • Add support for multiple flag values via repeated flags using ellipsis syntax [#6198]
  • Allow custom fields that exist in some items but not others in Formatter output [#6196]
  • Auto-rerun command after Phar update [#6194]
  • Check open_basedir restrictions before is_readable() to prevent warnings [#6192]
  • Fix multi-paragraph command descriptions appearing after ALIAS/SYNOPSIS in help output [#6191]
  • Detect WP-Stash in wp_get_cache_type() util [#6183]
  • Display PHP memory limit in wp cli info output [#6180]
  • Add support for argument aliases [#6176]
  • Warn when commands override global arguments [#6174]
  • Fix autocorrect suggesting wrong commands before after_wp_load hook [#6171]
  • Add environment variable configuration support to wp-cli.yml [#6169]
  • Forward environment variables to spawned processes in WP_CLI::launch() [#6166]
  • Fix Formatter displaying empty string for boolean false values [#6162]
  • Add backtrace output to WP_CLI::error() and WP_CLI::halt() when --debug is enabled [#6156]
  • Support alternative alias syntax for cross-platform compatibility [#6155]
  • Warn on malformed --url parameter values [#6154]
  • Fix cli cache prune to handle version numbers in cache filenames [#6152]
  • Validate downloaded files before adding to cache [#6149]
  • Add command alias to cmd-dump output [#6147]
  • Mask sensitive argument values in --prompt output [#6145]
  • Load system-wide config with cross-platform support [#6143]
  • Fix tilde (~) expansion in --path parameter [#6141]
  • Add automatic retry mechanism for HTTP requests [#6140]
  • Add HTTP request logging for WP-CLI [#6138]
  • Add link to Running Commands Remotely handbook in alias docs [#6137]
  • Remove Symfony Finder dependency from framework [#6136]
  • Remove direct dependence on ext-curl in http_request() [#6135]
  • Add argument descriptions to --prompt interactive prompts [#6134]
  • Show default values for parameters and positional arguments when using --prompt [#6133]
  • Add tab completion for flag enum values [#6132]
  • Add environment variable interpolation in alias definitions with security controls [#6131]
  • Add WP_CLI_ALIAS_GROUPS_PARALLEL environment variable for concurrent alias group execution [#6129]
  • Improve Process class for Windows [#6124]
  • Automatically run suggestions for mistyped commands [#6122]
  • Fix Windows ABSPATH handling to accept drive letter with forward slash [#6119]
  • Treat -- as a delimiter to separate options from operands [#6113]
  • Fix heredoc issue [#6109]
  • Exclude non-essential files using .gitattributes [#6107]
  • Add JSON Schema validation [#6104]
  • Use Mustache v3 [#6099]
  • Add JSON Schema for wp-cli.yml [#6095]
  • Require PHP 7.2.24+ [#6093]
  • Check whether less pager exists before trying to pipe content through it [#6020]
  • Fix admin_init/init executing in reverse order with wrong user logged in [#6011]
  • Add utility function to format byte sizes as human-readable strings [#6005]
  • Modify root warning to take account of system user [#5961]
  • Add alignment functionality [#5934]
  • Respect fields order in formatter output [#5932]
  • Handle spaces in PHP binary path for the wp cli update command [#5855]
  • Autocomplete --url [#5704]

wp-cli/handbook

  • Say that 0 turns the cache limits off [#684]
  • Document WP_CLI_AUTOCORRECT [#683]
  • Explain that only one project config file is read [#682]
  • Add Simafri to hosting-companies.md [#681]
  • Add CrockyHost to hosting-companies.md [#680]
  • Document four missing environment variables in the config reference [#677]
  • Add Getwebup to hosting companies with WP-CLI installed [#676]
  • Remove broken and outdated MediaTemple link [#675]
  • Add Pethost to hosting companies list [#674]
  • Add Webiost to WP-CLI hosting companies list [#672]
  • Show in which release commands and options first appeared [#669]
  • Flag commands and options not in the latest stable release [#668]
  • Fix PowerShell argument handling in spam-comment deletion example [#665]
  • Fix documentation audit issues and update references [#663]
  • Add zerolag.ro to hosting-companies.md [#660]
  • Document Windows argument truncation when a value contains newlines [#659]
  • Introduce a Security Vulnerability Reporting page [#646]
  • Add WP-CLI support page [#645]
  • Fix doctor YAML example [#644]
  • Update package discovery guidance [#643]
  • Align plugin unit tests guide with current CI options [#639]
  • Add --dbhost parameter to wp config create documentation [#637]
  • Add Git Bash on Windows section to installing guide [#635]
  • Revise contributor details and issue references [#633]
  • Document guidelines for use of exit codes within commands [#632]
  • Add guidance on where to place custom WP-CLI commands [#631]
  • Extend Commands Cookbook with PHPDoc edge-cases: aliases, repeating flags, sensitive args, global arg conflicts [#630]
  • Add beginner-friendly documentation for non-technical WP-CLI users [#629]
  • Update hosting-companies.md [#625]
  • Document WP-CLI contributor badge and association process [#617]
  • Add how-to guide: Figure out why WordPress is slow [#616]
  • Fix double escaping and decode HTMLHTML HTML is an acronym for Hyper Text Markup Language. It is a markup language that is used in the development of web pages and websites. entities in backticks for command documentation [#613]
  • Improve grammar and clarity in command setup instructions [#612]
  • Update hosting-companies.md [#610]
  • Add alias field support to command documentation generation [#605]
  • Add MilesWeb to hosting companies list [#604]
  • Fix docblock parser to handle multiline descriptions for all tags [#602]
  • Update hosting-companies.md [#600]
  • Replace old codex link with new resources [#598]
  • Remove broken AnsiPress link [#596]
  • Add argument syntax reference to command documentation [#591]
  • Fix links in installing.md & quick-start.md [#589]
  • Add documentation for installing WP-CLI packages [#587]
  • Remove hub requirement from pull-requests documentation [#586]
  • Update installing docs with cryptographic verification instructions [#585]
  • Document licensing requirements for third-party code [#583]
  • Add comprehensive Behat testing guide to handbook [#582]
  • Add documentation for cli_init hook [#579]
  • Update hosting-companies.md [#576]
  • Fix egoless programming link [#575]
  • Fix handbook information architecture [#573]
  • Add 34SP.com to hosting companies list [#571]
  • Running remote commands from Windows PowerShell [#570]
  • Update hosting-companies.md [#569]

wp-cli/ability-command

  • Handle wp ability run missing input based on input_schema [#7]
  • Add support for the new meta.public flag [#10]
  • Fix wp ability list --format=ids output [#16]

wp-cli/ai-command

  • Add wp ai is-supported command [#13]
  • Remove trailing comma for PHP 7.2 compatibility [#10]
  • Update for WordPress 7.0 [#5]
  • Fix incorrect --output argument in generate image example [#19]
  • Add image input support to wp ai generate text [#21]
  • Rename connector status from “not installed” to “uninstalled” [#27]
  • Add connector ID field to list and get commands [#25]

wp-cli/cache-command

  • Add --network flag example to wp cache docs [#111]
  • Check for wp_cache_flush_group() before calling it [#129]

wp-cli/checksum-command

  • Add --format parameter to wp core verify-checksums [#140]
  • Add support for checksum verification of must-use plugins [#145]
  • Improve checksum verification for plugins without main PHP files [#143]
  • Trim whitespace from --exclude parameter values [#155]
  • Download plugin checksums in parallel [#162]

wp-cli/config-command

  • Prevent invalid wp-config.php when passwords contain double quotes [#203]
  • Add SSLSSL Secure Socket Layer - Encryption from the server to the browser and back. Prevents prying eyes from seeing what you are sending between your browser and the server. flag [#198]
  • Show literal “true”/”false” for boolean config values instead of “1”/empty string [#213]
  • Fix wp config create incorrectly detecting wp-config.php in parent directory [#212]
  • Mark dbpass as sensitive [#207]
  • Add wp config add and wp config update commands [#206]
  • Make --dbname and --dbuser optional when SQLite integration is active [#219]
  • Allow wp config create to defer DB_NAME/DB_USER initialization via --skip-check [#223]
  • Add db_password argument alias [#227]
  • Refactor wp config create to set config values through WPConfigTransformer [#226]

wp-cli/core-command

  • Suppress HTML output from async translation updates during core update [#298]
  • Add --format flag in core update [#254]
  • Apply wp_slash() to admin password in wp core install [#311]
  • Honor --locale in wp core update and allow locale-change without --force [#310]
  • Fix misleading success message when version check API fails [#303]
  • Fix misleading “Success: WordPress is up to date” message when downgrade blocked [#300]
  • Show lock deletion tip when core update fails with lock error [#296]
  • Add wp core check-update-db command [#294]
  • Add note about retrieving db version on Multisite [#319]
  • Fix incorrect home/siteurl when WP-CLI runs from root filesystem [#307]
  • Fix wp core update-db --network to respect network ID in multinetwork installations [#302]
  • Add automatic cleanup of old core files using WordPress $_old_files list [#299]
  • Add --skip-locale-check flag to wp core download for locale fallback [#322]
  • Add --locale support to wp core multisite-install command docs and coverage [#331]
  • Unconditionally use get_current_network_id [#329]
  • Always use ZIP archives for downloads [#333]
  • Detect file extension from downloaded archives [#334]
  • Add admin_pass argument alias [#335]
  • Escape --url parameter in wp core update-db and wp core check-update-db network commands [#338]
  • Save the archive of wp core download --no-extract safely [#357]
  • Name the archive of wp core download --no-extract after the release [#355]

wp-cli/cron-command

  • Add a debug log to show what event is starting [#127]
  • Add debug output for cron event arguments [#120]
  • Add --match-args option to wp cron event delete to target specific event instances [#131]
  • Respect doing_cron transient in wp cron event run --due-now [#130]
  • Add --network flag to wp cron event run for multisite support [#125]
  • Add actions field to wp cron event list [#124]

wp-cli/db-command

  • Fix missing table in wp db query output [#295]
  • Fix REPLACE() string function being misidentified as a write query [#314]
  • Add automatic --silent flag to mysqlcheck commands when --quiet is set [#302]
  • Add SQLite compatibility to wp db commands [#299]
  • Add alignment functionality to tables [#252]
  • Db export: Avoid exec() in option probe [#326]
  • Remove --add-drop-table from wp db export OPTIONS; update example [#324]
  • Specify scope options in same format as other arguments that have a list [#321]
  • Db import: Pass import file via STDIN redirection [#341]
  • Db import: Reject dot-commands in SQLite dump files [#340]
  • Bail early when check/dump commands are missing [#339]
  • Skip server certificate verification for MariaDB connections [#334]
  • Fix SQL mode compat issues by removing the additional probe request [#333]
  • Support --ssl and --skip-ssl flags in wp db import [#332]
  • Use Utils\get_mysql_binary_path() to get correct binary [#328]
  • Filter empty database parameters to prevent MySQL command failures [#308]
  • Adapt SQLite support to sqlite-database-integration 3.0 [#344]
  • Support DB_PATH for SQLite database commands [#351]
  • Db import: Improve SQLite dot-command detection regex [#347]
  • Resolve recorded db-path.php secret path for SQLite file operations [#354]
  • Db size: Allow displaying data and index size separately [#349]
  • Add $wpdb fallback for wp db query and wp db import when mysql/mariadb binary is unavailable [#320]
  • Add wp db status command for database health overview [#307]
  • Add wp db users command for database user management [#303]
  • Add support for excluding table data during export [#298]

wp-cli/embed-command

  • Use WP_oEmbed singleton when working with providers [#84]

wp-cli/entity-command

  • Fix wp menu item update --position does not reshuffle other menu items [#603]
  • Document that --network excludes roles from wp user list output [#597]
  • Strip HTML tags from multisite user signup validation errors [#596]
  • Add --site-path filter to wp site list to avoid conflict with global --path [#595]
  • Add wp menu item add-post-type-archive subcommand [#594]
  • Add wp term prune command to remove terms with 0 or 1 published posts [#586]
  • Allow wp post delete to trashTrash Trash in WordPress is like the Recycle Bin on your PC or Trash in your Macintosh computer. Users with the proper permission level (administrators and editors) have the ability to delete a post, page, and/or comments. When you delete the item, it is moved to the trash folder where it will remain for 30 days. custom post types [#583]
  • Add common options reference to wp option documentation [#581]
  • Improve wp user remove-role docs and output when no role argument is given [#580]
  • Add --site-url parameter for custom domain configuration in wp site create [#576]
  • Add wp site get command to enable site operations by URL [#571]
  • Add wp menu item get command [#570]
  • Add term_group as an optionally available field in wp term list [#569]
  • Add font library commands for WordPress 6.5+ [#567]
  • Add wp post revision restore, diff, and prune commands [#563]
  • Add block-related post commands [#556]
  • Add notes support documentation and tests for WordPress 6.9+ [#552]
  • Don’t require --force flag for deleting already trashed posts [#548]
  • Add JSON input support for tax_input in wp post createAdd JSON input support for tax_input [#532]
  • Fix wp site empty O(n) scaling: replace per-item cache ops with wp_cache_flush() [#601]
  • Fix wp term migrate skipping posts after post type migrationMigration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. [#606]
  • Implement network-specific metadata handling in commands [#518]
  • Add wp user privacy-request commands for GDPR personal data management [#611]
  • Fix wp option list filtering with autoload and transients [#620]
  • Fix empty STDIN handling in wp user import-csv [#619]
  • Add --delete-tables-with-prefix to wp site delete for multisite custom table cleanup [#617]
  • Validate site slug and site URL in wp site create and wp site generate [#632]
  • Expose add_to_blog, new_role, and blog_id fields in wp signup list and wp signup get [#630]
  • Remove WordPress 4.2 requirement note [#626]
  • Ensure parent term ID is non-negative in Term_Command [#662]
  • Normalize user update editor preference flags to core string literals [#657]
  • Declare dash-separated aliases of user application-password list filters [#653]
  • Add wp icon and wp icon collection commands [#648]
  • Guard the block subcommands on older WordPress and quiet the wp-compat false positives [#647]
  • Document the remaining WP_Query arguments accepted by wp post list [#645]
  • Stop documenting ‘filter’ as an available field [#644]
  • Document the WP_Query arguments accepted by wp post list [#643]
  • Document every argument wp site list accepts [#642]
  • Query sites through WP_Site_Query in wp site list [#639]
  • Document the list filters these commands implement themselves [#638]
  • Apply parameters that wp user create and wp post update silently discarded [#637]
  • Document all accepted fields for the catch-all write commands [#636]
  • Avoid global_terms_enabled() deprecation notice in wp site empty [#669]
  • Report an error when the autoload value cannot be stored [#696]
  • Report failure in wp post term remove when no term was removed [#693]
  • Error out in wp post term set and wp post term add when no term ID exists [#692]
  • Update autoload in wp option update when the value is unchanged [#689]
  • Keep percent signs in wp post revision diff output [#673]
  • Include the auto autoload values in wp option list --autoload [#671]
  • Load comments and users in chunks in wp comment list and wp user list [#666]
  • Load posts in chunks in wp post list [#663]

wp-cli/eval-command

  • Make $args available as a global variable [#81]
  • Add --hook flag to defer wp eval execution to WordPress lifecycle hooks [#84]
  • Ensure $assoc_args can be used in eval [#89]
  • Harden eval-file against failures while preparing the file [#98]

wp-cli/export-command

  • Fix compatibility with newer PHP & WP versions [#128]
  • Include term meta in export file [#114]
  • Add --skip_authors and --skip_terms as additional flags [#115]
  • Fix deprecated get_terms usage [#141]
  • Load terms, meta and comments for batches of posts [#147]

wp-cli/extension-command

  • Handle case where a paid plugin update is placed in the no_update array [#451]
  • Fix --skip-update-check in admin context [#508]
  • Add --slug option to wp plugin install and wp theme install for custom directory naming [#506]
  • Fix plugin deactivation during --force install with explicit --activate flag [#500]
  • Fix --all --network to network-activate single-site active plugins [#499]
  • Add --force flag to plugin activate to re-run activation hooks [#496]
  • Add --auto-update-indicated flag to plugin update and theme update commands [#495]
  • Display extension names during bulk updates [#492]
  • Pass correct variable to requirements_not_met [#489]
  • Support installing plugins from single PHP file URLs [#486]
  • Support WordPress.org plugin/theme directory URLs in install commands [#483]
  • Add missing documentation for is-active subcommands [#482]
  • Warn in wp plugin is-active for missing plugin files still in active_plugins [#480]
  • Add type field to wp theme list to distinguish block themes from classic themes [#477]
  • Add wp plugin check-update and wp theme check-update commands [#475]
  • Include broken themes in wp theme list [#473]
  • Display unexpected plugin output during activation with --debug [#471]
  • Add plugin dependencies support with --with-dependencies flag and wp plugin install-dependencies command [#469]
  • Skip VCS-controlled plugins/themes during updates by default [#513]
  • Allow multiple values for field filter options in wp plugin list and wp theme list [#511]
  • List must-use plugins from subfolders [#484]
  • Keep failed update output parseable for JSON and CSV [#529]
  • Add wp plugin download and wp theme download subcommands runnable before WordPress load [#527]
  • Treat older plugin no-update versions as up to date [#535]
  • Deprecate plugin status and theme status commands [#534]
  • Fix WordPress requirement check for unavailable plugin updates [#531]
  • Fix output formats for wp theme mod get [#456]
  • Use update check data to validate installed theme versions [#559]
  • Honor --ignore-requirements for WordPress core package checks [#558]
  • Fix update checks when --skip-plugins or --skip-themes is used [#553]
  • Fix update_unavailable_reason leaking across rows in plugin and theme list [#552]
  • Detect closed WordPress.org plugins [#550]
  • Fix wporg_last_updated always being empty for active plugins [#547]
  • Fix wp plugin list fatal on WordPress < 5.3 and quiet the wp-compat false positives [#543]
  • Fix plugin install detection when update info is unavailable [#541]
  • Report an error when wp theme mod set cannot save the value [#571]
  • Add hook to expose changed files for OPcache invalidation [#501]

wp-cli/i18n-command

  • Escape regex dots when stripping .min suffix [#457]
  • Clarify log message in MapCodeExtractor [#451]
  • Extract translatable strings from Blade component prop bindings [#474]
  • Make PO files the source of truth by removing purge flags from wp i18n make-json [#472]
  • Add border.radiusSizes to theme-i18n.json [#468]
  • Preserve POT file order when updating PO files [#464]
  • Auto-update PO-Revision-Date in wp i18n update-po [#463]
  • Add line number references to file headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes. extraction [#462]
  • Add updated/unchanged file reporting to wp i18n update-po [#461]
  • Add --purge flag to control removal of obsolete translations and comments in update-po [#460]
  • Add dedicated wp i18n audit command with JSON and GitHub Actions output formats [#459]
  • Add --pretty-print flag to wp i18n make-php [#458]
  • Further Windows compatibility improvements [#485]
  • Fix --pretty-print generating invalid PHP when messages array is empty [#488]
  • Quote glob pattern examples in --include/–exclude docs to prevent shell expansion [#490]
  • Reject invalid Domain Paths in wp i18n make-pot [#499]
  • Normalize text domain string in wp i18n make-json [#498]
  • Update schema fallback files [#511]
  • Parse JavaScript with Unicode-escaped identifiers [#510]
  • Skip parsing JavaScript that can’t contain translations [#509]
  • Migrate to gettext/gettext v5 [#522]
  • Fall back to bundled schemas when the remote schema download fails [#519]
  • Write the revision date as translation-revision-date in wp i18n make-php [#503]

wp-cli/import-command

  • Add URL rewriting support [#98]
  • Add --importer argument to specify alternative importer class [#101]
  • Allow importing WXR files via HTTP/HTTPS/FTPFTP FTP is an acronym for File Transfer Protocol which is a way of moving computer files from one computer to another via the Internet. You can use software, known as a FTP client, to upload files to a server for a WordPress website. https://codex.wordpress.org/FTP_Clients and STDIN [#104]
  • Add --source-dir option to skip network downloads for locally available attachments [#107]
  • Fix author mapping file creation failing with DivisionByZeroError [#112]

wp-cli/language-command

  • Add --format flag to wp language core install [#173]
  • Fix language status detection for plugins/themes with text domain different from slug [#171]
  • Add --format flag to wp language update commands [#170]
  • Remove default available translation for plugins and themes [#154]
  • Clear translation file cache after uninstall [#178]
  • Use Utils\make_temp_file() only on translation cache hits [#190]
  • Always set the Language property on translation updates [#187]

wp-cli/media-command

  • Fix thumbnail regeneration reverting user-edited big images to pre-edit state [#225]
  • Don’t re-generate scaled/rotated images when regenerating a specific image size [#224]
  • Fix media regenerate dropping site-icon-specific image sizes [#223]
  • Add feature to import media into a specific directory [#202]
  • Use wp_update_image_subsizes() for --only-missing on WordPress 5.3+ [#236]
  • Fix fix-orientation command for Imagick and add WordPress 5.3+ tests [#233]
  • Allow multiple image sizes for regeneration via repeated --image_size flags [#231]
  • Add reason for skipping regeneration in wp media regenerate [#248]
  • Add --update-attachment-refs flag to wp media regenerate [#242]
  • Add wp media replace subcommand [#240]
  • Add wp media prune command to remove generated thumbnails [#239]
  • Add STDIN support to wp media import [#221]
  • Add --skip-duplicates flag to wp media import [#241]

wp-cli/package-command

  • Use Packagist v2 Metadata API [#202]
  • Auto-append .git suffix for GitHub/GitLab URLs missing it [#225]
  • Support version suffix on git URL package installs [#223]
  • Set package index repository as non-canonical to allow Packagist to resolve newer versions [#222]
  • Fix some newly reported PHPStan issues [#220]
  • Default package installation to @stable instead of the default branch [#219]
  • Handle additional git providers in set_composer_auth_env_var() [#218]
  • Add is-installed subcommand [#214]
  • Add wp package get command to retrieve single package information [#212]
  • Add --skip-update-check flag to wp package list [#211]
  • Add optional package name arguments to wp package update [#208]
  • Add --no-interaction flag to prevent Git/SSH prompts in wp package commands [#206]
  • Block path traversal in package install via composer.json name [#237]
  • Raise Composer version [#240]
  • Use 0755 permissions for the packages directory [#244]
  • Use host check instead of substring search for GitLab URLs [#242]
  • Document how wp package install resolves a package name [#255]
  • Use Utils\make_temp_file() / Utils\make_temp_dir() for package ZIP install temp paths [#250]
  • Drive Composer as a child process instead of embedding it [#248]

wp-cli/php-cli-tools

  • PHP 8.5 compatibility: Fix null array access in Colors.php [#188]
  • Add column alignment support for tables [#192]
  • Fix line wrapping issue with colorized table output [#191]
  • Add ability to add row in a loopLoop The Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop to existing table [#190]
  • Fix progress bar wrapping to new line on Windows [#198]
  • Fix sprintf() too-few-arguments error when color tokens appear in a format string [#197]
  • Add format customization and step-based progress display to progress bar [#196]
  • Add configurable wrapping modes for table columns [#195]
  • Handle mb_strlen() failure in safe_strlen() [#203]
  • Avoid quadratic copying in Table::getDisplayLines() [#202]
  • Add a way to display table rows from an iterator [#204]

wp-cli/role-command

  • Keep denied capabilities when cloning a role [#89]

wp-cli/scaffold-command

  • Add ABSPATH check in plugin.mustache template [#353]
  • Add strict slug validation for wp scaffold plugin-tests and wp scaffold theme-tests [#358]
  • Add RTL stylesheet support via wp_style_add_data() in wp scaffold child-themeadd RTL stylesheet support via wp_style_add_data() [#372]
  • Fix child themeChild theme A Child Theme is a customized theme based upon a Parent Theme. It’s considered best practice to create a child theme if you want to modify the CSS of your theme. https://developer.wordpress.org/themes/advanced-topics/child-themes/ activation failure on subsequent runs with different slug and name [#369]
  • Sanitize theme slugs for usage in PHP function names [#381]
  • Fix plugin-github.mustache so it executes correctly [#379]
  • Fix wp scaffold child-theme error when --path contains relative segments [#384]
  • Fix sed delimiter conflict with Windows-style paths in install-wp-tests.sh [#383]
  • Add best practices disclaimer to readme [#388]
  • Reject invalid Requires at least header values [#392]
  • Use GET request to download theme from underscores.me [#398]
  • Support betaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. versions in install-wp-tests.sh and fix shellcheck findings [#408]

wp-cli/search-replace-command

  • Alert user of database table permission errors during search-replace [#216]
  • Skip database views during search-replace [#215]
  • Support table-qualified column names in --skip-columns and --include-columns [#214]
  • Handle JSON-encoded URLs in search-replace [#213]
  • Add --old and --new flags to support strings starting with hyphens [#210]
  • Document empty replacement values [#234]
  • Harden unserialize() with allowed_classes => ['stdClass'] and add override hook [#230]
  • Fix SQLite compatibility for search-replace command [#225]
  • Explain why certain tables can be skipped in search-replace [#221]
  • Handle array-like unserialized objects without dynamic property writes [#237]
  • Document replacing JSON-serialized URLs with escaped slashes [#248]
  • Scan each table once to check all columns [#246]
  • Correct the docs on JSON-encoded URLs [#251]

wp-cli/server-command

  • Add --adapt-scheme flag to rewrite HTTPS URLs to HTTP in server responses [#94]
  • Tell WordPress we support URL rewriting [#92]
  • Add passthrough arguments to PHP binary via -- separator [#90]
  • Fix router to properly set $_SERVER variables for entry points and pretty permalinks [#89]
  • Harden router.php against path traversal and non-PHP execution [#102]
  • Respond with a 404 when there is no index.php to route to [#109]

wp-cli/shell-command

  • Add ksh support for OpenBSD (and mksh/pdksh) [#87]
  • Repurpose --quiet flag to suppress automatic REPL output [#85]
  • Catch exceptions in REPL to preserve session state on errors [#83]
  • Add --hook flag to validate WordPress hook execution before shell starts [#82]
  • Prefer /bin/bash and validate SHELL points to Bash before using it [#81]
  • Fix internal variable bleeding in REPL eval context [#80]
  • Fix history command error when input starts with dash [#78]
  • Add restart command and --watch option to wp shell [#77]
  • Improve PowerShell support on Windows [#93]

wp-cli/site-health-command

  • Only collect debug info for the subcommands that show it [#22]
  • Require WordPress 5.4 and guard the WordPress 5.6 site health test [#20]

wp-cli/widget-command

  • Add wp sidebar get and wp sidebar exists subcommands [#70]
  • Add --inactive flag to wp sidebar list and wp widget reset [#75]
  • Add wp widget patch command for nested option updates [#72]
  • Respect --position when moving a widgetWidget A WordPress Widget is a small block that performs a specific function. You can add these widgets in sidebars also known as widget-ready areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. to another sidebarSidebar A sidebar in WordPress is referred to a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or any where in the theme. [#95]

wp-cli/wp-cli-tests

  • Use PHPUnit Polyfills v4 [#260]
  • Require PHP 7.2.24+ [#255]
  • Add ability to specify minimum mysql version requirement [#266]
  • PHP 8.5: Use shell_exec instead of backticks [#271]
  • Fall back to running tests with SQLite [#286]
  • Add Behat step for installing WordPress with specific version [#282]
  • Fix database type detection to query server version instead of client binary [#281]
  • Add unified diff output to failed Behat comparisons [#280]
  • Add functional tests for Behat step definitions [#279]
  • Improve compatibility with other operating systems [#274]
  • Fix MariaDB 11.4+ warnings with --no-defaults flag [#297]
  • Add @skip-<dbtype> tags for database-specific test exclusion [#302]
  • Automate detection and removal of unused PHP use statements via Slevomat Coding Standard [#311]
  • Resolve WP_VERSION to latest patch when only major.minor is provided [#307]
  • Improve error message for failed steps [#304]
  • Handle renamed SQLite database file (.ht.sqlite → .ht.sqlite.php) [#318]
  • Add persistent object cache support [#322]
  • Add new @skip-object-cache Behat tag [#324]
  • PHPStan: Add dynamic return type extension for WP_CLI::get_config() [#346]
  • PHPStan: Add rule for WP_CLI::add_hook() usage [#345]
  • PHPStan: Add dynamic return type extension for WP_CLI::do_hook() [#344]
  • Behat steps: support file names containing spaces [#342]
  • Drop support for PHPUnit Polyfills v1 [#341]
  • Skip server certificate verification for MariaDB test connections [#338]
  • Add WP-Compat PHPStan extension configuration [#360]
  • Add support for installing WordPress from an arbitrary ZIP archive [#351]
  • Add PHPStan analysis for PHP blocks in feature files [#354]
  • Add PHPCSPHP Code Sniffer PHP Code Sniffer, a popular tool for analyzing code quality. The WordPress Coding Standards rely on PHPCS. linting for PHP blocks in feature files [#340]
  • Make the PHP built-in web server step work without server-command [#363]
  • Declare and check the commands that scenarios need [#410]
  • Report the scenarios that are left out, and why [#409]
  • Run parallel workers in throwaway Docker containers [#408]
  • Add a step for scenarios that need a specific set of themes [#406]
  • Run scenarios in parallel workers [#405]
  • Reuse plugins and themes downloaded from WordPress.org across scenarios [#404]
  • Add a step to run several setup commands in a single process [#400]
  • Provide plugin and theme directories as built-in variables [#397]
  • Collect code coverage in parallel workers, and split the scenarios across machines [#420]
  • Support Behat 4 alongside Behat 3 [#428]
  • Add WP_CLI_TEST_XDEBUG environment variable for step debugging in Behat tests [#289]

wp-cli/wp-config-transformer

  • Prevent trailing commas in define() from being included in the extracted value [#59]
  • Support defined( 'CONST' ) or define( 'CONST', value ) pattern [#62]
  • Remove DOTALL flag from parse_wp_config() regexes [#64]
  • Only insert at the first occurrence of the placement anchor [#66]
  • Reject config names that are not valid PHP identifiers [#69]

Contributors

@11gowdham, @51nx, @abhi3315, @adityaanurag0219, @afifasulehricom, @ahirpravin, @AhmarZaidi, @akshat009, @alaminfirdows, @andreik6v, @andrewshell, @AnuragR3k, @apermo, @astappiev, @baizmandesign, @bazza, @benlk, @bgturner, @brentmartinmiller, @BrianHenryIE, @caribe, @chubes4, @danielbachhuber, @dhrupo, @Dhruval-678, @dhruvang21, @dilipom13, @DingleBungle, @dottxado, @dr5hn, @dsmith4-godaddy, @ekamran, @eri-trabiccolo, @ernilambar, @gohelkunjan, @heyimprahlad, @iamsohilvahora, @iandunn, @isaeedam-ir, @jahirulwp, @JanJakes, @janw-me, @johnbillion, @justinmaurerdotdev, @karan241296, @Kerfred, @kiranpotphode, @kkmuffme, @lhjonathan, @manhphuc, @mehrazmorshed, @Merlin83b, @michaelw85, @mrfade, @mrsdizzie, @muneeb-ashraf, @mw-jagdish-patil, @nickchomey, @Nikita20010, @nikunj8866, @nisbet-hubbard, @noruzzamans, @petitphp, @philipjohn, @praful2111, @pwtyler, @qorud02, @QWp6t, @r4sky0, @rejaulalomkhan, @retlehs, @rodrigoprimo, @rolf-yoast, @rollybueno, @sadfun, @sarthak-19, @schlessera, @scribu, @simon-vasconcelos-lee, @Soean, @softglazee, @spacedmonkey, @ssnepenthe, @SteenSchutt, @swissspidy, @t-hamano, @thelovekesh, @thisismyurl, @timotheemoulin, @todeveni, @TowyTowy, @victorcamnerin, @viralsampat90, @WebQuickster, @weby-dev, @wojsmol, @wprashed, @yusufhay, @zzap

#release, #v3-0-0

WP-CLI v2.12.0 Release Notes

A new release of WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/, WP-CLI v2.12.0, is now available. For this release, we had 68 contributors collaborate to get 382 pull requests merged. 

As always, big thanks to the WP-CLI sponsors that make the continued maintenance possible.

This release includes numerous bug fixes and compatibility improvements, but we still could teach WP-CLI a few new tricks which I’ll highlight below. As always, you can also skip directly to the detailed changelog if you prefer.

If you already use WP-CLI, updating is as simple as wp cli update. Else, check out our website for recommended installation methods.

Pluck & patch commands for caches and transients

The cache and transient commands have now also learned the subtle art of plucking and patching. This means that you can directly manipulate individual entries in an array of values that these commands let you manage.

Here’s an example of how such an operation can look and how it compare to the regular cache/transient operations:

# Transient structure
# 'some_key' => ['foo' => ['bar' => 'baz']]

# Retrieve the transient value
$ wp transient get some_key --format=json
{'foo':{'bar':'baz'}}

# Retrieve the value of the foo => bar subkey
$ wp transient pluck some_key foo bar
baz

# Replace baz with bazzer
$ wp transient patch update some_key foo bar bazzer
Success: Updated transient 'some_key'.

Post lists can now handle complex query flags

When using post list, you can now use JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. notation to provide complex query arguments to the --tax_query, --meta_query and --post_date fields.

$ wp post list --field=post_title --date_query='{"before":{"year":"2024"}}
+--------------------------+
| post_title               |
+--------------------------+
| My year in review - 2021 |
| My year in review - 2022 |
| My year in review - 2023 |
+--------------------------+

$ wp post list --field=post_title --tax_query='[{"taxonomy":"category","field":"slug","terms":"first-category"}]'
...

$ wp post list --field=post_title --meta_query='[{"key":"key2","value":"value2b"}]'
...

Post metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. can be forced to only return a single value

The post meta get command now has a --single flag defaulting to true which can be negated with --no-single. This flag tells WordPress whether to only return a single value or all existing values for a given key.

# Create a post meta key for post with ID 123 that has multiple values
$ wp post meta add 123 my_meta_key value_1
$ wp post meta add 123 my_meta_key value_2
$ wp post meta add 123 my_meta_key value_4

# Retrieve a single value
$ wp post meta get 123 my_meta_key --single
value_1

# Retrieve all values
$ wp post meta get 123 my_meta_key --no-single --format=json
["value_1","value_2","value_3"]

Exclude files on core checksum verification

When running a core checksum verification, you can exclude one or more files from the checksum verification with the new --exclude=<files> flag, which takes a comma-separated list of filepaths relative to the current root.

# Make a change to the README file in the WordPress core root folder
$ echo "nonsense" > readme.html

# Run the core checksum verification
$ wp core verify-checksums --exclude='readme.html'
Success: WordPress installation verifies against checksums.

Respect requires and requires_php tags for plugins and themes

The pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. and theme commands now understand and respect the requires and requires_php headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes. tags when trying ot install or update extensions. A new state unavailable has been introduced to denote the updates that are newer that your current installation but for which your site does not fulfill the requirements.

This also adds new fields requires and requires_php which are displayed if they contain relevant information and otherwise hidden by default.

$ wp plugin list
+----------------+----------+-------------+---------+----------------+-------------+----------+--------------+
| name           | status   | update      | version | update_version | auto_update | requires | requires_php |
+----------------+----------+-------------+---------+----------------+-------------+----------+--------------+
| akismet        | inactive | available   | 5.1     | 5.3.5          | off         | 5.8      | 5.6.20       |
| edit-flow      | inactive | none        | 0.9.9   |                | off         | 6.0      | 8.0          |
| wp-super-cache | inactive | unavailable | 1.9.4   | 1.12.4         | off         | 6.5      | 7.0          |
+----------------+----------+-------------+---------+----------------+-------------+----------+--------------+

$ wp plugin update wp-super-cache
Warning: wp-super-cache: This update requires WordPress version 6.5, but the version installed is 6.2.
Error: No plugins updated.

More control over make-json generation

The make-json command was made more powerful again. You can not only set a custom text domain to be used, you can also define the file extension to parse.

# Use a custom text domain
$ wp i18n make-json foo-theme --domain=my-custom-domain
Success: Created 1 file.

# Include typescript files
$ wp i18n make-json foo-theme --extensions=".ts, .tsx"
Success: Created 2 files.

Force update checks on plugin|theme list

When displaying the list of plugins or themes, WP-CLI now always ensures you get fresh data. No need to manually clear transients anymore! The existing --skip-update-check flag can be used to prevent this behavior.

# Clears any update transients to trigger an update check and display results
$ wp plugin list --fields=name,status,update --force-check
+-------------+----------+--------+
| name        | status   | update |
+-------------+----------+--------+
| hello-dolly | inactive | none   |
+-------------+----------+--------+

PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/index.php 8.4 Compatiblity

WP-CLI is now fully compatible with PHP 8.4. This has required quite a bit of trickery and hacks to maintain compatibility with our current minimum of PHP 5.6+ at the same time. With the next release, we’ll bump the minimum PHP version to 7.2.24+, which will allow us to get rid of all these workarounds again.

Detailed Change Log

wp-cli/wp-cli-bundle

  • Fix Phar path resolution with renamed binaries [#752]
  • Deployment: Fix FILENAME env var [#696]
  • Address deprecation warnings in Behat tests [#663]

wp-cli/wp-cli

  • Replace duplicate-post plugin with debug-bar in feature tests [#6091]
  • Use forked mustache library [#6090]
  • Escape CSV output [#6089]
  • Make sure existing esc_like() takes precedence [#6088]
  • Set display_errors to stderr (lowercase) instead of STDERR [#6084]
  • Fix update step for nightlies [#6075]
  • Detect MariaDB vs MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com [#6072]
  • Update WP-CLI update message [#6071]
  • Add WP_CLI_REQUIRE environment variable for including extra PHP files [#6070]
  • Remove array_column() compatibility function [#6068]
  • Support multiple files in WP_CLI_EARLY_REQUIRE [#6065]
  • Properly create missing WP-CLI configuration file when needed [#6062]
  • Improve command suggestions for taxonomies and post types [#6059]
  • Fix undefined variable issue [#6058]
  • Pass working-directory and stdin to docker scheme [#5974] & [#6057]
  • Add test for line breaks in table view [#6055]
  • Ensure code after wp-settings.php call is loaded [#6042]
  • Allow collecting PHPUnit coverage [#6041]
  • don’t forcefully exec() docker version [#6040]
  • Improve regular expression for detecting wp-settings.php [#6039]
  • Check PHP version requirement in update check [#6037]
  • Add hook to http_request() utility function [#6036]
  • Add PHPDoc for cmd_starts_with() method [#6034]
  • Update expected error message in unit tests [#6032]
  • Update outdated AJAX documentation link [#6031]
  • Add global documentation [#6017]
  • Allow remote binary customization [#6013]
  • Add configurable user agent to WP-CLI to detect in firewall logs [#5998]
  • Convert PHPUnit deprecations into exceptions [#5994]
  • Remove unused automerge workflow [#5992]
  • Fix CSV escaping deprecation notices [#5991]
  • Check for root earlier [#5987]
  • Remove use of E_STRICT for wp_debug_mode() [#5986]
  • Fix deprecation notices for ReflectionProperty::setValue() [#5984]
  • Fix “missing return type” deprecation warnings in WP_CLI\Iterators\CSV [#5983]
  • Fix implicitly nullable parameters [#5982]
  • Update Requests to v2.0.12 [#5981]
  • Update log and warning logger functions comment according to the actual functionality [#5979]
  • Add defaults and accepted values for runcommand() options in documentation [#5953]

wp-cli/handbook

  • Update documentation to include new WP_CLI_SSH_BINARY value [#559]
  • Add documentation for newly supported ENV vars [#556]
  • Update URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org for True-False Hosting [#553]

wp-cli/cache-command

  • Fix expired transients tests [#104]
  • Allow manually dispatching tests workflow [#99]
  • Make transient test more robust against added transients by coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. [#98]
  • Add pluck & patch commands for caches and transients [#89]

wp-cli/checksum-command

  • Add blank space when trimming the version [#130]
  • Add --exclude argument for verifying checksums [#123]
  • Remove unused variable [#134]
  • Don’t check missing files [#131]

wp-cli/config-command

  • Don’t require file to be writable for config has [#187]
  • Suppress output of eval(get_wp_config_code) preventing errors printing twice [#188]

wp-cli/core-command

  • Fix flaky tests due to changing download URL [#277]
  • Allow installing major version with trailing zero [#276]
  • Use existing WpOrgApi helper class [#283]
  • Add doc comment for $insecure [#281]
  • Host shouldn’t include http:// [#279]

wp-cli/cron-command

  • Harden test checking for log file [#111]

wp-cli/db-command

  • Correct error message in db search for --format=count [#267]
  • Update db search documentation [#265]
  • Add --add-drop-table to export command options [#263]
  • Improve MariaDB detection/compatibility [#280]
  • Add affected rows count for queries that can modify data in db query [#277]
  • Don’t hardcode MySQL command names [#275]

wp-cli/entity-command

  • Add missing options header in signup list command [#508]
  • Ensure user update returns non-zero exit code for invalid users [#527]
  • Make term-migrate test more robust [#524]
  • Add a flag for getting post meta as a single value or not [#523]
  • Add JSON input support for tax_query and meta_query [#522]
  • Add JSON input support for date_query argument [#520]
  • wp option – new autoload values in autoload filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. [#515]
  • Return a proper WP_Error object when failing to update a comment [#514]
  • Add test cases asserting post/term update error exit codes [#513]
  • Safeguard remove cap from collisions with roles [#530]

wp-cli/export-command

  • Use get_post_stati() instead of get_post_statuses() to support all registered post statuses in export [#121]

wp-cli/extension-command

  • Use strpos() instead of str_contains() in get_wporg_data() function [#432]
  • Don’t use transient values when doing plugin|theme list [#446]
  • Fix fatal error issue in in_array() function [#445]
  • Support requires and requires_php in plugin|theme list and plugin|theme update commands [#440]
  • Update logic when deleting and uninstalling plugins [#438]
  • Check WordPress and PHP requirements before installing a theme or plugin [#436]
  • Add --force-check flag to wp plugin list and wp theme list. [#426]
  • Cache certain GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged by the repository owner. https://github.com/ URLs [#385]

wp-cli/i18n-command

  • Convert PHPUnit deprecations to exceptions [#413]
  • make-pot: scan any theme.json file in any level [#424]
  • Add ability to pass extensions to make-json command [#439]
  • Update schema fallback files [#431]
  • make-json: Add new --domain argument [#430]
  • update-po: merge X-Domain header [#429]
  • Add php-format and js-format flags [#428]

wp-cli/language-command

  • Mention site switch-language in readme [#159]
  • Allow filtering languages by multiple statuses [#162]

wp-cli/php-cli-tools

  • Example code: remove use of E_STRICT [#175]
  • Fix implicitly nullable parameters [#173]
  • Replace tabs in tables with 4 spaces [#181]
  • Properly handle line breaks in column value [#179]
  • Support line breaks and tab replacement in tabular table values [#182]
  • Fix removal of trailing tab / whitespace in tabular table [#184]
  • Avoid deprecation warnings in newer PHP [#185]

wp-cli/rewrite-command

  • Improve warning message in rewrite flush [#69]

wp-cli/scaffold-command

  • Convert PHPUnit deprecations to exceptions [#348]
  • Add dependency checks and error handling for svn and download tools [#345]
  • Accept Bitbucket as valid CI in scaffold plugin [#340]
  • Update Bitbucket CI [#339]
  • Update templates for child themeChild theme A Child Theme is a customized theme based upon a Parent Theme. It’s considered best practice to create a child theme if you want to modify the CSS of your theme. https://developer.wordpress.org/themes/advanced-topics/child-themes/ scaffolding [#342]
  • Update custom post typeCustom Post Type WordPress can hold and display many different types of content. A single item of such a content is generally called a post, although post is also a specific post type. Custom Post Types gives your site the ability to have templated posts, to simplify the concept. and taxonomyTaxonomy A taxonomy is a way to group things together. In WordPress, some common taxonomies are category, link, tag, or post format. https://codex.wordpress.org/Taxonomies#Default_Taxonomies. scaffolding [#341]
  • Update GitLab CI configuration file [#338]
  • Remove grunt from plugin scaffolding [#337]

wp-cli/shell-command

  • Add missing do construct [#68]

wp-cli/wp-config-transformer

  • Add read-only option for WPConfigTransformer [#54]
  • Add a branch-alias for dev-main [#55]
  • Deletion of constants deletes more lines than expected [#53]

Contributors

@9ete, @amirhmoradi, @baizmandesign, @benjaminprojas, @BhargavBhandari90, @cliffordp, @daalderp, @dac514, @danielbachhuber, @dd32, @dkoston, @dlind1, @drzraf, @elenachavdarova, @ernilambar, @gedex, @gitlost, @greatislander, @herregroen, @i-am-chitti, @iDschepe, @imrraaj, @itsmekopila, @janw-me, @jenkoian, @jkrrv, @jrfnl, @karthick-murugan, @l3ku, @localheinz, @marksabbath, @matiasbenedetto, @matzeeable, @meszarosrob, @michaelw85, @michaelzangl, @mostafasoufi, @mrsdizzie, @oandregal, @ocean90, @ouikhuan, @PARTHVATALIYA, @pbiron, @peterwilsoncc, @petitphp, @pfefferle, @pmbaldha, @ponsfrilus, @pwtyler, @ramonjd, @rodrigoprimo, @Roy-Orbison, @saas786, @sabithahmd, @sdnunca, @shendy-a8c, @shreya0204, @siliconforks, @strarsis, @swissspidy, @todeveni, @Tug, @tyrann0us, @wojsmol, @wpeople-dev, @WPprodigy, @yousan

#release, #v2-12-0

WP-CLI v2.11.0 Release Notes

A new release of WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/, WP-CLI v2.11.0, is now available. For this release, we had 61 contributors collaborate to get 274 pull requests merged. 

As always, big thanks to the WP-CLI sponsors that make the continued maintenance possible.

This is a small release that fixes a lot of small and not so small bugs, but we also have a couple of new features that I’ll want to highlight. As always, you can also skip directly to the detailed changelog if you prefer.

If you already use WP-CLI, updating is as simple as wp cli update. Else, check out our website for recommended installation methods.

Thank you for providing the additional details on the pull requests. I’ll go through each one and provide improved highlights with examples and usage details:

Improved CSV Handling

The CSV reading functionality has been enhanced to properly handle multi-line values. This fix ensures that complex CSV data can be processed correctly, improving the reliability of commands that work with CSV input.

Example of a CSV file that can now be correctly processed:

id,name,description
1,"Product A","This is a
multi-line
description"
2,"Product B","Another description"

New Signup Management Commands

New commands have been added for managing signups on multisiteMultisite Multisite is a WordPress feature which allows users to create a network of sites on a single WordPress installation. Available since WordPress version 3.0, Multisite is a continuation of WPMU or WordPress Multiuser project. WordPress MultiUser project was discontinued and its features were included into WordPress core. Advanced Administration Handbook -> Create A Network. installations:

  • wp user signup list: List signups
  • wp user signup get: Get details about a signup
  • wp user signup activate: Activate one or more signups
  • wp user signup delete: Delete one or more signups

Example usage:

# List all signups
$ wp user signup list

# Activate a signup
$ wp user signup activate johndoe@example.com

# Delete a signup
$ wp user signup delete 123

New Site Generator Command

A new wp site generate command has been added to create multiple sites programmatically in a multisite installation. This is useful for testing or development purposes.

Example usage:

# Generate 10 new sites
$ wp site generate --count=10

# Generate sites with a specific slug
$ wp site generate --count=2 --slug=testsite

GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged by the repository owner. https://github.com/ Release Installation Support

The extension command now supports installing plugins and themes directly from GitHub releases. This feature allows users to easily install and manage extensions hosted on GitHub without manual downloads.

Example usage:

# Install a plugin from its latest GitHub release
$ wp plugin install https://github.com/username/plugin-name/releases/latest

# Install a specific version of a theme from GitHub
$ wp theme install https://github.com/username/theme-name/releases/tag/v1.2.3

Improved PluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. Management

A new --recently-active option has been added to the plugin list command, allowing users to quickly identify and manage plugins that have been recently active on their site.

Example usage:

# List recently active plugins
$ wp plugin list --recently-active

# Activate all recently active plugins
$ wp plugin activate $(wp plugin list --recently-active --field=name)

Option to Delete Unknown Image Sizes

A new --delete-unknown flag has been added to the wp media regenerate command. This allows users to remove files and image metadata for image sizes that no longer exist in the site’s configuration, without regenerating other thumbnails.

Example usage:

# Remove unknown image sizes for all images
$ wp media regenerate --delete-unknown

# Remove unknown image sizes for a specific image
$ wp media regenerate 123 --delete-unknown

This feature is particularly useful for cleaning up after changing image size configurations or removing plugins that added custom image sizes.

User Existence Check Command

A new wp user exists command has been added, similar to the existing wp post exists command. This allows for quick checks on whether a user exists in the WordPress database.

Example usage:

# The user exists.
$ wp user exists 1337
Success: User with ID 1337 exists.
$ echo $?
0

# The user does not exist.
$ wp user exists 10000
$ echo $?
1

Fish Shell Completion Support

WP-CLI now supports command completion for the Fish shell, expanding its compatibility beyond Bash and Zsh. This addition makes it easier for Fish shell users to work with WP-CLI commands.

Detailed change log

To avoid too much noise in the list above, the following types of pull requests have been omitted:

  • PRs that only bumped dependencies to their latest version.
  • PRs that only fixed a typo in the documentation.
  • PRs that add a Composer script.

wp-cli/wp-cli-bundle

  • Update versions of WP-CLI used in tests [#658]
  • Stop testing WordPress latest version on PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/index.php < 7.2 [#651]

wp-cli/wp-cli

  • Add fish shell completion [#5954]
  • Add defaults and accepted values for runcommand() options in documentation [#5953]
  • Address warnings with filenames ending in full stop on Windows [#5951]
  • Fix unit tests [#5950]
  • Update copyright year in license [#5942]
  • Fix breaking multi-line CSV values on reading [#5939]
  • Fix broken GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ test [#5938]
  • Update docker runner to resolve docker path using /usr/bin/env [#5936]
  • Fix inherit path in nested directory [#5930]
  • Minor docblock improvements [#5929]
  • Add Signup fetcher [#5926]
  • Ensure the alias has the leading @ symbol when added [#5924]
  • Include any non-default hook information in CompositeCommand [#5921]
  • Correct completion case when it ends in = [#5913]
  • Fix inline comments [#5912]
  • Update inline comments [#5910]
  • Add a real-world example for cli has-command [#5908]
  • Fix typos [#5901]
  • Avoid PHP deprecation notices in PHP 8.1.x [#5899]

wp-cli/handbook

  • Update handbook for v2.11.0 release [#531]
  • Add missing scaffold package markdown files [#529]
  • Fix Undefined array key warning [#525]
  • Add files autoloader for bin/command.php [#524]
  • Small typo correction [#523]
  • Fix documentation generation error [#520]
  • Add Yoast WP-CLI command to tools.md [#517]
  • Add search and replace quick start & adding new command [#515]
  • Add Composer package name [#514]
  • Clean up hosting links [#513]
  • Add to hosting-companies.md [#512]
  • Remove invalid link from handbook [#511]
  • Update contributor dayContributor Day Contributor Days are standalone days, frequently held before or after WordCamps but they can also happen at any time. They are events where people get together to work on various areas of https://make.wordpress.org/ There are many teams that people can participate in, each with a different focus. https://make.wordpress.org/support/handbook/getting-started/getting-started-at-a-contributor-day/ page for WCEU 2024 [#510]
  • Add documentation on Fish completions [#508]
  • Add code quality setup [#506]
  • Fix global parameters 404 link [#504]
  • Fix release checklist hyperlink [#503]
  • Fix broken link for the global parameters hyperlink [#502]
  • Include hook details in documentation [#501]
  • Add link to contribution tutorial videos [#500]
  • Update hosting-companies.md [#499]
  • Refresh the Hack Day page for April 2024 [#498]
  • Fix branch name in common issues handbook page [#497]
  • Fix common issues title [#496]
  • Fix broken link [#494]
  • Add Hack Day page to manifest [#492]
  • Separate out the WP-CLI Hack Day and WordCampWordCamp WordCamps are casual, locally-organized conferences covering everything related to WordPress. They're one of the places where the WordPress community comes together to teach one another what they’ve learned throughout the year and share the joy. Learn more. Contributor Day docs [#490]
  • Update running-commands-remotely.md [#489]
  • Update brew formula link [#487]
  • Update installing.md [#481]

wp-cli/cache-command

  • Update failing tests after new transient in WP coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. [#97]

wp-cli/config-command

  • Improve messaging when shuffling salts [#177]
  • Fix incorrect message shuffling salt in PHP 5.6 [#176]
  • Update config commands examples [#174]
  • Refactor config create command [#181]

wp-cli/core-command

  • Remove extraneous argument in core update example [#255]
  • Fix --format in core check-update command [#253]
  • Update core commands docs [#251]

wp-cli/cron-command

  • Fix cron commands examples [#102]
  • Add --all flag to cron event delete [#98]

wp-cli/db-command

  • Add note about multisite usage in db query docs [#251]
  • Enable --format=<format> for db search [#247]
  • Update tests after change in WP trunk version [#257]

wp-cli/embed-command

  • Update examples for embed commands [#75]

wp-cli/entity-command

  • Avoid time dependent test in user application-password [#499]
  • Support new upstream autoload options [#496]
  • Support nickname when creating user [#495]
  • Use twentytwelve theme in menu location test [#494]
  • Add examples for option set-autoload and option get-autoload commands [#492]
  • Add missing ## OPTIONS in CommandWithTerms class [#487]
  • Add user exists command [#486]
  • Accept user login and email in user spam and user unspam commands [#485]
  • Update doc for user spam and user unspam command [#483]
  • Validate reassigning user in user delete command [#482]
  • Fix warning message in user spam command [#481]
  • Add missing application-password and site meta subcommands to readme [#478]
  • Introduce --format=ids in user application-password list [#475]
  • Fix dynamic property issue in user session class [#470]
  • Fix PHP notice in comment recount with invalid ID [#469]
  • Fix example for site deactivate command [#468]
  • Update examples in user commands [#467]
  • Update term commands examples [#466]
  • Update example output for comment delete command [#465]
  • Fix menu command output examples [#462]
  • Add site generate command [#498]
  • Add commands for managing signups on multisite [#489]

wp-cli/extension-command

  • Improve warning message for installing and activating multiple themes [#419]
  • Replace user-switching plugin from feature tests [#418]
  • Update the theme in feature tests [#417]
  • Show additional plugin headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes. values in plugin get <plugin> output [#414]
  • Add tested_up_to field [#413]
  • Warn when supplying multiple themes with theme install --activate [#408]
  • Fix plugin commands examples [#403]
  • Update theme commands examples [#401]
  • Correct parameter type in ParseThemeNameInput trait [#400]
  • Add --recently-active option in plugin list command [#424]
  • Fix visibility in command class methods [#423]
  • Add support for GitHub release installation [#421]
  • Replace edit-flow plugin by debug-bar in feature tests [#427]

wp-cli/i18n-command

  • Skip strings without translation in make-php [#389]
  • Add more headers to PHP translation files [#388]
  • Use relative paths for file header references [#384]
  • Translate “description” field from theme.json [#408]
  • Revert changes to extract title from styles.blocks.variations [#407]
  • find title string within styles.blocks.variations in theme.json [#405]
  • Add tests for rspack and esbuild bundle output [#404]
  • Fix deprecation warnings in unit tests [#402]
  • Use relative paths for file header references (Windows fix) [#400]
  • Ensure that the POT file uses the same license as the theme [#399]
  • Add examples for i18n update-po command [#392]
  • Add examples for i18 make-pot [#390]

wp-cli/language-command

  • Update examples for language command [#145]
  • Update examples for language core command [#142]
  • Update examples for language theme command [#141]
  • Update examples for language plugin command [#140]
  • Improve warning message for unavailable language pack [#139]
  • Update doc for language core install command [#153]
  • Add --format=count in language list commands [#151]
  • Update feature tests for language core update [#149]

wp-cli/maintenance-mode-command

  • Add missing OPTIONS heading in maintenance-mode activate command [#28]

wp-cli/media-command

  • Fix incorrect image sizes in media image-size command [#192]
  • Remove extraneous error check [#191]
  • Update media commands examples [#189]
  • Optimize memory consumption when querying attachments [#188]
  • Add option to delete unknown image sizes [#199]

wp-cli/package-command

  • Update docs and examples for package commands [#186]
  • Fix failing test [#185]
  • Fix failing PHPUnit tests [#188]

wp-cli/php-cli-tools

  • Fix unit tests [#172]

wp-cli/scaffold-command

  • Update theme tests to remove p2 and use twentytwelve [#336]
  • Correct plugin main file in bootstrap in scaffolded test [#335]
  • Scaffold theme test should work in PHP greater than 8.0 [#334]
  • Add GitHub as valid CI for plugin scaffold and theme scaffold [#331]
  • Update scaffold command examples [#329]

wp-cli/search-replace-command

  • Fix tests after change in WordPress trunk [#195]
  • Fix test for WordPress trunk [#197]

wp-cli/super-admin-command

  • Add IDs as format for super admin list [#60]
  • Correct super-admin commands examples [#57]

wp-cli/widget-command

  • Replace p2 theme with twentytwelve in feature test [#61]

wp-cli/wp-config-transformer

  • Fix failing PHPUnit tests [#52]

Contributors

#release, #v2-11-0

WP-CLI v2.11.0 release date: August 6th

The v2.11.0 release of WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/ is scheduled to be published on Tuesday, August 6th 2024.

Apart from bug fixes and compatibility improvements, you can also expect a few command and parameter additions to help make the tool more efficient, as well as a large swath of documentation fixes and improvements.