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.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 core 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 PHP 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 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 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).
Filter 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 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. 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.
- 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 SSH 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]
- Update translations [#434]
- Fix link in
index.md
[#433]
- Update
ja/index.md
[#432]
- Add edge case handling checksum verification of
hello-dolly
plugin [#119]
- Add support for MySQL 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]
- Add
--force-check
flag to check-update
command [#246]
- Improve SQLite compatibility [#243]
- 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]
- Add missing documentation [#451]
- Add command to get the post ID by URL 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 trash 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]
- 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
CLI 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]
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]
- 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 JSON 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]
- Evaluate
$upgrading
numeric value when checking if maintenance mode is active [#22]
- Add
--file_name=<name>
argument for wp media import
[#187]
- Fix compatibility with newer Composer versions [#183]
- 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]
- Add
@require-mysql
for tests with explicit MySQL dependency [#326]
- Remove Travis CI from
wp scaffold plugin-tests
[#325]
- PHP 8.2 Deprecation: Fix creation of dynamic property. [#55]
- Replace DOS line endings with LF [#49]
- Fix empty line comment parsing by checking for the existing of a line ending [#48]
Contributors
@2ndkauboy, @benjaminprojas, @benlk, @christianwach, @cliffordp, @connerbw, @Dan-Q, @danielbachhuber, @dd32, @dlind1, @dougaxe1, @drzraf, @elenachavdarova, @ernilambar, @gedex, @gitlost, @greatislander, @herregroen, @janw-me, @jenkoian, @johnbillion, @johnrom, @jrfnl, @JulianBustamante, @kodie, @krupal-panchal, @l3ku, @localheinz, @MarkBerube, @marksabbath, @matzeeable, @michaelzangl, @oandregal, @ocean90, @pbiron, @pdaalder, @pekkakortelainen, @pfefferle, @pmbaldha, @ponsfrilus, @rodrigoprimo, @Roy-Orbison, @sandeshjangam, @schlessera, @sdnunca, @sejas, @selul, @shail-mehta, @shawnhooper, @shendy-a8c, @siliconforks, @Soean, @strarsis, @swissspidy, @thelovekesh, @todeveni, @Tug, @up1512001, @valeriySeregin, @wojsmol, @wojtekn, @xknown, @yousan
#release, #v2-10-0