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