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.https://codex.wordpress.org/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 be 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/preface.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://2017.us.wordcamp.org/contributor-day/ 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.10.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.10.0, is now available. For this release, we had 63 contributors collaborate to get 233 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.

New i18n make-php command

The WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. performance team is working on the Performant Translations feature project, which aims to speed up translations by using 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/preface.php. files instead of MO files. The goal is to get it ready for WordPress 6.5.

The new i18n make-php command allows you to experiment with these faster translations right away and see how these work for your projects.

# Create PHP files for all PO files in the current directory.

$ wp i18n make-php .

# Create a PHP file from a single PO file in a specific directory.
$ wp i18n make-php example-plugin-de_DE.po languages

Update themes to minor or patch versions

When updating themes with WP-CLI, you can now to choose to only update to the latest minor or patch version with the new flags --minor and --patch.

You could already do this for 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 updates, and now themes are joining the club as well.

Support for adding and removing of multiple user roles

The two commands user add-role and user remove-role are now less lazy and can accept multiple roles to add or remove for a given user. You can make this work by simply adding as many roles as needed as separate arguments.

$ wp user add-role 12 author editor

Success: Added 'author', 'editor' roles for johndoe (12).

$ wp user remove-role 12 author editor
Success: Removed 'author', 'editor' roles for johndoe (12).

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. the site list by user

When displaying a list of sites on your 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.https://codex.wordpress.org/Create_A_Network. network, you can now filter this list by a site user and only display sites that this user is a part of. You can do so by using the new --site_user flag for the site list command.

This can be helpful for administrative tasks around access control or for offboarding users.

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

  • Fix SQLite tests [#588]

wp-cli/wp-cli

  • Fix PHP deprecation warnings [#5897]
  • Only use --skip-column-statistics flag when available [#5895]
  • Handle unparseable tags gracefully [#5894]
  • WpOrgApi: allow specifying fields request parameters [#5893]
  • Remove unneeded compatibility shim [#5885]
  • Use has_config() in get_config() to prevent warnings on null values [#5880]
  • Suggest 'network meta' intead of 'network option' [#5879]
  • Updated docblock for admin.php [#5877]
  • Fix PHP fatals when admin.php has CRLF line endings [#5875]
  • Standard completion of current option [#5873]
  • Add WP_CLI\Utils\has_stdin() function [#5872]
  • Add verbosity level and quiet flag in ssh command based on debug flag [#5869]
  • Remove the pre-commit hook installation and its corresponding command [#5868]
  • Add missing required arguments when using --prompt [#5865]
  • Move RecursiveDataStructureTraverser to wp-cli/wp-cli package [#5864] [#5866] [#5871]
  • Add docker compose command support in SSHSSH Secure SHell - a protocol for securely connecting to a remote system in addition to or in place of a password. command generation [#5863]
  • Add missing documentation for $data attribute in http_request() [#5861]
  • Update inline PHP documentation [#5853]
  • Remove contrib-list.php [#5851]
  • Update release checklist template [#5850]
  • Update tests to accommodate for SQLite [#5849]
  • Post-release version bump after v2.9.0 [#5848]
  • Update Formatter\show_table to use Runner->in_color rather than shouldColorize [#5804]

wp-cli/handbook

wp-cli/wp-cli.github.com

  • Update translations [#434]
  • Fix link in index.md [#433]
  • Update ja/index.md [#432]

wp-cli/checksum-command

  • Add edge case handling checksum verification of hello-dolly plugin [#119]

wp-cli/config-command

  • Add support for 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/. socket connection [#171]
  • Fix tests for SQLite [#168]

wp-cli/core-command

  • Add --force-check flag to check-update command [#246]
  • Improve SQLite compatibility [#243]

wp-cli/db-command

  • Better document --skip-column-names for retrieving a specific value [#249]
  • Regenerate README file [#246]
  • Document what wp db check doesn’t do and provide suggestions for next commands [#244]

wp-cli/entity-command

  • Add missing documentation [#451]
  • Add command to get the post ID by URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org [#449]
  • Fix archiving a site by numeric slug [#448]
  • Regenerate README file [#447]
  • Add origin and exclude-role-names filters to list-caps command [#445]
  • Fix deleting a site by a slug that is an integer [#444]
  • Reuse has_stdin() from framework [#443]
  • Remove RecursiveDataStructureTraverser [#442]
  • Support for adding and removing of multiple user roles [#437]
  • Add examples on listing unapproved, spam and 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. comments [#436]
  • Fix super admin test on SQLite [#434]
  • Do not assume get_super_admins() has the 0 array index [#432]
  • Improve SQLite compatibility [#431]
  • Fix example for post create command [#458]
  • Update examples for user application delete command [#457]
  • Regenerate README file [#456]
  • Fix variable name in application_name_exists polyfill [#455]
  • Add filter site__user_in on wp site list [#438]

wp-cli/extension-command

  • Regenerate README file [#381]
  • Add update_version to the default fields for plugin and theme commands [#380]
  • Update some tests for SQLite [#378]
  • Remove duplicated code [#391]
  • Switch tests to use site-secrets instead of user-switching [#389]
  • Support 'wporg_status' and 'wporg_last_updated' as optional wp plugin list fields [#382]
  • Regenerate README file [#397]
  • Added --minor and --patch CLICLI Command Line Interface. Terminal (Bash) in Mac, Command Prompt in Windows, or WP-CLI for WordPress. option in wp theme update [#393]
  • Fix counting of errors when attempting activations [#398]

wp-cli/i18n-command

  • make-mo: Add destination file support [#373]
  • Stage the correct files in schema workflow [#370]
  • Update theme-i18n.json [#366]
  • Fix file format in make-php [#379]
  • Regenerate README file [#378]
  • Add file references for plugin/theme headers [#377]
  • Add wp i18n make-php command [#363]

wp-cli/language-command

  • Fix tests after WordPress 6.4 release [#133]
  • Skip some tests on SQLite [#132]
  • Allow for PHP 8.2+ warning on old WP core [#130]
  • Remove use of @require-wp-latest [#135]
  • Re-enable some tests for SQLite [#134]
  • Properly delete 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. & PHP translation files [#137]

wp-cli/maintenance-mode-command

  • Evaluate $upgrading numeric value when checking if maintenance mode is active [#22]

wp-cli/media-command

  • Add --file_name=<name> argument for wp media import [#187]

wp-cli/package-command

  • Fix compatibility with newer Composer versions [#183]

wp-cli/php-cli-tools

  • Fix maxFlag to flagMax and maxOption to optionMax typos in HelpScreen class [#170]
  • Use class instead of static variables for the speed measurement [#168]
  • Remove inexistent post-install-cmd [#167]
  • Fix type hinting for prompt function [#141]

wp-cli/scaffold-command

  • Add @require-mysql for tests with explicit MySQL dependency [#326]
  • Remove Travis CI from wp scaffold plugin-tests [#325]

wp-cli/search-replace-command

  • Skip search and replace on objects that can’t deserialize safely [#192]

  • PHP 8.2 Deprecation: Fix creation of dynamic property. [#193]

wp-cli/super-admin-command

  • PHP 8.2 Deprecation: Fix creation of dynamic property. [#55]

wp-cli/wp-config-transformer

  • Replace DOS line endings with LF [#49]
  • Fix empty line comment parsing by checking for the existing of a line ending [#48]

Contributors

#release, #v2-10-0

WP-CLI v2.9.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.9.0, is now available. For this release, we had 62 contributors collaborate to get 225 pull requests merged. 

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

This is a small release with the main purpose of polishing 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/preface.php. 8.2 support and ensuring compatibility with WordPress 6.4. Nevertheless, apart from the flurry of bugs that were fixed, we also have a few 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.

wp config is-true

The new wp config is-true command determines whether value of a specific defined constant or variable is truthy. This is useful for scripting purposes. Example:

# Assert if MULTISITE is true
$ wp config is-true MULTISITE
$ echo $?
0

Uninstalling languages for all plugins/themes at once

The wp language plugin and wp language theme commands both now support the --all flag. If set, languages for all plugins will be uninstalled. This brings them more in line with other wp language commands.

Modify sites by slug

All the wp site subcommands, such as wp site archive, wp site delete or wp spam now support a --slug argument instead of passing an ID. Here, the slug is the path of the site to be modified. Subdomain on subdomain installs, directory on subdirectory installs.

SSHSSH Secure SHell - a protocol for securely connecting to a remote system in addition to or in place of a password. ProxyJump support

The wp-cli.yml config file now supports a proxyjump key for hosts to specify a common proxy for all traffic to go through. This is the equivalent of passing the -J argument to ssh.

Beginning testing against SQLite

This is not a change in WP-CLI itself, but starting with WP-CLI 2.9.0, we’re now running all automated tests against SQLite, using the SQLite Database Integration feature pluginFeature Plugin A plugin that was created with the intention of eventually being proposed for inclusion in WordPress Core. See Features as Plugins. developed by the community. This not only makes contributions easier (as no 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/. database server is needed), but also paves the way for eventually supporting using WP-CLI with WordPress sites using SQLite. It’s still a long way to go, but the initial results are very positive. More on this in the future!

In the meantime, this is a great project for our upcoming WP-CLI Hack Day on Friday, November 10th!

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 an allow-plugins rule to Composer.
  • PRs that add a Composer script.

wp-cli/wp-cli-bundle

  • Update to WPCSWordPress Community Support A public benefit corporation and a subsidiary of the WordPress Foundation, established in 2016. v3 [#569]
  • No longer necessary to test WordPress latest with PHP 5.6 [#568]
  • Update branch name in wp-cli-updatedeb.sh [#565]
  • Update DEBIAN/control depends to support later versions of PHP [#562]
  • Run trunk deployDeploy Launching code from a local development environment to the production web server, so that it's available to visitors. tests against PHP 7 instead of PHP 5.6 [#560]

wp-cli/wp-cli

  • Add debugging output for @when command registration [#5841]
  • Fix --skip-themes for WordPress 6.4 [#5840]
  • Update phpcs.xml to match new WPCS rules [#5836]
  • Update to WPCS v3 [#5834]
  • Respect alias --path= in IncludeRequestsAutoloader [#5830]
  • Update type hint of $callable parameter in add_command() method [#5828]
  • Require PHP 7.0 for tests installing WP via Composer [#5825]
  • Require PHP 7+ for installing 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/ [#5824]
  • Run test only on PHP 7.0+ [#5823]
  • Display a custom error message when themes/functions.php fatals [#5817]
  • Fix PHP 8.1 deprecation: ReturnTypeWillChange [#5807]
  • Add support for the proxyjump key [#5805]
  • Mention updating the homepage in the release process [#5802]

wp-cli/handbook

  • Add documentation for --context [#466]
  • Remove blank line from 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. table [#465]
  • Add detailed documentation for –ssh [#462]
  • Add some issues for WCUS 2023 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://2017.us.wordcamp.org/contributor-day/ https://make.wordpress.org/support/handbook/getting-started/getting-started-at-a-contributor-day/. [#460]
  • Add Rad Web Hosting Provider [#458]
  • Fix handbook manifest 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. corruption [#457]
  • Add a new doc for 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 [#456]
  • Update plugin-unit-tests.md [#455]
  • Update 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 be the repository owner. https://github.com/ links to use search endpoint instead [#453]
  • Fix 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.https://codex.wordpress.org/Create_A_Network. search-replace example [#451]
  • Adds example --ssh= schemes [#450]
  • Adds common issue for xdebug max nesting errors. [#449]
  • Add more subheadings to Functional Tests [#448]
  • Added “Sort plugins or themes by certain column(s)” to “Snippets” [#446]

wp-cli/cache-command

  • Update to WPCS v3 [#91]
  • Add phpcbf Composer script [#90]
  • Update warning text during multisite cache flushes [#88]

wp-cli/checksum-command

  • Don’t warn about a .maintenance file in the root directory [#114]
  • Regenerate README file [#113]
  • Add an --exclude=<plugin> argument to wp plugin verify-checksums [#104]
  • Update to WPCS v3 [#116]
  • Only run tests on PHP 7.0+ [#115]

wp-cli/config-command

  • Change mysql CLICLI Command Line Interface. Terminal (Bash) in Mac, Command Prompt in Windows, or WP-CLI for WordPress. call to native PHP function [#158]
  • Update to WPCS v3 [#163]
  • Slight tweaks to wp config is-true [#162]
  • Add wp config is-true command [#161]
  • Fail on empty table prefix [#164]
  • Do not use die() when there is a db error [#166]

wp-cli/core-command

  • Tests: Fix tests referencing trunk/nightly [#238]
  • Improve documentation for core is-installed command [#237]
  • Update to WPCS v3 [#241]
  • Only run tests on PHP 7.0+ [#239]
  • Directly pass empty or missing password parameter to WordPress [#232]

wp-cli/cron-command

  • Update to WPCS v3 [#100]
  • Fix incorrect recurrence display for events with invalid schedules [#99]

wp-cli/db-command

  • Update to WPCS v3 [#240]

wp-cli/embed-command

  • Replace asciinema.org in tests [#71]
  • Fix tests [#72]
  • Update to WPCS v3 [#73]

wp-cli/entity-command

  • Regenerate README file [#410]
  • User: Add more examples for scoped password reset [#409]
  • Warn when deleting multisite user with no blog roles [#408]
  • PHP 8.2 Deprecation: Fix creation of dynamic property. [#413]
  • Regenerate README file [#424]
  • Fix typo for $parent_instance param in RecursiveDataStructureTraverser constructor [#422]
  • Update to WPCS v3 [#419]
  • Prevent unexpected missed schedules when generating new posts [#418]
  • Add --slug=<site> as an available parameter to wp site commands [#416]
  • Increase precision of wp post generate test [#425]

Contributors

@Ancocodet@atoomic@benjaminprojas@chesio@cliffordp@connerbw@danielbachhuber@dd32@dlind1@drzraf@elenachavdarova@fmfernandes@GaryJones@gedex@gitlost@greatislander@herregroen@jacksonwp@janw-me@jenkoian@jrfnl@justinmaurerdotdev@l3ku@localheinz@MannyAdumbire@matzeeable@michaelzangl@MiguelAxcar@mrsdizzie@NielsdeBlaauw@oandregal@ocean90@Pathan-Amaankhan@paulschreiber@pbiron@pdaalder@petertwise@petitphp@pmbaldha@ponsfrilus@rafaelzaleski@raicem@rodrigoprimo@rwagner00@schlessera@shendy-a8c@siliconforks@slaFFik@Soean@Souptik2001@spicecadet@stoyan-g@strarsis@swissspidy@tubiz@Tug@wojsmol@wojtekn@WPprodigy@yousan@zzap

#release, #v2-9-0

WP-CLI v2.9.0 release date: October 25th

The v2.9.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 Wednesday, October 25th 2023.

In addition to a lot of bug fixes and enhancements, this release is also expected to address the last known compatibility issues with 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/preface.php. 8.2 and the upcoming WordPress 6.4 version.

The release candidateRelease Candidate A beta version of software with the potential to be a final product, which is ready to release unless significant bugs emerge. for this release will already be available sometime during the week prior, to allow for early testing. We will announce the availability of that release candidate in the #hosting-community channel to allow hosting providers to do early smoke testing.

#release, #v2-9-0

WP-CLI v2.8.1 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/ is available as of today: WP-CLI v2.8.1. For this release, we had 3 contributors collaborate to get 7 pull requests merged. 

This is a hotfix release to fix 2 critical bugs with release v2.8.0.

Detailed change log

wp-cli/wp-cli-bundle

  • Release v2.8.1 [#556]
  • Update Composer lock file [#555]
  • Update wp-cli/search-replace-command to latest [#554]
  • Avoid fatal errors when pulling in the bundle with Requests v2 via Composer [#552]

wp-cli/wp-cli

  • Define WP_CLI_ROOT if needed [#5797]
  • Extract Requests out of Composer [#5796]

wp-cli/search-replace-command

  • Fix search-replace for tables with composite primary keys [#183]

Contributors

@brandonpayton, @danielbachhuber, @schlessera

#release, #v2-8-1

WP-CLI v2.8.0 Release Notes

After a bit of unexpected delay, 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/ is available as of today: WP-CLI v2.8.0. For this release, we had 66 contributors collaborate to get 277 pull requests merged. 

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

This is a small release with the main purpose of polishing 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/preface.php. 8.1/8.2 support. Nevertheless, apart from the flurry of bugs that were fixed, we also have a few new features that I’ll want to highlight. As always, you can also skip directly to the detailed changelog if you prefer.

Bundled with Requests v2

The last component that needed updating for full PHP 8.1 was the bundled Requests library. With the move to v2 of Requests, adding support for PHP 8.1 seems to be complete, an.d PHP 8.2 is starting to look good as well.

Note that the way the dependencies interact between WP-CLI and WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. (which has no proper dependency management that could help out here) makes for a somewhat hacky solution at this time. We’re looking into something more robust for a future release, but until then make sure you submit issues when you encounter edge cases that the current approach does not yet take into account.

Improve support for caching solutions

There is a new command wp cache supports <feature> to detect cache features like add_multiple. Furthermore, we have a new command wp cache flush-group that allows you to flush at the group level. Also, WP-CLI now produces warning when you use wp transient list when an object cache is active. Finally, WP-CLI now recognizes Object Cache Pro as a caching solution.

$ wp cache supports add_multiple
$ echo $?
0

$ wp cache flush-group my_group
Success: Cache group 'my_group' was flushed.

Fetch URLs of entities

For the posts, terms and comments, you can now retrieve their canonical URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org via the --field=url argument. As an example, you can retrieve the URL of the post with ID 123 via the following command:

$ wp post get 123 --field=url
https://example.com/hello-world-the-sequel/

Skip config changes 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.https://codex.wordpress.org/Create_A_Network. conversion

In case you’re working on a read-only filesystem or are forced to push file changes through VCS, you can now skip the automatic config file changes that wp core multisite-convert does. All you need to do is add the --skip-config flag, and the command will not only obey that choice, but also conveniently print the changes you need to make to the config file manually. This behavior was already included with wp core multisite-install, but now the conversion command knows this trick too.

$ wp core multisite-convert --skip-config
Set up multisite database tables.
Addition of multisite constants to 'wp-config.php' skipped. You need to add them manually:
define( 'WP_ALLOW_MULTISITE', true );
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', {$subdomain_export} );
\$base = '/';
define( 'DOMAIN_CURRENT_SITE', 'example.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
Success: Network installed. Don't forget to set up rewrite rules (and a .htaccess file, if using Apache).

Verify checksums for the root folder

The wp core verify-checksums now has a new --include-root flag that makes it scan and verify the root folder as well (the one that ABSPATH points to).

$ wp core verify-checksums --include-root
Warning: File should not exist: dump.sql
Warning: File should not exist: backdoor.php

Configure autoloading behavior for options

Two new commands wp option get-autoload and wp option set-autoload have been added to change the autoloading behavior for an existing option. This was not easily possible with wp option update as that only allowed the autoloading to change when the value changed as well.

$ wp option add foo bar
Success: Added 'foo' option.
$ wp option get-autoload foo
yes
$ wp option set-autoload foo no
Success: Updated autoload value for 'foo' option.
$ wp option set-autoload foo no
Success: Autoload value passed for 'foo' option is unchanged.

New flags for password reset

The command wp user reset-password now has two new flags. The first one is --show-password, and it will immediately show the new password as it is being reset. The second one is --porcelain, and it will show only the password and nothing else as output of the command. The latter one is useful for scripting purposes.

$ wp user reset-password admin --skip-email --show-password
Reset password for admin.
Password: bt6Hy!9*P0A1
Success: Password reset for 1 user.

$ wp user reset-password admin --skip-email --porcelain
yV6BP*!d70wg

Include ad-hoc code instead of evaluating it

If you’re using the wp eval-file command, it will read the file you point it to and run it through the PHP eval logic. This has a few drawbacks, though. One one hand, directives like declare(strict_types=1) will throw errors. On the other, it is not possible to use XDebug to debug such an evaluated piece of code.

To counter this, the wp eval-file command now has a new --use-include flag that makes it include the file you’re pointing to, instead of running it through eval. Note that this does not work with STDIN as input, so the - file argument can not be used at the same time as the --use-include flag.

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 an allow-plugins rule to Composer.
  • PRs that add a Composer script.

wp-cli/wp-cli-bundle

  • Adapt tests for Requests [#540]
  • Skip update-framework.yml workflow on forks [#537]
  • Add a workflow to keep wp-cli/wp-cli up to date [#507]
  • Move the new README into its proper location [#478]
  • Add a new bundle-specific README [#476]
  • Use Composer 2.2 LTS for PHP < 7.2 [#472]
  • Detect if running Phar via CLICLI Command Line Interface. Terminal (Bash) in Mac, Command Prompt in Windows, or WP-CLI for WordPress. SAPI [#465]
  • Use ramsey/composer-install in Deployment workflow [#463]

wp-cli/wp-cli

  • Harden loading of upgrader [#5791]
  • Ignore Requests deprecations in error handling for now [#5790]
  • Fallback to hardcoded folder when WPINC not defined [#5786]
  • Add RequestsLibrary::get_bundled_certificate_path() method [#5785]
  • Conditionally adapt to Core Requests library [#5783]
  • Add bootstrap step to extract default CA certificate [#5781]
  • Revert “Extract cacert from Phar for cURL” [#5780]
  • Use wp_cache_flush_runtime if supported. [#5778]
  • Extract cacert from Phar for cURL [#5777]
  • Fix some PHP 8.2 depreciation notices in behat tests [#5776]
  • Use rtrim on phar-safe path to avoid double slash [#5775]
  • Upgrade WP-CLI to Requests v2 [#5774]
  • Added wp cli alias is-group subcommand. [#5766]
  • Update test to reflect warning when --url=<url> is provided [#5763]
  • Use -R instead of -r for fallback pager command [#5759]
  • Fix autocompletion notice with PHP 8.2 [#5749]
  • Fix PHP Deprecation for 8.1 [#5743]
  • Use WP_CLI_FORCE_USER_LOGIN=1 to force --user=<login> [#5738]
  • Fix --skip-themes for themes with 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. patterns [#5737]
  • Make sure subcommand @alias definition respects @when definition [#5730]
  • Improve docs for SHELL_PIPE [#5729]
  • Use awk instead of sed to create BOM in feature test [#5728]
  • Add runtime_args to options array for runcommand [#5722]
  • Fix deprecation notice triggered in WpOrgApi class in PHP 8.1 [#5717]
  • Fix return type of make_progress_bar [#5715]
  • Add name context to before_invoke and after_invoke [#5712]
  • Check that proc_open() is available in Process::run() [#5711]
  • Improve support for cases with empty --path provided to commands [#5709]
  • Fix composer test after branch rename [#5708]
  • PHP 8.2: explicitly declare CompositeCommand::$longdesc to fix deprecation warning [#5707]
  • Detect Object Cache Pro [#5698]
  • Ensure WP_CLI_ROOT is defined before accessing it [#5697]
  • Fix proc_open_compat util on Windows [#5689]
  • Move WP_CLI_CONFIG_SPEC_FILTER_CALLBACK test to flags.feature [#5687]

wp-cli/handbook

  • Replacement added for the && [#444]
  • Add HostRiver to list of hosting companies [#442]
  • Add DataPerk to list of hosting companies [#441]
  • Include a couple more helpful Behat calls [#440]
  • Add maintainer expectations to the Governance page [#439]
  • Fill out page for wp profile [#437]
  • Link to ‘Shell Friends’ from the Philosophy doc [#435]
  • Add example for how to discard 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. row from CSV [#434]
  • Uppercase for ‘Committers Credo’ title [#433]
  • Update hosting-companies.md [#432]
  • Move the Doctor docs under ‘Guides’ [#431]
  • Add secondary wp doctor content and a landing page [#430]
  • Add two primary wp doctor docs to the handbook [#429]
  • Fix phar download url [#428]
  • Adding new 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 to handbook [#427]
  • Corrected local jumplinks [#426]
  • Running commands remotely: On restrictive webhost [#425]
  • Remove BackupBuddy [#423]
  • Remove non existing tool [#421]

wp-cli/wp-cli.github.com

  • Update index.md [#428]
  • Add “WP-CLI” heading [#427]
  • Update German readme [#426]
  • Update ja/index.md [#424]
  • Current stable release is 2.6.0 [#423]

wp-cli/cache-command

  • Warn when wp transient list is used with external object cache [#82]
  • Give a warning when flushing cache on multisite with --url=<url> [#86]
  • Add wp cache flush-group for flushing a cache group [#85]
  • Add wp cache supports <feature> command [#84]

wp-cli/checksum-command

  • Fix failing checksum tests due to timeout on WP_VERSION=trunk [#99]
  • Pass false instead of null to fix PHP 8.1 warning [#103]
  • Add --include-root parameter to also verify root directory [#102]
  • Verify a specific plugin version [#108]
  • Log warning if WpOrgApi::get_plugin_checksums() fails [#105]

wp-cli/core-command

  • Fix failing tests by switching to WordPress 4.1 as minor update test [#223]
  • Fix failing test by setting WP_AUTO_UPDATE_CORE=false [#222]
  • Fix deprecation notices in PHP 8.1 [#220]
  • Resolve tests failures from WordPress 6.2 [#229]
  • Leave wp-content/plugins and wp-content/themes directories when using --skip-content [#230]
  • Check more files to determine if WordPress is present or not [#233]
  • Add a --skip-config flag to wp core multisite-convert [#231]
  • Fix tests for Requests v2 support [#235]

wp-cli/cron-command

  • Use wp_get_ready_cron_jobs() for --due-now to apply core 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. [#89]
  • Warn instead of fatal when invalid cron event is detected [#93]
  • Add --exclude=<hooks> argument to wp cron event run [#97]

wp-cli/db-command

  • Fix retrieval of get_post_table_characterset [#231]

wp-cli/entity-command

  • Add example for deleting multiple post IDs [#387]
  • Add --field=url support for posts, comments, and terms [#383]
  • Add wp option get-autoload and wp option set-autoload [#382]
  • Replace empty namespace autoloader with classmap [#390]
  • Do not mark main site as spam when using wp user spam [#393]
  • Clarify url field in wp site list docs [#401]
  • Change new passwords to 24 characters in a few places [#399]
  • Add examples and update the documentation to the wp post term [#398]
  • Add --show-password flag to user reset-password [#394]
  • Warn when an invalid role is provided for wp user update [#406]

wp-cli/eval-command

  • Add --use-include flag [#64]

wp-cli/export-command

  • Update post__in documentation to mention space-separated [#104]
  • Update tests using WordPress Importer to require WordPress 5.2 [#102]
  • Add --include_once=<section> parameter for before_posts data in multi-file exports [#100]
  • Exclude unnecessary author IDs from oembed_cache posts in export [#99]

wp-cli/extension-command

  • Fix failing tests [#347]
  • Fix failing PHP 5.6 tests by requiring WP 5.2 [#342]
  • Delete plugin translation files when plugin is uninstalled [#339]
  • Don’t report an error when 5 out of 5 plugins were updated [#338]
  • Remove extra space [#335]
  • Add format option to wp plugin|theme auto-updates status [#351]
  • Include optional 'auto_updates' field in plugin and theme lists [#350]
  • Avoid deleting theme if the specified version cannot be found [#349]
  • Ensure a stable version is used when --minor or --patch specified [#355]
  • Fix fatal error in invalid plugin update offer [#354]
  • Fix PHP 8.2 ‘Creation of dynamic property’ warning [#360]

wp-cli/i18n-command

  • PHP 8.2: fix ${var} string interpolation deprecation warning [#346]
  • Add more standard ‘excludes’ values [#351]
  • Fix unclosed quote [#350]
  • CI: Ensure PHPUnit workflow actually runs [#360]
  • Fix deprecated partially-supported callables for PHP 8.2 [#359]
  • update-po: Check for destination [#356]

wp-cli/import-command

  • Fix failing tests with @require-wp-5.2 [#79]
  • Document use of the IMPORT_DEBUG constant [#82]

wp-cli/language-command

  • Switch to twentytwentyone to fix failing tests [#118]

wp-cli/media-command

  • Fx typo in import command longdesc [#172]
  • Travis is no longer in use, so fine to remove config files [#171]
  • Avoid deleting 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. for other sizes when running wp media regenerate with --image_size [#170]
  • Support --post_name= when importing media [#166]
  • Correct argument for fix-orientation subcommand [#165]
  • Remove tests around square image thumbnail regeneration [#177]

wp-cli/package-command

  • Fix failing package-command tests [#164]
  • Mark the test with yoast/wp-cli-faker as @broken [#170]
  • Adapt bundled certificate access [#174]

wp-cli/php-cli-tools

  • Add annotations to remove deprecated warning message on PHP 8.1[#152]
  • Restore PHPUnit test runs [#155]
  • Fix PHP Deprecated: Creation of dynamic property [#158]

wp-cli/rewrite-command

  • Support full URLs for wp rewrite list --match=<url> [#59]

wp-cli/role-command

  • Add explanation of what happens for wp role reset [#58]
  • Fix fatal error when resetting an already deleted role [#57]
  • Fix support for --grant=false argument [#59]

wp-cli/scaffold-command

  • Update the 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 be the repository owner. https://github.com/ URL for db.php [#317]
  • Add phpcompatibility-wp coding standards to Gitlab template [#315]
  • Use platform-agnostic mysql-client packages in Gitlab CI [#314]
  • Added vendor to the generated .gitignore which the scaffold creates [#279]

wp-cli/search-replace-command

  • Make is_text_col‘s search case-insensitive for sqlite support [#177]
  • Fix regex invalid delimiter test for PHP 8.2 [#181]
  • Address long-running queries and OOM contributor in PHP replacement [#180]

wp-cli/wp-config-transformer

  • Update status badge in README.md [#40]
  • Avoid test failure with assertNotSame instead of assertNotEquals [#41]
  • Fix incorrect return type in docblock for get_value() [#43]

Contributors

@aerogus, @agrullon95, @akirk, @benjaminprojas, @BhargavBhandari90, @brandonpayton, @bukowa, @cliffordp, @connerbw, @danielbachhuber, @dd32, @dlind1, @drzraf, @dsXLII, @elenachavdarova, @endriu84, @gagan0123, @gedex, @gitlost, @greatislander, @hbhalodia, @herregroen, @janw-me, @jenkoian, @joeldcanfield, @josedumas, @jrfnl, @kozer, @l3ku, @lipemat, @localheinz, @matzeeable, @michaelzangl, @mpkelly, @mrsdizzie, @mweimerskirch, @oandregal, @ocean90, @ouikhuan, @paulschreiber, @pbiron, @pdaalder, @pmbaldha, @ponsfrilus, @pwtyler, @r-a-y, @Rahmon, @rodrigoprimo, @rutviksavsani, @Saggre, @schlessera, @semseysandor, @SH4LIN, @shendy-a8c, @siliconforks, @srtfisher, @SteenSchutt, @strarsis, @stuartlangridge, @swissspidy, @tecking, @Tug, @tyrann0us, @wojsmol, @wojtekn, @yousan

#release, #v2-8-0

WP-CLI v2.8.0 release date

The v2.8.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 Wednesday, May 3rd 2023.

Amongst others a multitude of bug fixes and some new features, we’re also expecting this release to fix all known 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/preface.php. 8.2 issues within WP-CLI itself.

The release candidateRelease Candidate A beta version of software with the potential to be a final product, which is ready to release unless significant bugs emerge. for this release will already be available sometime during the week prior, to allow for early testing. We will announce the availability of that release candidate in the #hosting-community channel to allow hosters to do early smoke testing.

#release, #v2-8-0

WP-CLI v2.7.1 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/ is available as of today: WP-CLI v2.7.1. For this release, we had 4 contributors collaborate to get 12 pull requests merged. 

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

This is a patch release to fix a few regressions that were introduced with release v2.7.0.

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 an allow-plugins rule to Composer

wp-cli/core-command

  • Avoid deleting TinyMCE themes/plugins by using more precise check [#215]

wp-cli/db-command

  • Fix 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/preface.php. 8.1 fatal error with --orderby=size and --size_format=mb [#230]

wp-cli/extension-command

  • Avoid throwing error when excluding missing 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 [#332]

wp-cli/search-replace-command

  • Use empty string default value for flags to safeguard the use of explode() [#169]

Contributors

@cjhaas, @danielbachhuber, @schlessera, @wojsmol

#release, #v2-7-1

WP-CLI v2.7.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/ is available as of today: WP-CLI v2.7.0. For this release, we had 48 contributors collaborate to get 195 pull requests merged. 🎉

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

This is a small release with the main purpose of getting some much needed bug fixes into a stable version. Nevertheless, we also have a few new features that I’ll want to highlight. As always, you can also skip directly to the detailed changelog if you prefer.

Support for docker-compose run

The --ssh flag and ssh configuration key (and along with them the remote execution aliases) have learned a new scheme: docker-compose-run:.

The docker: and docker-compose: schemes for the ssh option are useful, but they only work when the target container is already running and therefore supports running a shell command via docker[-compose] exec.

Some environments, for example the wordpress-develop local development environment, run WP-CLI via a container that only starts when needed and therefore requires the use of run instead of exec.

With the support of the new docker-compose-run scheme in place you could put the following config into the root of any project that uses wordpressdevelop/cli and then simply use wp <cmd> instead of npm run env:cli -- <cmd> or docker-compose run cli -- <cmd>.

# wp-cli.yml
ssh: docker-compose-run:cli

Customizable global parameters

It was not previously possible to extend the list of parameters without modifying the WP-CLI source files. While we are still considering different options for making the global parameters extensibleExtensible This is the ability to add additional functionality to the code. Plugins extend the WordPress core software. via a clean 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., we already needed a short-term solution for a specific use case.

Because of this, we now introduced a set of small changes that allow the global parameters to be adapted on a “platform level”. This means that, for now, you can change the global parameters, but only if you control the environment in which WP-CLI is being executed in. This functionality works through the combination of the following changes:

  • A new constant WP_CLI_CONFIG_SPEC_FILTER_CALLBACK is being checked to 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. the array that the config-spec.php file has provided.
  • A new environment variable WP_CLI_EARLY_REQUIRE is checked to allow for the environment to provide extra 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/preface.php. bootstrapping logic.

You can use both of these to let the WP_CLI_EARLY_REQUIRE load a PHP file that defines a new filter callback and then sets the WP_CLI_CONFIG_SPEC_FILTER_CALLBACK to point to that filter.

This test snippet shows an example of how these two mechanisms can be used in tandem:

Download WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. files without extracting them

Previously, you could already use the core download command not only to retrieve the set of files from the WordPress central servers. But we did not have a way to solely download a ZIP archive of WordPress Core instead.

Now you can do so via the --extract flag. This is on by default to keep with the current behavior, but you can now switch extraction off by adding the --no-extract flag.

Why would you do that, if it is a single file download you could also trigger via wget or curl? Well, for one, it uses the 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. stack of WordPress/WP-CLI to do the download. And what’s more, it allows you to use the smart WP-CLI flags like --version to automatically retrieve the file from the right URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org.

Directly install a specific locale

Previously, when you wanted to install a locale of WordPress Core other than the default en_US, you had to first run a wp core install, and then switch the locale in a second step.

Now, WP-CLI allows you to select a specific locale right away via core install‘s new --locale flag.

Ordering of the db size results

To quickly see what the biggest tables in your installation are, you can now make use of the new --order and --orderby flags. The most useful example would be to use --orderby=size --order=desc to get the largest tables first.

Clean duplicate 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. values

Due to limitations of the WordPress database schema, the WordPress importer can end up inadvertently creating duplicate post meta entries if the import is run multiple times.

WP-CLI has now learned a new command to remove duplicate post meta values for a given meta key.

# Delete duplicate post meta.
wp post meta clean-duplicates 1234 enclosure
Success: Cleaned up duplicate 'enclosure' meta values.

Exclude select plugins on certain 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 commands

The plugin commands activate, deactivate, delete and uninstall now accept an additional --exclude flag if you use their --all flag.

The --exclude accepts a comma-separated list of plugin slugs, and allows you to do operations in the vein of “deactivate all plugins except for these few ones”.

# Deactivate all plugins with exclusion
$ wp plugin deactivate --all --exclude=hello,wordpress-seo
Plugin 'contact-form-7' deactivated.
Plugin 'ninja-forms' deactivated.
Success: Deactivated 2 of 2 plugins.

Multiple changes to the i18n support

In our ongoing effort to further internationalization support within 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/, we have made yet another around of i18n changes and additions.

Most of the changes deal with changes to block.json and theme.json, in order to support all the latest fields and mechanisms.

Also, there is now a new update-po command. Up until now, if you added a new translation to one of your plugins, you could update the messages.pot file with make-pot, but you’d have to update existing po files with the new translation by hand. With the new i18n update-po (which is a WP-CLI alternative to msgmerge), you get around this without requiring manual edits.

And finally, i18n now supports PHP Blade templates as an additional input format to parse for translations.

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 an allow-plugins rule to Composer

wp-cli/wp-cli-bundle

  • Add eftect/bladeone to PHAR for i18n-command [#417]

wp-cli/wp-cli

  • Add support for docker-compose run to the --ssh option [#5637]
  • Internalize global_terms_enabled() [#5684]
  • Add cache directory path to cli info output [#5681]
  • Always return PHP_BINARY when using a PHAR bundle [#5672]
  • Load config-spec.php in a “filterable” way [#5664]
  • Use different action for admin context logic [#5663]
  • Require v3.1.6 of wp-cli/wp-cli-tests [#5659]
  • Address some PHP 8.1 deprecation notices [#5658]
  • Document return type for WP_CLI::halt() as never [#5651]
  • Fix skip theme tests [#5646]
  • Add missing $upgrade argument to enable_maintenance_mode filter [#5630]
  • Handle optional option values in SynopsisParser::render() [#5618]
  • Add missing relative namespace [#5616]

wp-cli/handbook

  • Add additional instructions to override the DB test credentials. [#410]

wp-cli/cache-command

  • Make transients deletion test more robust [#74]

wp-cli/config-command

  • Prevent WP_DEBUG already defined when provided via --extra-php [#144]

wp-cli/core-command

  • Add --extract flag to core download [#204]
  • Update the link in the docblock of core multisite-convert command [#201]
  • Add --locale parameter [#133]
  • Remove only themes/plugins folders on --skip-content [#212]

wp-cli/db-command

  • Fix broken tests due to DB connection failure error message change [#224]
  • Stop reordering most 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/. arguments [#221]
  • Add support for --order, --orderby flags in db size command [#226]

wp-cli/entity-command

  • Use https in post generate example [#355]
  • Support filtering for users without a role with --role=none [#360]
  • Sync user-contributed example to user delete [#358]
  • Fix 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. formatting in feature file [#368]
  • Add post meta clean-duplicates <id> <key> command [#366]
  • Document primary_blog meta key for users [#365]
  • Allow user_url to be set with user create [#372]
  • Show error when parameter is missing in option patch [#371]
  • Use current_time() for setting the default value for user_registered in user create [#378]
  • Add examples for option patch command [#375]

wp-cli/export-command

  • Fix test for attachment serialization [#96]

wp-cli/extension-command

  • Add optional --exclude=<name> argument for multiple plugin commands [#321]
  • Fix broken Behat tests [#318]
  • Add title/description for mu-plugins [#305]
  • Avoid deleting parent of active theme unless using --force [#324]
  • Exit with 0 when checked theme is active parent theme [#327]

wp-cli/i18n-command

  • Extract pattern metadata (title & description) [#312]
  • Look for theme.json files in the styles directory of a theme [#311]
  • Translate title field from theme.json [#306]
  • Add support for PHP-Blade files [#304]
  • Fix include logic where include path is subdirectory of excluded path [#302]
  • Add missing docs for make-mo command [#315]
  • Add update-po command [#316]
  • Improve warnings for strings with different comments [#318]
  • Extract some shared code into FileDataExtractor [#321]
  • Update and combine theme.json and block.json extractors [#319]
  • Improve theme patterns and styles lookup [#320]
  • Use preg_match instead of mb_ereg [#317]
  • Prefix JSON files with text domain if needed [#313]

wp-cli/import-command

  • Bail with status code if file does not exist [#75]

wp-cli/language-command

  • Add warning for nonexistent plugins [#115]

wp-cli/media-command

  • Fix read error detection in EXIF discovery [#162]

wp-cli/package-command

  • Adapt test for changed Composer output [#151]

wp-cli/php-cli-tools

  • Fix ${var} string interpolation deprecation [#148]
  • Fix logic to check for TTY [#146]

wp-cli/scaffold-command

  • Deprecate scaffold block in favor of @wordpress/create-block [#311]
  • Add 'testsuite' name in phpunit.xml.dist [#310]
  • Add backup files ending with tilde to default .distignore [#273]

wp-cli/search-replace-command

  • Restore blogdescription to fix test [#171]
  • Add further suppression of warnings and notices [#172]

wp-cli/server-command

  • Restore blogdescription to fix test [#75]

Contributors

@2ndkauboy, @alexstine, @Ayesh, @BhargavBhandari90, @borkweb, @brandonpayton, @connerbw, @dan-m-joh, @danielbachhuber, @dd32, @dlind1, @drzraf, @Flimm, @gedex, @GeoJunkie, @github-actions[bot], @gitlost, @greatislander, @herregroen, @janw-me, @jenkoian, @johnbillion, @jorgeatorres, @jrfnl, @kjohnson, @l3ku, @localheinz, @lucatume, @matzeeable, @michaelzangl, @oandregal, @ocean90, @pbiron, @pdaalder, @pmbaldha, @ponsfrilus, @schlessera, @shendy-a8c, @Sidsector9, @siliconforks, @spacedmonkey, @strarsis, @swissspidy, @Tug, @tyrann0us, @versusbassz, @wojsmol, @xyulex, @yousan

#release, #v2-7-0

WP-CLI v2.6.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/ is available as of today: WP-CLI v2.6.0. For this release, we had 57 contributors collaborate to get 311 pull requests merged. 🎉

The pandemic is still controlling our daily lives, and as a side-effect we still notice a significant reduction in contributors to WP-CLI, probably due to the lack of in-person contributor days.

As always, big thanks to the WP-CLI sponsors that make the continued maintenance possible – even with a reduced number of contributors. ❤️

Apart from the numerous bug fixes that were included in this release, we also managed to snuggle in a few new features that add to the power or convenience of your CLICLI Command Line Interface. Terminal (Bash) in Mac, Command Prompt in Windows, or WP-CLI for WordPress. experience, so I want to spend a few paragraphs going over some of the noteworthy changes. As always, you can also skip directly to the detailed changelog if you prefer.

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/preface.php. 8.1 Support

WP-CLI now officially supports PHP 8.1. All commands are being extensively tested against PHP 8 and the actual development is currently being done on PHP 8.1 as well.

However, keep in mind that PHP 8.1 support is not fully there for WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., and especially for a large part of plugins and themes. Due to the nature of the changes that PHP 8.1 brings about, it is very easy to break perfectly compatible WordPress Core or WP-CLI via the actions/filters system. Keep this in mind when trying to diagnose PHP 8.1 compatibility issues and trying to deduce where the erroneous code is to be found.

Tabular data showing a timeline with supported PHP releases, with only 8.0 and 8.1 currently in active support.

For those of you who are not closely following the PHP release cycles, please be aware that only PHP 8.0 and 8.1 are currently actively supported versions. WP-CLI sticks with the WordPress Core PHP support policy (+ 1 year), which means we’re still spending huge amounts of efforts to keep everything running all the way down to PHP 5.6 at the moment.

If you want to help the maintainers in their work, please ensure that all your sites run on the latest PHP versions, and nag your hosting providers to move everything over to the latest and greatest. WordPress will only bump the minimum version when the number of active sites on PHP 5.6 has dropped to an insignificant amount.

New commands for managing application passwords

The following commands were added to allow CLI users to create and manage WordPress application passwords:

  • wp user application-password list
  • wp user application-password get
  • wp user application-password exists
  • wp user application-password update
  • wp user application-password record-usage
  • wp user application-password create
  • wp user application-password delete
WP-CLI examples of creating a new application password and then listing all existing application passwords for that same user.

Although you could technically already work with application passwords by directly controlling the WordPress user-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. table, this now provides a clean 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. that abstracts away the technical implementation. See the Application Passwords: Integration Guide to find out more about how to use them.

New global flag: --context

A new global flag --context=<context> was added which allows users to select the WordPress context in which WP-CLI is supposed to execute its command(s).

One of the main goals is to allow WP-CLI to run updates on premium plugins and themes without requiring any special setup. From our initial testing, this allows a large range of popular premium extensions to just work™️ with WP-CLI in terms of their update procedures.

Possible values for this flag with this initial release:

  • cli: The context which has been the default before introduction of this flag. This is something in-between a frontend and an admin request, to get around some of the quirks of WordPress when running on the console.
  • admin: A context that simulates running a command as if it would be executed in the administration backend. This is meant to be used to get around issues with plugins that limit functionality behind an is_admin() check.
  • auto: Switches between cli and admin depending on which command is being used. For this initial release, all wp plugin * and wp theme * commands will use admin, while all other commands will use cli.
  • frontend: [WIP] This does nothing yet.

Roadmap: By default, the --context flag will be set to cli with this initial release (v2.6.0). With WP-CLI v2.7.0, the default will change to auto. This gradual deployment will allow hosters and site owners to run tests on v2.6.0 by manually setting the context before the default behavior is changed.

If you want to use the future default of --context=auto right away in your present operations, you can do so by adding the necessary context: auto line to your global wp-cli.yml configuration file. Feel free to check the documentation on WP-CLI configuration files if this is new to you.

We also have a new hook to support this new global flag: before_registering_contexts. This hook behaves like 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. with one argument: array<string, Context> $contexts. When hooking into this hook, the callback should return (a potentially modified) $contexts value. This can be used to remove or override bundled contexts or add new ones.

To make this work, the hook functionality in WP-CLI (provided via WP_CLI::do_hook()) was modified to return the first argument if arguments were provided.

Thanks to Cloudways for the special support and testing of this new flag with the goal of solving the “premium updates problem” for everyone.

Configurable WP-CLI cache settings

The WP-CLI file cache can now be configured via the following environment variables:

  • WP_CLI_CACHE_DIR – Directory in which to store the cached files. Default value: "$home/.wp-cli/cache".
  • WP_CLI_CACHE_EXPIRY – Time after which cached files are automatically purged, in seconds. Default value: 15552000 (6 months).
  • WP_CLI_CACHE_MAX_SIZE – Total size of the file cache after which older files are purged, in bytes. Default value: 314572800 (300 MB).

This not only allows you to fine-tune the WP-CLI cache behavior for the best balance between available storage and bandwidth usage, it could also be used to share cache storage between installations/users (beware the security implications, though!).

Use custom names/locations for the wp-config.php file

The different config * commands now accept a new flag --config-file=<filepath> that allow you point the different manipulations towards a custom location, that might not even fully adhere to conventions for the WordPress wp-config.php file.

This allows you for example to use the config set command for a configuration file outside of the WordPress document root (and parent folder).

Keep in mind that you’re on your own when it comes to making WordPress understand the structure and bootstrap correctly!

Generate a dotenv file from your existing wp-config.php file

For all the 12-factor app fans out there, WP-CLI has learnt a new format for its config list command: --format=dotenv. This will take the existing configuration key/value pairs in your wp-config.php file and render them in a format that you can use in a .env file.

WP-CLI example of list the contents of the wp-config.php file into a file in dotenv format and then showing the result.

Combine with the previously mentioned --config-file to extract the dotenv file from an arbitrary location, even without a WordPress installation present.

Allow 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/theme enumeration without forcing an update check

Previously, when you run plugin list or theme list, WP-CLI would automatically run a check in the background to see if updates are available. This is slow and expensive to do, and might not always be what is needed, especially in scripting scenarios.

This automatic check for updates can now be disabled for these two commands with the --skip-update-check flag. This can drastically speed up some scripts and make them more reliable.

New flag --strict for adapting the filtering of taxonomies by post type

When retrieving taxonomies for a given post type, the old default behavior of WordPress (through the use of get_taxonomies()) is to only show those taxonomies that have as a sole associated post type the requested one. Taxonomies that have multiple associated post types, including the requested one, are not returned.

WordPress had added a newer mechanism via get_object_taxonomies() that would return all taxonomies that are in some way associated with the requested post type, even if other post types are associated as well.

WP-CLI now has a new --strict flag for the taxonomy list command that defines whether the strict filtering (the old default) should be used, or the more sensible inclusive approach should be used via --no-strict (or --strict=false).

We’ve opted to make this new, more sensible approach (i.e. --no-strict) the new default, so be mindful of that if you’re using taxonomy list in a script somewhere.

Another round of improvements to the i18n * commands

As with all of the recent releases, the i18n * commands have received yet another round of overall improvements to keep in sync with the localisation requirements of WordPress Core.

From new flags like --subtract-and-merge, --update-mo-files & --location and multiple improvements to the way 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/. syntax is parsed all the way up to the support for the new theme.json format, all your localization needs should be accounted for (at least for now).

Make your to check out the detailed logs to find out more and play around with the new functionality when you get the chance!

With super admin permissions come super admin consequences!

WP-CLI now mirrors the behavior of WordPress core and triggers various 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. when you grant or revoke the super admin status to users.

The following actions are being triggered now but the super-admin add & super-admin remove commands:

  • grant_super_admin (before changes, always executed)
  • granted_super_admin (after changes, executed only on success)
  • revoke_super_admin (before changes, always executed)
  • revoked_super_admin (after changes, executed only on success)

Changes to the default branches

In order to make the language used in the code and documentation of WP-CLI more inclusive, work has started to change the name of default branch across all repositories. From now on, the default branch name across the WP-CLI 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 be the repository owner. https://github.com/ organization is main.

This change is currently a work in progress, as it unfortunately causes open pull requests to be automatically closed and often become unsalvageable. The current progress of this effort can be monitored here: wp-cli/wp-cli#5598.

Keep this in mind when you want to check out the latest development state of a repository or contribute by creating a PR!

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 an allow-plugins rule to Composer

wp-cli/wp-cli-bundle

  • Disable deployments on forks [#389]
  • DeployDeploy Launching code from a local development environment to the production web server, so that it's available to visitors. from main branch [#385]
  • Revert usage of Mustache fork [#373]
  • Use latest branch for Roave security advisories [#357]
  • Add DEB build workflow [#345]
  • Add RPM build workflow [#344]
  • Switch to dev-master for wp-cli framework [#333]

wp-cli/wp-cli

  • Adapt VERSION from 2.5.1-alpha to 2.6.0-alpha [#5605]
  • Fix Composer stack tests [#5599]
  • Detect and ignore BOMs [#5597]
  • Check github.repository_owner in automerge workflow [#5591]
  • Revert addition of the Mustache PHP 8.1 workaround and update dependency [#5590]
  • Use Mustache work-around for PHP 8.1 compat [#5588]
  • Use fork on schlessera for Mustache PHP 8.1 fix [#5587]
  • Re-add subcommands on all composite commands that are overwritten [#5584]
  • Fix default mysqli error reporting mode for PHP 8.1+ [#5582]
  • Add --context flag [#5581]
  • Make cache size and expiry configurable via environment variables [#5576]
  • Updated default branch for roave/security-advisories [#5575]
  • Fix wrong variable name used in argument parsing [#5564]
  • Fix regression that broke extending existing commands [#5563]
  • Add a SECURITY.md file [#5562]
  • Update credits [#5556]
  • Pass in arguments to before_run_command hook [#5554]
  • Change “Fake Site” site name to “WordPress” in core multisite-install command [#5552]
  • Add missing docblocks [#5551]
  • Make logger accessible and add colorization control to Quiet logger [#5549]
  • Fix OOM issues when exporting to STDOUT [#5546]
  • Allow WP_DEBUG_LOG to override the debug.log location [#5511]

wp-cli/handbook

  • Document the exec global parameter [#397]
  • Provide example of optional positional arguments [#390]
  • Added create table statement. [#389]

wp-cli/wp-cli.github.com

  • Update zh-cn translation file [#422]
  • Update build status badge [#416]
  • Fix quick links anchors in German translation [#415]

wp-cli/cache-command

  • Add PHP 8.1 support [#72]

wp-cli/checksum-command

  • Add PHP 8.1 support [#89]

wp-cli/config-command

  • Add PHP 8.1 support [#135]
  • Document special EOF anchor [#136]
  • Add --config-file argument to process custom configuration files [#104]
  • Add dotenv format option to config get command [#102]
  • Escape values to avoid breaking them within single quotes [#95]
  • Update the wp-config.php template [#139]

wp-cli/core-command

  • Update download_package() function signature [#197]
  • Support case-insensitive filesystems when pruning files after update [#196]
  • Do not exit on error but pass on error [#193]

wp-cli/cron-command

  • Add PHP 8.1 support [#77]
  • Adapt feature test to use 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. with example.com [#78]
  • Promote a non-200 response from the cron spawn test to an error [#66]

wp-cli/db-command

  • Refactor --defaults flag handling [#205]
  • Adapt mysqldump message string to check for in tests [#201]
  • Set 'utf8mb4' when exporting without '--default-character-set' option [#199]
  • Add decimal numbers to wp db size [#163]
  • Add --defaults flag to remaining commands [#206]
  • Add PHP 8.1 support [#214]
  • Fix table existence check in db columns [#210]
  • Adapt feature test to use HTTPS with example.com [#216]
  • Fix “WP_DEBUG already defined” test failure [#220]

wp-cli/embed-command

  • Add PHP 8.1 support [#65]

wp-cli/entity-command

  • Support PHP 8.1 [#331]
  • Update example input to reflect example output [#326]
  • Document default post type filtering for post list command [#321]
  • Correct the home URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org when listing sites [#312]
  • Adapt http => https URLs [#339]
  • Add application password commands [#330]
  • Better error message when trying to delete super admin [#304]
  • Recalculate menu order on insertion or deletion [#275]
  • Add strict/no-strict mode for 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. list [#256]

wp-cli/eval-command

  • Add PHP 8.1 support [#60]

wp-cli/export-command

  • Ensure post attachment meta is exported correctly [#89]
  • Only add needed user when filtering by --author [#88]
  • Adapt tests [#87]
  • Fix categoryCategory The 'category' taxonomy lets you group posts / content together that share a common bond. Categories are pre-defined and broad ranging., tag and term names missing in export [#86]
  • Add the_title_export filter and cdata for item title to export [#77]
  • Add PHP 8.1 support [#93]
  • Adapt feature test to use HTTPS with example.com [#94]

wp-cli/extension-command

  • Fix test issues [#293]
  • Fix incorrect examples [#290]
  • Check for WP_Error on bulk updates [#294]
  • Add support for PHP 8.1 [#306]
  • Replace one-time-login with a sample plugin in the tests [#302]
  • Add --skip-update-check flag to plugin list and theme list commands [#300]
  • Ensure bundled themes don’t interfere with update tests [#311]

wp-cli/i18n-command

  • Fix tests [#268]
  • Add subtract-and-merge flag [#267]
  • Use more inclusive language in argument description [#266]
  • Add new --update-mo-files flag to make-json [#265]
  • Add new --location flag to omit source code references [#264]
  • Add ext-mbstring to list of suggested dependencies [#263]
  • Prevent adding JS comments to multiple strings [#261]
  • Fix string extraction when using template literals [#260]
  • Update version constraint for mck89/peast [#259]
  • Fix plural extraction in JS [#258]
  • Remove now unneeded workaround in JS scanner [#256]
  • Extract strings for translation from theme.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. [#254]
  • Fix string extraction from block.json [#253]
  • Add support to IterableCodeExtractor for symlinks. [#249]
  • Add PHP 8.1 support [#293]
  • Add new field to translate in theme.json [#292]
  • Fix JS string extraction with unsupported argument type [#296]

wp-cli/import-command

  • Add PHP 8.1 support [#71]

wp-cli/language-command

  • Add PHP 8.1 support [#111]

wp-cli/maintenance-mode-command

  • Add PHP 8.1 support [#20]

wp-cli/media-command

  • Add PHP 8.1 support [#153]
  • Add missing intermediate_image_sizes_advanced filter argument for WP 5.3+ [#150]

wp-cli/package-command

  • Only allow secure Composer versions [#144]
  • Support PHP 8.1 [#143]
  • Fetch default branch for GitHub packages [#146]
  • Support common default development branches [#148]

wp-cli/php-cli-tools

  • Update TTY checks [#145]

wp-cli/rewrite-command

  • Add PHP 8.1 support [#54]

wp-cli/role-command

  • Add PHP 8.1 support [#49]

wp-cli/scaffold-command

  • Fix testing on WordPress trunk version [#297]
  • Ignore .github directory in .distignore [#295]
  • Allow for diverging PHPUnit version specifics in tests [#304]
  • Add PHP 8.1 support [#301]

wp-cli/search-replace-command

  • Fix offset handling when doing chunked replacements [#162]
  • Add strict comparisons for color tests [#163]
  • Add PHP 8.1 support [#166]
  • Adapt feature test to use HTTPS with example.com [#167]

wp-cli/server-command

  • Add PHP 8.1 support [#72]

wp-cli/shell-command

  • Add PHP 8.1 support [#58]

wp-cli/super-admin-command

  • Add PHP 8.1 support [#48]
  • Trigger core actions when granting or revoking super-admin permissions [#20]

wp-cli/widget-command

  • Append new widgets to the bottom of a 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. [#52]
  • Decouple tests from default theme widgets [#51]
  • Add PHP 8.1 support [#53]

wp-cli/wp-config-transformer

  • Adapt tests for polyfilled test case [#36]

Contributors

@bgturner, @BhargavBhandari90, @CodeProKid, @connerbw, @dd32, @dh-programacion, @dlind1, @drzraf, @felixarntz, @gedex, @gitlost, @grappler, @greatislander, @herregroen, @imadphp, @janw-me, @jenkoian, @jmdodd, @johnbillion, @johnjago, @jrfnl, @kapilpaul, @KarlAustin, @l3ku, @localheinz, @matzeeable, @mbuxsoomro, @michaelzangl, @mircobabini, @mn7zDev, @mrkaluzny, @nickdaugherty, @Nikschavan, @oandregal, @ocean90, @pbiron, @pdaalder, @petruchek, @pmbaldha, @ponsfrilus, @ryotsun, @saz, @schlessera, @seatonjiang, @siliconforks, @skeltoac, @stefanpejcic, @stodorovic, @swissspidy, @tammelin, @thomasplevy, @Tug, @tyrann0us, @UVLabs, @wojsmol, @wpamitkumar, @yousan

#release, #v2-6-0