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. http://php.net/manual/en/intro-whatis.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

Twenty-One Merged PRs for WP-CLI Hack Day 2023

The second ever 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/ Hack Day is now complete! It was a ton of fun to collaborate with folks all over the world — without the long airplane flight 😊

Many thanks to everyone that participated! 🙏 @antoniosejas, @janwoostendorp, @johnbillion, @kau-boy, @pekkakortelainen, @schlessera, @shawnhooper, @skithund, @swissspidy, @thelovekesh, @wojtekn, @xknown

We had twenty-one pull requests that were merged during the event:

  1. Add missing documentation for $data attribute in http_request()
  2. Add docker compose command support in SSH command generation
  3. Site_Command: Do not assume get_super_admins() has the 0 array index
  4. Improve SQLite compatibility
  5. Fix super admin test on SQLite
  6. Move SQLite plugin to mu-plugins
  7. Further improve SQLite testing
  8. Re-enable some tests for SQLite
  9. Add update_version to the default fields for plugin and theme commands
  10. Add missing required arguments when using --prompt
  11. Fix SQLite mu-plugins usage with composer installs
  12. Remove use of @require-wp-latest
  13. Update PHPCS workflow to add full report in CI logs
  14. Add examples on listing unapproved, spam and trash comments
  15. Replace DOS line endings with LF
  16. Remove the pre-commit hook installation and its corresponding command
  17. Remove inexistent post-install-cmd
  18. Add edge case handling checksum verification of Hello Dolly
  19. Support for adding and removing of multiple user roles
  20. Add --force-check flag to check-update command
  21. Add verbosity level and quiet flag in ssh command based on debug flag

In addition to those, we had an additional four pull requests that were submitted during the event that aren’t yet merged:

  1. Add support for MySQL socket connection
  2. Dist Archive: ask user confirmation if file exists before overwriting it
  3. Enable formatter for search command
  4. Check if Installed Plugins Are No Longer in the Plugin Directory

It was really great to spend time with folks on Zoom, too. ❤️ We spent several hours triaging the backlog, talking through various issues, and being thankful we weren’t frantically fixing a curl compatibility issue.

See you at the next WP-CLI Hack Day!

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. http://php.net/manual/en/intro-whatis.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 WPCSWPCS The collection of PHP_CodeSniffer rules (sniffs) used to format and validate PHP code developed for WordPress according to the WordPress Coding Standards. May also be an acronym referring to the Accessibility, PHP, JavaScript, CSS, HTML, etc. coding standards as published in the WordPress Coding Standards Handbook. 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

Save the date! WP-CLI Hack Day on Friday, November 10th

We’re happy to announce the second ever 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/ Hack Day! 🤓🎈

On 🗓 Friday, 10th November 2023 we’ll officially kick off the WP-CLI Hack Day at 🕗 Friday, 10th November 2023, 0800 UTC. From that point on, @schlessera, @swissspidy, and I will be generally available in Slack #cli channel and on the GitHub wp-cli organization to onboard new contributors, help people pick issues to work on and remove hurdles that keep them from finishing their PRs. This will continue more or less without interruption during the entire event.

From 🕓 Friday, 10th November 2023, 09:00 CET to Friday, 10th November 2023, 10:00 CET and then again between 🕓 Friday, 10th November 2023,1500 UTC and Friday, 10th November 2023,1600 UTC we’ll have an open video chat that everyone can join, where we can discuss remaining issues live and chat about the progress we’ve made. This extended video chat session will then conclude the event. Shortly after 🕕 Friday, 10th November 2023, 2200 UTC, I will post a make/cli blog post about the progress we were able to make during the allotted time frame.

The 🎯 goal for this WP-CLI Hack Day is both simple and ambitious:

Finish the day with 2️⃣0️⃣ pull requests that have been merged during the event ❗️

Everyone is welcome to participate! This event is supposed to be fun and inspiring, and we expect people to help each other make progress along the way.

Let’s make this happen! 👍 The official hashtag for the event is #hackwpcli 📣

#hack-day

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. http://php.net/manual/en/intro-whatis.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.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. http://php.net/manual/en/intro-whatis.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

Release v2.3.0 postponed

The 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/ release v2.3.0 needs to be postponed.

The code itself should reliably work right now. However, between Travis server connectivity issues and the Travis PHP environment not being able to connect to the wordpress.org servers, I have been unable to run successful tests over the resulting build (although all local tests pass without issues).

Next planned release date is Tuesday, August 13th. This gives me some time to work through the Travis curl issues and work on getting the project “into the green”.

WP-CLI v2.1.0 release postponed

The 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/ v2.1.0 release was originally scheduled for November 6th, 2018. However, due to the current timeline of the WordPress 5.0 release and the additional pressure it puts on all parties involved (WP-CLI contributors & testers included), I decided to postpone the release.

The new planned release date will be Tuesday, December 18th, 2018. This will keep it away from the planned release date(s) of WordPress 5.0 and place it shortly after the 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/. at 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. US, allowing us to get bug fixes & improvements done that day into the release as well.

For people who are waiting on getting their hands on the v2.1.0 release because of bugs in v2.0.1 that will be fixed, please note that you can always upgrade to the latest nightly release with the command wp cli update --nightly and switch back to stable releases later on with wp cli update --stable.

WP-CLI v2.0.0 release postponed

The upcoming 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/ release v2.0.0 that was originally due to be released on July 31st is being re-scheduled for Wednesday, August 8th.

This delay is due to the fact that it was much more work to disentangle the feature tests to split them up for the restructuring. I want to avoid hurrying the release, so I prefer to add some more time to let the dust settle and run further tests.

Thanks for your patience!