A new release of WP-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 multisite 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
GitHub 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 Plugin 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.
Contributors
@2ndkauboy, @aldisruiz, @austinginder, @benjaminprojas, @BrianHenryIE, @Chintesh, @christianwach, @cliffordp, @dac514, @danielbachhuber, @dd32, @dlind1, @drzraf, @elenachavdarova, @ernilambar, @gedex, @gitlost, @grafruessel, @greatislander, @herregroen, @huzaifaalmesbah, @i-am-chitti, @janw-me, @jenkoian, @jkrrv, @jrfnl, @l3ku, @localheinz, @matzeeable, @meszarosrob, @michaelzangl, @Mike-Hermans, @mrsdizzie, @oandregal, @ocean90, @oxyc, @pbiron, @pdaalder, @petitphp, @pmbaldha, @ponsfrilus, @ramonjd, @rodrigoprimo, @Roy-Orbison, @saas786, @schlessera, @Scotchester, @sdnunca, @shawnhooper, @shendy-a8c, @siliconforks, @strarsis, @swissspidy, @szepeviktor, @Takshil-Kunadia, @tfirdaus, @thelovekesh, @Tug, @UmeshSingla, @wojsmol, @yousan
#release, #v2-11-0