A new version 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/ 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 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.
wp menu
for managing navigation menus
wp widget
and wp sidebar
for managing widgets and sidebars
wp 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
and wp core config --extra-php
in the wp-cli.yml
file
- added
wp role reset
subcommand
- added
wp transient delete-all
and wp transient delete-expired
subcommands
wp core config
: added --skip-check
flag
wp core is-installed
: added --network
flag
wp user create
: added --send-email
flag
wp user delete
: added --network
flag
wp option add
: added --autoload=
parameter
wp search-replace
: now works with tables that have a composite primary key
wp post create
: fixed handling of --post_category=
parameter
wp eval-file
: allow passing arbitrary arguments to the file
You can browse the full list of resolved issues on 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/.
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.