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-adminfor managing caped admins on multisite
wp menufor managing navigation menus
wp sidebarfor managing widgets and sidebars
wp theme modfor 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.
- 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
wp core config --extra-phpin the
wp role resetsubcommand
wp transient delete-alland
wp transient delete-expiredsubcommands
wp core config: added
wp core is-installed: added
wp user create: added
wp user delete: added
wp option add: added
wp search-replace: now works with tables that have a composite primary key
wp post create: fixed handling of
wp 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.
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.