A new version of WP-CLI is here. The highlights:
Manage more things
There are brand new top-level commands for dealing with more types of objects in a WordPress install:
wp super-admin
for managing caped admins on multisitewp menu
for managing navigation menuswp widget
andwp sidebar
for managing widgets and sidebarswp theme mod
for managing theme mods
Exporting only particular database tables
With the new wp db tables
subcommand, you can generate a list of database tables, which you can pass to the wp db export
command, like so:
wp db export --tables=$(wp db tables --url=sub.example.com | tr '\n' ',')
Composability is beautiful.
Arbitrary command nesting
Up until now, you could only have top-level commands, like wp search-replace
and second-level subcommands, like wp core install
. Now, you can have commands at any depth, such as wp post meta update
.
This capability is especially useful to third-party commands, such as wp-cli-buddypress.
Revamped bash completions
Bash completions are now a bit smarter: besides auto-completing positional parameters like --dbname=
, it will also suggest file names, if the subcommand you’re writing out expects a file name.
Note that after updating wp-cli.phar
, you will also have to update the wp-completion.bash file.
Other changes
- added support for WordPress 3.9 and bumped minimum required version to 3.5
- disable KSES filtering when a user is not explicitly set
- allow defining
skip-plugins
andwp core config --extra-php
in thewp-cli.yml
file - added
wp role reset
subcommand - added
wp transient delete-all
andwp transient delete-expired
subcommands wp core config
: added--skip-check
flagwp core is-installed
: added--network
flagwp user create
: added--send-email
flagwp user delete
: added--network
flagwp option add
: added--autoload=
parameterwp search-replace
: now works with tables that have a composite primary keywp post create
: fixed handling of--post_category=
parameterwp eval-file
: allow passing arbitrary arguments to the file
You can browse the full list of resolved issues on GitHub.
Contributors to this release: clemens-tolboom, danielbachhuber, francescolaffi, itsananderson, johnpbloch, mattheu, nyordanov, Rarst, robertboloc, rodrigoprimo, sboisvert, scribu, szepeviktor, trepmal.
Survey
We’d like to know how people are using WP-CLI so we set up a quick survey (just 5 questions). We’d appreciate it if you would fill it out. The results will be posted here, in a separate blog post.