It’s been less than two months since the last major release of WP-CLI, and already we have a lot of goodies to show you.
Global config files
If you create a
~/.wp-cli/config.yml file, WP-CLI will read config values from that file, regardless of where you’re running it from.
You can change the path to the global config file by setting the
WP_CLI_CONFIG_PATH environment variable. That means that you can also disable the global config, like so:
WP_CLI_CONFIG_PATH=/dev/null wp core install ...
--config global parameter is now deprecated.
Setting command parameter values in config files
What’s more, you can now define per-command config values. For example, if my config file looks like this:
core install: admin_user: billy admin_email: email@example.com
… when I run
wp core install, I don’t have to pass the
--admin_email parameters again; they are read from the config file.
Improved plugin test templates
We have simplified the process of setting up and running plugin tests locally.
It fetches the test library from the new
Also, the Travis build no longer depends on the Github mirror of WordPress.
Firstly, all HTTPS requests now use the more up-to-date SSL CA bundle from the Requests library, which should fix most certificate warnings.
Secondly, the timeout for
wp core download has been increased to 10 minutes.
Thirdly, to extract the tarball,
wp core download now uses the PharData class, instead of the
tar binary. This should make it work in more environments, such as MinGW.
Finally, plugin and theme downloads are now cached. So, the first time you run
wp plugin install bbpress, it will save the zip locally. The second time you run it, it won’t download the zip again.
wp plugin deactivate
- added filtering to
wp plugin listand
wp theme list
wp rewrite list
wp post generate
wp scaffold plugin
wp core configno longer escapes HTML characters in passwords
wp user createno longer ignores the
wp rewrite structurecorrectly flushes rewrite rules
wp theme deletenow refuses to delete the active theme
wp scaffold post-typenow generates correct capitalization
wp plugin activatenow works correctly for network-only plugins
wp shellnow works correctly even if a plugin starts output buffering
wp core install --promptnow correctly handles the
wp core init-testscommand (context)
You can browse the full list of resolved issues on Github.
Contributors to this release: BoiteAWeb, ctayloroomphinc, danielbachhuber, dd32, francescolaffi, jonathanbardo, Kevinlearynet, leewillis77, nickdaugherty, QWp6t, rodrigoprimo, ryanduff, scribu, simonwheatley, tiagohillebrandt, tlovett1, wojsmol.