| layout | post |
|---|---|
| author | scribu |
| title | Version 0.12 released |
It's been almost two months since the last major release. We have a few neat features to show you:
I predict that this will turn out to be the most useful command for managing multisite installs, because you can use it to loop through all of them, directly from bash even:
for url in $(wp site list --field=url)
do
echo "$url:"
wp --url=$url post list
done
Notice the --field=url parameter I used above? It's available for all commands that display some information. A few examples:
wp post get 123 --field=content
wp user list --field=username
This will retrieve only the content of the post with ID 123 and nothing else.
This nifty little parameter changes the behaviour of commands when required arguments are not passed to a command. Instead of showing an error and exiting, it prompts you for the value of each argument. Try it out:
wp theme scaffold --prompt
They were originally introduced in version 0.9 and... ahem, naively abandoned in the next release with the introduction of the installer script.
The installer uses Composer, which has its own environmental requirements, but, more importantly, it has to fetch all of the packages WP-CLI depends on, which is both less reliable and slower than downloading a single file that contains everything.
This is particularly important in a continuous integration environment, like Travis CI, where you want to have your builds run as fast as possible and fail only due to failing tests, not due to a faulty internet connection.
So, phar archives can be downloaded from the wp-cli/builds repository.
wp post get --format=contentwas replaced withwp post get --field=content- the
wp rewrite dumpcommand was replaced withwp rewrite list - the
wp comment lastcommand was removed (usewp comment listinstead)
wp search-replaceno longer touches serialized objects (#792)- WP-CLI will display PHP errors on STDERR, even if XDebug is not installed (#786)
wp comment get,wp comment updateandwp comment existswp plugin getandwp theme getwp plugin searchandwp theme searchwp plugin is-installedandwp theme is-installedwp user add-cap,wp user remove-capandwp user list-caps
You can browse the full list of resolved issues on GitHub.
Contributors to this release: c10b10, danielbachhuber, getsource, goldenapples, jmslbam, johnbillion, joshbetz, jtsternberg, mattes, MattiaG, mpeshev, nikolay, nullvariable, oknoway, Rarst, scribu, smhmic, stianlik, thisislawatts, trepmal, westonruter.