Title: WP-CLI – Page 12 – The command line interface for WordPress

---

 [  ](https://profiles.wordpress.org/danielbachhuber/) [Daniel Bachhuber](https://profiles.wordpress.org/danielbachhuber/)
12:00 am _on_ November 29, 2016      

# 󠀁[Version 1.0.0 released](https://make.wordpress.org/cli/2016/11/29/version-1-0-0/)󠁿

Woohoo!

Over the course of 5+ years, hundreds of contributors have worked to bring you WP-
CLIWP-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/](http://wp-cli.org/)
[https://make.wordpress.org/cli/](https://make.wordpress.org/cli/) v1.0.0, which
I’m proud to announce today.

This release represents a level of maturity few open sourceOpen Source Open Source
denotes software for which the original source code is made freely available and
may be redistributed and modified. Open Source **must be** delivered via a licensing
model, see GPL. projects achieve. It also marks a moment of transition. The WP-CLI
project will shift its focus to the WP-CLI package ecosystem, where it will enable
innovation by building and encouraging new features as standalone packages. We hope
this approach will promote faster iteration and more creativity, and more sustainably
distribute the maintenance burden. As these community packages find success, we’ll
bring their learnings back into WP-CLI, alongside bug fixes and minor enhancements.

Now that the issue backlog is [down to zero](https://twitter.com/danielbachhuber/status/802951083354009600),
I’m personally looking forward to getting more ideas cooking for [runcommand](https://runcommand.io/),
my own WP-CLI innovation studio.

Headed to Philly this week? I’ll be at Post Status Publish and WCUS (although only
until mid-afternoon Friday). Say hello – I’m [@danielbachhuber](https://twitter.com/danielbachhuber)
on Twitter.

On with the show…

### Introducing `WP_CLI::runcommand()`

`WP_CLI::runcommand()` ([doc](https://make.wordpress.org/docs/internal-api/wp-cli-runcommand/?output_format=md))
is the new best way to run WP-CLI commands from within your WP-CLI command. It’s
as though `WP_CLI::run_command()` and `WP_CLI::launch_self()` grew up, married, 
and had the perfect child.

With `WP_CLI::runcommand()`, you can:

 * Launch a new child process (default), or reuse the existing process.
 * Optionally prevent the process from exiting on error.
 * Return STDOUT generated by the command, or all command execution details (STDOUT,
   STDERR, return_code) as an object.
 * Optionally parse captured STDOUT as JSONJSON JSON, or JavaScript Object Notation,
   is a minimal, readable format for structuring data. It is used primarily to transmit
   data between a server and web application, as an alternative to XML..

Relevant pull requests include: [#3605](https://github.com/wp-cli/wp-cli/pull/3605),
[#3619](https://github.com/wp-cli/wp-cli/pull/3619), [#3621](https://github.com/wp-cli/wp-cli/pull/3621).

### Breaking change: Uses return code 1 when batch operation partially fails

Some commands support performing the same operation against multiple resources (
e.g. updating two or more plugins with `wp plugin update akismet hello`). Previously,
if one of the operations failed (e.g. a pluginPlugin A plugin is a piece of software
containing a group of functions that can be added to a WordPress website. They can
extend functionality or add new features to your WordPress websites. WordPress plugins
are written in the PHP programming language and integrate seamlessly with WordPress.
These can be free in the WordPress.org Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
or can be cost-based plugin from a third-party. update failed to be downloaded),
WP-CLI would display a warning, continue on, and exit with return code 0. Beginning
in v1.0.0, WP-CLI uses return code 1 when one or more operations fails.

See [this issue](https://github.com/wp-cli/wp-cli/issues/3577) for more background
and rationale.

Affected commands include:

 * `wp media (regenerate|import)`
 * `wp menu delete`
 * `wp menu item delete`
 * `wp plugin (install|activate|update|toggle|deactivate|uninstall|delete)`
 * `wp super-admin add`
 * `wp theme (install|update)`
 * `wp term delete`
 * `wp widget (delete|deactivate|reset)`

Use `WP_CLIUtilsreport_batch_operation_results()` ([doc](https://make.wordpress.org/docs/internal-api/wp-cli-utils-report-batch-operation-results/?output_format=md))
in your custom WP-CLI commands to more easily support this behavior.

Relevant pull requests include: [#3584](https://github.com/wp-cli/wp-cli/pull/3584),
[#3583](https://github.com/wp-cli/wp-cli/pull/3583), [#3582](https://github.com/wp-cli/wp-cli/pull/3582),
[#3585](https://github.com/wp-cli/wp-cli/pull/3585), [#3586](https://github.com/wp-cli/wp-cli/pull/3586),
[#3588](https://github.com/wp-cli/wp-cli/pull/3588).

### Everything else in 1.0.0

New commands:

 * `wp package update` – Update all installed WP-CLI packages to their latest version.
 * `wp scaffold theme-tests` – Scaffold PHPUnit tests for themes.

Command improvements:

 * `wp cache type`:
    - Supports WP LCache as a cache type [[#3504](https://github.com/wp-cli/wp-cli/pull/3504)].
 * `wp cli aliases`:
    - Adds `alias` to subcommand for easier access [[#3512](https://github.com/wp-cli/wp-cli/pull/3512)].
 * `wp cli update`:
    - Verifies release hash when updating [[#3515](https://github.com/wp-cli/wp-cli/pull/3515)].
    - No longer requires `--allow--root` flag when running as root [[#3576](https://github.com/wp-cli/wp-cli/pull/3576)].
 * `wp core config`:
    - Ensures WordPress Coding StandardsWordPress Coding Standards The Accessibility,
      PHP, JavaScript, CSS, HTML, etc. coding standards as published in the WordPress
      [Coding Standards Handbook](https://developer.wordpress.org/coding-standards/).
      May also refer to [The collection of PHP_CodeSniffer rules](https://github.com/WordPress/WordPress-Coding-Standards/)(
      sniffs) used to format and validate PHP code developed for WordPress according
      to the PHP coding standards. are applied to the generated wp-config [[#3496](https://github.com/wp-cli/wp-cli/pull/3496)].
 * `wp core (install|multisite-install)`
    - Defaults to a randomly generated password for `--admin_password=<password>`,
      which is now optional [[#3535](https://github.com/wp-cli/wp-cli/pull/3535),
      [#3573](https://github.com/wp-cli/wp-cli/pull/3573)].
 * `wp core language (install|update)`:
    - Caches language pack downloads [[#3595](https://github.com/wp-cli/wp-cli/pull/3595)].
 * `wp core update`:
    - Uses global namespace for `WP_Error` in `CoreUpgrader` class [[#3593](https://github.com/wp-cli/wp-cli/pull/3593)].
 * `wp core update-db`:
    - Sets the `WP_INSTALLING` constant for the update process [[#3503](https://github.com/wp-cli/wp-cli/pull/3503)].
 * `wp package install`:
    - Uses supplied version in package composer.json, instead of “dev-master” [[#3519](https://github.com/wp-cli/wp-cli/pull/3519)].
    - Adds WP-CLI version to package manager’s `composer.json`, to gracefully handle
      WP-CLI version constraints [[#3603](https://github.com/wp-cli/wp-cli/pull/3603)].
 * `wp package list`:
    - Indicates when a package has an update available [[#3611](https://github.com/wp-cli/wp-cli/pull/3611),
      [#3612](https://github.com/wp-cli/wp-cli/pull/3612)].
 * `wp post delete`:
    - Correctly indicates revisionsRevisions The WordPress revisions system stores
      a record of each saved draft or published update. The revision system allows
      you to see what changes were made in each revision by dragging a slider (or
      using the Next/Previous buttons). The display indicates what has changed in
      each revision. are deleted immediately in success message [[#3524](https://github.com/wp-cli/wp-cli/pull/3524)].
 * `wp scaffold plugin`:
    - Ignores distribution archive files in `.gitignore` and `.distignore` [[#3520](https://github.com/wp-cli/wp-cli/pull/3520)].
    - Ignores `circle.yml`, `.gitlab-ci.yml` and `behat.yml` in `.distignore` [[#3599](https://github.com/wp-cli/wp-cli/pull/3599)].
 * `wp scaffold plugin-tests`:
    - Checks out the data directory in `install-wp-tests.sh` to prevent notices 
      in WP 4.7 [[#3571](https://github.com/wp-cli/wp-cli/pull/3571)].

Framework enhancements:

 * Updates Composer-based dependencies to latest [[#3498](https://github.com/wp-cli/wp-cli/pull/3498),
   [#3525](https://github.com/wp-cli/wp-cli/pull/3525)].
 * Introduces `--prompt=<assoc>` to prompt for specific associative args, which 
   lets users avoid exposing secure data in bash history [[#3531](https://github.com/wp-cli/wp-cli/pull/3531)].
 * Adds support for the version of PHPPHP PHP (recursive acronym for PHP: Hypertext
   Preprocessor) is a widely-used open source general-purpose scripting language
   that is especially suited for web development and can be embedded into HTML. 
   [https://www.php.net/manual/en/index.php](https://www.php.net/manual/en/index.php)
   that comes with Cygwin [[#3591](https://github.com/wp-cli/wp-cli/pull/3591)].

Contributors to this release (pull requests, documentation, and package authors):
[abea](https://github.com/abea), [anttiviljami](https://github.com/anttiviljami),
[cobyan](https://github.com/cobyan), [danielbachhuber](https://github.com/danielbachhuber),
[diggy](https://github.com/diggy), [ernilambar](https://github.com/ernilambar), 
[franz-josef-kaiser](https://github.com/franz-josef-kaiser), [greatislander](https://github.com/greatislander),
[itspriddle](https://github.com/itspriddle), [miya0001](https://github.com/miya0001),
[mmcev106](https://github.com/mmcev106), [mopquill](https://github.com/mopquill),
[ocean90](https://github.com/ocean90), [pj-dave](https://github.com/pj-dave), [pkarjala](https://github.com/pkarjala),
[richardbuff](https://github.com/richardbuff), [sommarnatt](https://github.com/sommarnatt),
[szepeviktor](https://github.com/szepeviktor), [torounit](https://github.com/torounit)

You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A1.0.0+is%3Aclosed)
on GithubGitHub 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 by the repository owner. [https://github.com/](https://github.com/).

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2016%2F11%2F29%2Fversion-1-0-0%2F%23respond&locale=en_US)

 [  ](https://profiles.wordpress.org/danielbachhuber/) [Daniel Bachhuber](https://profiles.wordpress.org/danielbachhuber/)
12:00 am _on_ October 25, 2016      

# 󠀁[Version 0.25.0 released](https://make.wordpress.org/cli/2016/10/25/version-0-25-0/)󠁿

Happy release day!

Today, I’m excited to bring you WP-CLIWP-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/](http://wp-cli.org/) [https://make.wordpress.org/cli/](https://make.wordpress.org/cli/)
v0.25.0. Check out the [newly published roadmap](https://make.wordpress.org/docs/roadmap/?output_format=md)
for details on upcoming releases and product focus (hint: there’s a future where
WP-CLI no longer supports PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor)
is a widely-used open source general-purpose scripting language that is especially
suited for web development and can be embedded into HTML. [https://www.php.net/manual/en/index.php](https://www.php.net/manual/en/index.php)
5.3).

Let’s dive in.

### Compatibility with WordPress 4.7

WordPress 4.7 introduces a new `WP_Hook` implementation for registering and executing
actions and filters. Because WP-CLI has its own `WP_CLI::add_wp_hook()` that was
erroneously accessing the `$wp_filter` global even when the `add_filter()` function
was available, WP-CLI could fatal in certain circumstances. WP-CLI now appropriately
calls `add_filter()` when it’s available.

**Importantly, due to the nature of these changes, WP-CLI versions prior to 0.25.0
will be incompatible with WordPress 4.7.**

Inspect the change in [this pull request](https://github.com/wp-cli/wp-cli/pull/3384).

### New packages in the Package Index

The WP-CLI community has been quite active in creating new tools for you to use (
and contribute back to):

 * [aaemnnosttv/wp-cli-login-command](https://github.com/aaemnnosttv/wp-cli-login-command)–
   Log in to WordPress with secure passwordless magic links.
 * [alessandrotesoro/wp-cli-helpscout-docs-parser](https://github.com/alessandrotesoro/wp-cli-helpscout-docs-parser)–
   Extract helpscout docs articles and categories to build an offline documentation.
 * [alessandrotesoro/wp-usergen-cli](https://github.com/alessandrotesoro/wp-usergen-cli)–
   Generate random users for testing purposes.
 * [anhskohbo/wp-cli-themecheck](https://github.com/anhskohbo/wp-cli-themecheck)–
   Run Themecheck in WP-CLI.
 * [BeAPI/wp-cli-light-db-export](https://github.com/BeAPI/wp-cli-light-db-export)–
   Allows you to export big databases with all the tables but not all the data.
 * [binarygary/db-checkpoint](https://github.com/binarygary/db-checkpoint) – Treat
   your DB like a save point in a video game.
 * [brightoak/wp-cli-envoyer](https://github.com/brightoak/wp-cli-envoyer) – Invoke
   an Envoyer deployment via WP-CLI.
 * [getshifter/wp-cli-shifter](https://github.com/getshifter/wp-cli-shifter) – Enables
   you to import/export your WordPress site for the Shifter.
 * [eriktorsner/wp-checksum](https://github.com/eriktorsner/wp-checksum) – Verify
   checksums for themes and plugins.
 * [iandunn/wp-cli-plugin-active-on-sites](https://github.com/iandunn/wp-cli-plugin-active-on-sites)–
   List all sites in a multisiteMultisite 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. [Advanced Administration Handbook -> Create A Network.](https://developer.wordpress.org/advanced-administration/multisite/create-network/)
   network that have activated a given pluginPlugin A plugin is a piece of software
   containing a group of functions that can be added to a WordPress website. They
   can extend functionality or add new features to your WordPress websites. WordPress
   plugins are written in the PHP programming language and integrate seamlessly 
   with WordPress. These can be free in the WordPress.org Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
   or can be cost-based plugin from a third-party..
 * [markri/wp-sec](https://github.com/markri/wp-sec) – Checks for WordPress CVE 
   security issues at wpvulndb.com.
 * [mattgrshaw/wp-installer](https://github.com/mattgrshaw/wp-installer) – Simple
   commands to install and uninstall WordPress.
 * [pressbooks/pb-cli](https://github.com/pressbooks/pb-cli) – A suite of wp-cli
   commands for Pressbooks.
 * [runcommand/assign-featured-images](https://github.com/runcommand/assign-featured-images)–
   Assign featured images to posts that support thumbnails.
 * [runcommand/manifest](https://github.com/runcommand/manifest) – Produces an overview
   of WordPress’ configuration for a high-level understanding of what’s going on
   inside of WordPress.
 * [rxnlabs/wp-composer](https://github.com/rxnlabs/wp-composer) – Manage your WordPress
   site dependencies using the power of Composer.
 * [trendwerk/faker](https://github.com/trendwerk/faker) – Fake post data with WP-
   CLI.
 * [trepmal/blog-extractor](https://github.com/trepmal/blog-extractor) – Extract
   a single blog from multisite.
 * [trepmal/wp-revisions-cli](https://github.com/trepmal/wp-revisions-cli) – Manage
   revisionsRevisions The WordPress revisions system stores a record of each saved
   draft or published update. The revision system allows you to see what changes
   were made in each revision by dragging a slider (or using the Next/Previous buttons).
   The display indicates what has changed in each revision..
 * [welaika/wp-cli-db2utf8](https://github.com/welaika/wp-cli-db2utf8) – Downgrade
   db encoding of a new WP installation to UTF8.

Install any one of these with `wp package install <package-name>` (where `<package-
name>` is typically the `<user>/<repo>`). When you do, go say thanks to the author!

### More ways to install WP-CLI packages

Although we’d love to see your package listed in the Package Index, we realize there
are reasons you might not be able to do so. `wp package install` now supports installing
an arbitrary GitGit Git is a free and open source distributed version control system
designed to handle everything from small to very large projects with speed and efficiency.
Git is easy to learn and has a tiny footprint with lightning fast performance. Most
modern plugin and theme development is being done with this version control system.
[https://git-scm.com/](https://git-scm.com/) URLURL A specific web address of a 
website or web page on the Internet, such as a website’s URL www.wordpress.org [
[#3482](https://github.com/wp-cli/wp-cli/pull/3482)], `.zip` file [[#3485](https://github.com/wp-cli/wp-cli/pull/3485)],
or directory path [[#3484](https://github.com/wp-cli/wp-cli/pull/3484)] as a package.

    ```
    $ wp package install git@github.com:runcommand/doctor.git
    $ wp package install https://github.com/runcommand/doctor.zip
    $ wp package install doctor
    ```

(doctor is the [second premium WP-CLI command from runcommand](https://runcommand.io/wp/doctor/))

It’s worth noting Composer’s behavior is slightly different for each package type:

 * Git URLs are treated as VCS repositories, and cloned to `~/.wp-cli/packages/vendor`.
 * ZIP archives (remote and local) are extracted to `~/.wp-cli/packages/local`, 
   and added as path repositories.
 * Local directory paths are added as path repositories, which means Composer creates
   a symlink to the existing directory path. If the directory you’ve provided is
   removed, then the installation will break.

### Everything else in 0.25.0

New commands:

 * `wp db check` – Runs `mysqlcheck` with the default `--check` option [[#3332](https://github.com/wp-cli/wp-cli/pull/3332)].
 * `wp site option *` – CRUD commands for managing WordPress site options [[#3386](https://github.com/wp-cli/wp-cli/pull/3386)].
 * `wp user session *` – CRUD commands for managing user sessions [[#3307](https://github.com/wp-cli/wp-cli/pull/3307)].

Command improvements:

 * `wp cli update`:
    - Introduces `--stable` to install or reinstall the latest stable version [[#3430](https://github.com/wp-cli/wp-cli/pull/3430)].
 * `wp core config`:
    - Adds comments to generated `wp-config.php` to better match the one provided
      by WordPress coreCore Core is the set of software required to run WordPress.
      The Core Development Team builds WordPress. [[#3312](https://github.com/wp-cli/wp-cli/pull/3312)].
 * `wp core download`:
    - Preserves case for `--version` argument to properly handle release candidates[
      [#3283](https://github.com/wp-cli/wp-cli/pull/3283)].
    - Ensures `wp core download --version=latest` produces correctly-versioned cache
      key [[#3467](https://github.com/wp-cli/wp-cli/pull/3467)].
 * `wp core language update`:
    - Fixes strict standard error about variable reference [[#3380](https://github.com/wp-cli/wp-cli/pull/3380)].
    - Permits updating language packs even when `en_US` is set as locale [[#3397](https://github.com/wp-cli/wp-cli/pull/3397)].
 * `wp core multisite-(install|convert)`:
    - Warns when multisite constants can’t be inserted into `wp-config.php`, instead
      of erroneously inserting at the end [[#3272](https://github.com/wp-cli/wp-cli/pull/3272)].
    - Includes adequate vertical spacing around inserted constants [[#3267](https://github.com/wp-cli/wp-cli/pull/3267)].
 * `wp core update-db`:
    - Ensures `wp core update-db --network --dry-run` is actually dry [[#3347](https://github.com/wp-cli/wp-cli/pull/3347)].
 * `wp core version`:
    - Displays default core language in `wp core version --extra` [[#3221](https://github.com/wp-cli/wp-cli/pull/3221)].
 * `wp import`:
    - Indicates current file in WXR import progress indicator to communicate the
      total count is of the current file, not all files [[#3270](https://github.com/wp-cli/wp-cli/pull/3270)].
 * `wp media regenerate`:
    - Adds a simple progress indicator [[#3407](https://github.com/wp-cli/wp-cli/pull/3407)].
 * `wp option list`:
    - Adds `--no-transients` flag to ignore transients [[#3452](https://github.com/wp-cli/wp-cli/pull/3452)].
    - Adds `--exclude=<exclude>` argument to list options excluding a specific pattern[
      [#3455](https://github.com/wp-cli/wp-cli/pull/3455)].
 * `wp package install`
    - Displays package dependency details when installing a package with a dependency[
      [#3418](https://github.com/wp-cli/wp-cli/pull/3418), [#3425](https://github.com/wp-cli/wp-cli/pull/3425)].
 * `wp package uninstall`
    - Removes a package’s dependencies when the package is removed [[#3343](https://github.com/wp-cli/wp-cli/pull/3343)].
    - Properly assigns `$composer_backup` when uninstalling [[#3399](https://github.com/wp-cli/wp-cli/pull/3399)].
 * `wp plugin install`:
    - Removes branch names from directories created for GithubGitHub 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 by the repository owner.
      [https://github.com/](https://github.com/)-based ZIPs [[#3314](https://github.com/wp-cli/wp-cli/pull/3314),
      [#3451](https://github.com/wp-cli/wp-cli/pull/3451)].
 * `wp scaffold plugin-tests`:
    - Uses PHP version specific to Trusty on CircleCI [[#3359](https://github.com/wp-cli/wp-cli/pull/3359)].
    - Uses correct default user for MySQLMySQL MySQL is a relational database management
      system. A database is a structured collection of data where content, configuration
      and other options are stored. [https://www.mysql.com](https://www.mysql.com/)
      on CircleCI [[#3457](https://github.com/wp-cli/wp-cli/pull/3457)].
    - Uses the latest version of PHPUnit on Travis, depending on PHP version [[#3463](https://github.com/wp-cli/wp-cli/pull/3463)].
    - Adds WordPress Coding StandardsWordPress Coding Standards The Accessibility,
      PHP, JavaScript, CSS, HTML, etc. coding standards as published in the WordPress
      [Coding Standards Handbook](https://developer.wordpress.org/coding-standards/).
      May also refer to [The collection of PHP_CodeSniffer rules](https://github.com/WordPress/WordPress-Coding-Standards/)(
      sniffs) used to format and validate PHP code developed for WordPress according
      to the PHP coding standards. to newly-scaffolded plugins [[#3472](https://github.com/wp-cli/wp-cli/pull/3472)].
 * `wp search-replace`:
    - Ensures tables are quoted to support all permitted characters [[#3318](https://github.com/wp-cli/wp-cli/pull/3318)].
    - Prevents error notice when `export_insert_size` isn’t defined [[#3357](https://github.com/wp-cli/wp-cli/pull/3357)].
    - Fails back to PHP if SQL triggers an error for some reason [[#3387](https://github.com/wp-cli/wp-cli/pull/3387)].
 * `wp server`:
    - Supports passing a custom `.ini` file to configure the server [[#3330](https://github.com/wp-cli/wp-cli/pull/3330)].
 * `wp site create`:
    - Use `get_blog_details()` for the site URL when creating a new site to ensure
      the correct URL is displayed [[#3416](https://github.com/wp-cli/wp-cli/pull/3416)].
 * `wp site empty`:
    - Ensures the entire uploads directory is empty [[#3400](https://github.com/wp-cli/wp-cli/pull/3400)].
 * `wp theme install`:
    - Correctly installs parent theme when installing a child themeChild theme A
      Child Theme is a customized theme based upon a Parent Theme. It’s considered
      best practice to create a child theme if you want to modify the CSS of your
      theme. [https://developer.wordpress.org/themes/advanced-topics/child-themes/](https://developer.wordpress.org/themes/advanced-topics/child-themes/)[
      [#3301](https://github.com/wp-cli/wp-cli/pull/3301)].
 * `wp transient`:
    - Consolidates `wp transient delete-all` and `wp transient delete-expired` to
      flags of `wp transient delete` [[#3389](https://github.com/wp-cli/wp-cli/pull/3389)].
 * `wp user create`:
    - Prevents email notifications when users are created because email notifications
      should only be sent when `--send-email` is provided [[#3331](https://github.com/wp-cli/wp-cli/pull/3331)].

Framework enhancements:

 * Updates Composer-based dependencies to latest [[#3257](https://github.com/wp-cli/wp-cli/pull/3257),
   [#3429](https://github.com/wp-cli/wp-cli/pull/3429), [#3460](https://github.com/wp-cli/wp-cli/pull/3460),
   [#3468](https://github.com/wp-cli/wp-cli/pull/3468)].
 * Properly handles registering an instantiated object as a command [[#3269](https://github.com/wp-cli/wp-cli/pull/3269)].
 * Splits the `ProcessRun` class out to its own file [[#3377](https://github.com/wp-cli/wp-cli/pull/3377),
   [#3422](https://github.com/wp-cli/wp-cli/pull/3422)].
 * Permits running test suite with `WP_VERSION` env variable [[#3383](https://github.com/wp-cli/wp-cli/pull/3383),
   [#3392](https://github.com/wp-cli/wp-cli/pull/3392)].
 * Prevents error notice when using `Utilsget_named_sem_ver()` with WP versions [
   [#3404](https://github.com/wp-cli/wp-cli/pull/3404)].
 * Fixes fatal error for failed early database connection by handling `dead_db()`
   error on `nocache_headers` filterFilter Filters are one of the two types of Hooks
   [https://codex.wordpress.org/Plugin_API/Hooks](https://codex.wordpress.org/Plugin_API/Hooks).
   They provide a way for functions to modify data of other functions. They are 
   the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated
   manner, and should never have side effects such as affecting global variables
   and output. [[#3440](https://github.com/wp-cli/wp-cli/pull/3440)].
 * Assigns a default `$_SERVER['SERVER_NAME']` to prevent uncaught exception when`
   wp_mail()` is used [[#3449](https://github.com/wp-cli/wp-cli/pull/3449)].
 * Ignores `url:` in `wp-cli.yml` when alias is used, because aliases completely
   override user, url, path, ssh, and httpHTTP HTTP is an acronym for Hyper Text
   Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web
   and this protocol defines how messages are formatted and transmitted, and what
   actions Web servers and browsers should take in response to various commands.[
   [#3450](https://github.com/wp-cli/wp-cli/pull/3450)].
 * Warns when `WP_CLI::launch()` ends up with `return_code=-1`, which could be caused
   by a custom compiled version of PHP that uses the `--enable-sigchild` option [
   [#3458](https://github.com/wp-cli/wp-cli/pull/3458)].
 * Provides more verbosity in `wp_die()` handler to give the end user more detail
   when a database connection fails [[#3459](https://github.com/wp-cli/wp-cli/pull/3459)].
 * Supports passing arguments to `WP_CLI::do_hook()` [[#3470](https://github.com/wp-cli/wp-cli/pull/3470)].
 * Logs the current alias when executing an alias group [[#3471](https://github.com/wp-cli/wp-cli/pull/3471)].
 * Only checks `options` for a positional argument when a value is present [[#3481](https://github.com/wp-cli/wp-cli/pull/3481)].
 * Variety of bash completion improvements [[#3490](https://github.com/wp-cli/wp-cli/pull/3490),
   [#3491](https://github.com/wp-cli/wp-cli/pull/3491), [#3492](https://github.com/wp-cli/wp-cli/pull/3492)].

Bug fixes across the board:

 * Defines all requisite dependencies for PHP 7 on Debian-based systems [[#3208](https://github.com/wp-cli/wp-cli/pull/3208)].
 * Ensures `site --site_id= -> site --network_id=` backwards compat shim only affects`
   wp site create` [[#3227](https://github.com/wp-cli/wp-cli/pull/3227)].
 * Catches exceptions thrown by `RecursiveDirectoryIterator` when verifying core
   checksums [[#3266](https://github.com/wp-cli/wp-cli/pull/3266)].
 * Passes slashed data in metaMeta Meta is a term that refers to the inside workings
   of a group. For us, this is the team that works on internal WordPress sites like
   WordCamp Central and Make WordPress. commands [[#3274](https://github.com/wp-cli/wp-cli/pull/3274)].
 * Ensures appropriate WP-CLI package index URL is used in the `composer.json` [
   [#3276](https://github.com/wp-cli/wp-cli/pull/3276)].
 * Corrects reference of `WP_CLI` to use global namespace in `WP_CLIUtilsget_temp_dir()`[
   [#3369](https://github.com/wp-cli/wp-cli/pull/3369)].

Contributors to this release (pull requests, documentation, and package authors):
[2ndkauboy](https://github.com/2ndkauboy), [aaemnnosttv](https://github.com/aaemnnosttv),
[alessandrotesoro](https://github.com/alessandrotesoro), [anhskohbo](https://github.com/anhskohbo),
[balbuf](https://github.com/balbuf), [BeAPI](https://github.com/BeAPI), [binarygary](https://github.com/binarygary),
[bradp](https://github.com/bradp), [brightoak](https://github.com/brightoak), [danielbachhuber](https://github.com/danielbachhuber),
[danilomaccioni](https://github.com/danilomaccioni), [diggy](https://github.com/diggy),
[getshifter](https://github.com/getshifter), [eriktorsner](https://github.com/eriktorsner),
[ernilambar](https://github.com/ernilambar), [fisele](https://github.com/fisele),
[grappler](https://github.com/grappler), [guillaumemolter](https://github.com/guillaumemolter),
[iandunn](https://github.com/iandunn), [johnbillion](https://github.com/johnbillion),
[jorgeatorres](https://github.com/jorgeatorres), [kouratoras](https://github.com/kouratoras),
[markri](https://github.com/markri), [mattgrshaw](https://github.com/mattgrshaw),
[miya0001](https://github.com/miya0001), [mustafauysal](https://github.com/mustafauysal),
[nyordanov](https://github.com/nyordanov), [ocean90](https://github.com/ocean90),
[petenelson](https://github.com/petenelson), [polevaultweb](https://github.com/polevaultweb),
[pressbooks](https://github.com/pressbooks), [rahulsprajapati](https://github.com/rahulsprajapati),
[runcommand](https://github.com/runcommand), [rxnlabs](https://github.com/rxnlabs),
[shulard](https://github.com/shulard), [swissspidy](https://github.com/swissspidy),
[szepeviktor](https://github.com/szepeviktor), [taianunes](https://github.com/taianunes),
[tnorthcutt](https://github.com/tnorthcutt), [trendwerk](https://github.com/trendwerk),
[trepmal](https://github.com/trepmal), [veganista](https://github.com/veganista),
[welaika](https://github.com/welaika)

You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.25.0+is%3Aclosed)
on Github.

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2016%2F10%2F25%2Fversion-0-25-0%2F%23respond&locale=en_US)

 [  ](https://profiles.wordpress.org/danielbachhuber/) [Daniel Bachhuber](https://profiles.wordpress.org/danielbachhuber/)
12:00 am _on_ August 16, 2016      

# 󠀁[Two more major releases in 2016](https://make.wordpress.org/cli/2016/08/16/remaining-releases-2016/)󠁿

Just a heads up there will be two more major releases in 2016:

 * v0.25.0 will be released on Tuesday, October 25th.
 * v1.0.0 will be released on Tuesday, November 29th.

Want to help out? We’ll be focusing on framework refinement; in particular, there
are a [number of improvements that can be made](https://github.com/wp-cli/wp-cli/issues?q=is%3Aopen+is%3Aissue+label%3Acommand%3Apackage)
to the package management experience.

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2016%2F08%2F16%2Fremaining-releases-2016%2F%23respond&locale=en_US)

 [  ](https://profiles.wordpress.org/danielbachhuber/) [Daniel Bachhuber](https://profiles.wordpress.org/danielbachhuber/)
12:00 am _on_ August 9, 2016      

# 󠀁[Version 0.24.1 released](https://make.wordpress.org/cli/2016/08/09/version-0-24-1/)󠁿

Curious as to why you’re getting a warning message when updating an option? Or why`--
skip-plugins=<plugin-slug>` skips all of your network-activated plugins?

These two bugs, regressions from v0.24.0, are fixed in v0.24.1.

You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=is%3Aclosed+milestone%3A0.24.1)
on GithubGitHub 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 by the repository owner. [https://github.com/](https://github.com/).

Contributors to this release: [danielbachhuber](https://github.com/danielbachhuber)

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2016%2F08%2F09%2Fversion-0-24-1%2F%23respond&locale=en_US)

 [  ](https://profiles.wordpress.org/danielbachhuber/) [Daniel Bachhuber](https://profiles.wordpress.org/danielbachhuber/)
12:00 am _on_ August 9, 2016      

# 󠀁[Support policy updates](https://make.wordpress.org/cli/2016/08/09/support-policy/)󠁿

To help keep the maintenance burden manageable by volunteers, our support policies
have changed: GithubGitHub 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 by the repository
owner. [https://github.com/](https://github.com/) issues are now reserved for bug
reports and enhancements of existing commands; they are no longer a venue for general
support questions.

Have a question about something related to WP-CLIWP-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/](http://wp-cli.org/) [https://make.wordpress.org/cli/](https://make.wordpress.org/cli/)?
You might find an answer in one of the following resources:

 * [Common issues and their fixes](https://wp-cli.org/docs/common-issues/)
 * [Documentation portal](https://wp-cli.org/docs/)
 * [Open or closed issues on Github](https://github.com/wp-cli/wp-cli/issues?utf8=%E2%9C%93&q=is%3Aissue)
 * [runcommand Excerpts](https://runcommand.io/excerpts/)
 * [WordPress StackExchange forums](http://wordpress.stackexchange.com/questions/tagged/wp-cli)

If you can’t find your answer at one of those links, join the `#cli` channel on 
the [WordPress.org Slack organization](https://make.wordpress.org/chat/) to see 
if a community member might have an answer for you. Professional users may also 
consider [runcommand](https://runcommand.io/) for premium support.

Using WP-CLI professionally? We encourage you to purchase support from a [regular WP-CLI contributor](https://github.com/wp-cli/wp-cli/graphs/contributors).
Libre != gratis; the open sourceOpen Source Open Source denotes software for which
the original source code is made freely available and may be redistributed and modified.
Open Source **must be** delivered via a licensing model, see GPL. license grants
you the freedom to use and modify, but not commitments of other people’s time. Participating
responsibly in the economic ecosystem around an open source tool you depend upon
helps to ensure the long-term health of the project.

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2016%2F08%2F09%2Fsupport-policy%2F%23respond&locale=en_US)

 [  ](https://profiles.wordpress.org/danielbachhuber/) [Daniel Bachhuber](https://profiles.wordpress.org/danielbachhuber/)
12:00 am _on_ July 27, 2016      

# 󠀁[Version 0.24.0 released](https://make.wordpress.org/cli/2016/07/27/version-0-24-0/)󠁿

As I [mentioned in my WordCamp Europe talk](https://runcommand.io/2016/06/26/my-condolences-youre-now-the-maintainer-of-a-popular-open-source-project/):

>  Just like WordPress has plugins, the future of WP-CLIWP-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/](http://wp-cli.org/)
> [https://make.wordpress.org/cli/](https://make.wordpress.org/cli/) is packages
> of commands. For this future, I’m trying to proactively solve the problems WordPress
> has with plugins:
>  * Where WordPress plugins are considered second-class to what’s included in coreCore
>    Core is the set of software required to run WordPress. The Core Development
>    Team builds WordPress., I’d like WP-CLI packages to be considered first-class
>    citizens amongst the commands in WP-CLI.
>  * All too often, WordPress plugins have just one author. I’d like for each WP-
>    CLI package to have two or three active maintainers.

In this model, WP-CLI becomes the common interface, and supporting application layer,
to a rich ecosystem of features. Doing so opens more frontiers for innovation, which
leads to a greater selection of ideas to choose from. And because more people are
involved in authoring packages, WP-CLI benefits from a larger contributor pool.

With this model, my focus shifts towards designing a world-class experience for 
WP-CLI package authorship. Read through the [commands cookbook](http://wp-cli.org/docs/commands-cookbook/)
for a thorough introduction to creating a WP-CLI command. Check out `wp scaffold
package` [[repo](https://github.com/wp-cli/scaffold-package-command)] for the easiest
way to generate the boilerplate for your new WP-CLI package. Weigh in with your 
thoughts on [how we should evolve the WP-CLI package index](https://github.com/wp-cli/wp-cli/issues/3197).
And [follow @runcommand](https://twitter.com/runcommand) as I explore commercializing
WP-CLI products and services — I hope that [runcommand](https://runcommand.io) is
just the first of several WP-CLI-based businesses.

One last ask: if you care about the WP-CLI release cycle, or dependencies and backwards
compatibility, please [let me know how often you think WP-CLI should be released](https://github.com/wp-cli/wp-cli/issues/3198).

Let’s get on with the show. Use `wp cli update` to install v0.24.0, representing
[449 resolved issues and pull requests](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.24.0+is%3Aclosed).
Here’s what’s new.

### Forked `wp-settings.php` no more

Every application has a bootstrap file which loads all of the requisite utilities
needed to serve a request. In WordPress, this is called `wp-settings.php`.

Since v0.8.0 [[#261](https://github.com/wp-cli/wp-cli/pull/261)], WP-CLI has used
a forked version of this bootstrap file, called `wp-settings-cli.php`, to give it
more control over the load process, providing features like `--skip-plugins`. But,
because WordPress can require new files from `wp-settings.php`, maintaining a forked
version has the unfortunate side effect of WP-CLI [regularly breaking when a new version of WordPress is released](http://wp-cli.org/blog/versions-0.21.1-and-0.20.4.html).

Thanks to coordinated changes in the WordPress project, WP-CLI v0.24.0 returns to
loading `wp-settings.php` for WordPress 4.6 and higher [[#2278](https://github.com/wp-cli/wp-cli/issues/2278)].
Doing so should make WP-CLI more future proof against new versions of WordPress.

### More documentation in more languages

Thanks to tireless efforts by a solid group of contributors, WP-CLI now has more
documentation in more languages.

 * Dozens of commands have improved examples for reference.
 * We have a new [CONTRIBUTING.md](https://github.com/wp-cli/wp-cli/blob/master/CONTRIBUTING.md),
   which also has a [page on the website](http://wp-cli.org/docs/contributing/).
 * Our new [README.md](https://github.com/wp-cli/wp-cli/blob/master/README.md) powers
   the [WP-CLI homepage](http://wp-cli.org/), and is available in [Japanese](http://wp-cli.org/ja/),
   [Français](http://wp-cli.org/fr/), [Português (Brasil)](http://wp-cli.org/br/),
   [Türkçe](http://wp-cli.org/tr/), [Deutsch](http://wp-cli.org/de/), [नेपाली](http://wp-cli.org/ne/),
   and [ελληνικά](http://wp-cli.org/gr/).

Want to get involved with WP-CLI’s documentation? Check out the [Github issues labeled “scope:documentation”](https://github.com/wp-cli/wp-cli/issues?q=is%3Aopen+sort%3Aupdated-desc+label%3Ascope%3Adocumentation).

### Effortlessly use WP-CLI against any WordPress install

WP-CLI aliases are shortcuts you register in your `wp-cli.yml` or `config.yml` to
effortlessly run commands against any WordPress install.

For instance, if I’m working locally on the runcommand theme, have registered a 
new rewrite rule, and need to flush rewrites inside my Vagrant-based virtual machine,
I can run:

    ```
    $ wp @dev rewrite flush
    Success: Rewrite rules flushed.
    ```

Then, once the code goes to production, I can run:

    ```
    $ wp @prod rewrite flush
    Success: Rewrite rules flushed.
    ```

Look ma! No more SSHSSH Secure SHell - a protocol for securely connecting to a remote
system in addition to or in place of a password.’ing into machines, changing directories,
and generally spending a full minute to get to a given WordPress install.

Additionally, alias groups let you register groups of aliases. If I want to run 
a command against both runcommand WordPress instances, I can use `@both`:

    ```
    $ wp @both core check-update
    Success: WordPress is at the latest version.
    Success: WordPress is at the latest version.
    ```

Aliases can be registered in your project’s `wp-cli.yml` file, or your user’s global`
~/.wp-cli/config.yml` file:

    ```
    @prod:
      ssh: runcommand@runcommand.io~/webapps/production
    @dev:
      ssh: vagrant@192.168.50.10/srv/www/runcommand.dev
    @both:
      - @prod
      - @dev
    ```

### But wait, what’s the ‘ssh’ in there?

WP-CLI now natively supports a `--ssh=<host>` global parameter for running a command
against a remote WordPress install. Many thanks to XWP and their community for paving
the way with [WP-CLI SSH](https://github.com/xwp/wp-cli-ssh).

Under the hood, WP-CLI proxies commands to the `ssh` executable, which then passes
them to WP-CLI installed on the remote machine. Your syntax for `-ssh=<host>` can
be any of the following:

 * Just the host (e.g. `wp --ssh=runcommand.io`), which means the user will be inferred
   from your current system user, and the path will be the SSH user’s home directory.
 * The user and the host (e.g. `wp --ssh=runcommand@runcommand.io`).
 * The user, the host, and the path to the WordPress install (e.g. `wp --ssh=runcommand@
   runcommand.io~/webapps/production`). The path comes immediately after the TLD
   of the host.

Or, if you use a `~/.ssh/config`, `<host>` can be any host alias stored in the SSH
config (e.g. `wp --ssh=rc` for me).

Note you do need a copy of WP-CLI on the remote server, accessible as `wp`. Futhermore,`--
ssh=<host>` won’t load your `.bash_profile` if you have a shell alias defined, or
are extending the `$PATH` environment variable. If this affects you, [here’s a more thorough explanation](https://runcommand.io/to/wp-ssh-custom-path/)
of how you can make `wp` accessible.

Relevant pull requests for aliases and SSH support include: [#2755](https://github.com/wp-cli/wp-cli/pull/2755),
[#2974](https://github.com/wp-cli/wp-cli/pull/2974), [#3012](https://github.com/wp-cli/wp-cli/pull/3012),
[#3013](https://github.com/wp-cli/wp-cli/pull/3013), [#3014](https://github.com/wp-cli/wp-cli/pull/3014),
[#3016](https://github.com/wp-cli/wp-cli/pull/3016), [#3026](https://github.com/wp-cli/wp-cli/pull/3026),
[#3040](https://github.com/wp-cli/wp-cli/pull/3040), [#3070](https://github.com/wp-cli/wp-cli/pull/3070),
[#3093](https://github.com/wp-cli/wp-cli/pull/3093), [#3100](https://github.com/wp-cli/wp-cli/pull/3100),
[#3117](https://github.com/wp-cli/wp-cli/pull/3117), [#3134](https://github.com/wp-cli/wp-cli/pull/3134),
[#3135](https://github.com/wp-cli/wp-cli/pull/3135), [#3145](https://github.com/wp-cli/wp-cli/pull/3145),
[#3161](https://github.com/wp-cli/wp-cli/pull/3161), [#3180](https://github.com/wp-cli/wp-cli/pull/3180).

### Everything else in 0.24.0

Command improvements:

 * Adds a newline when using the `wp shell` interactive prompt [[#2601](https://github.com/wp-cli/wp-cli/pull/2601),
   [#2659](https://github.com/wp-cli/wp-cli/pull/2659)].
 * Improves formatting of scaffolded plugins [[#2588](https://github.com/wp-cli/wp-cli/pull/2588),
   [#2598](https://github.com/wp-cli/wp-cli/pull/2598)].
 * Introduces `--format=ids` to `wp (*) generate` commands for easier chaining [
   [2622](https://github.com/wp-cli/wp-cli/pull/2622)].
 * Adds `term recount` command for trigger a recount of taxonomyTaxonomy A taxonomy
   is a way to group things together. In WordPress, some common taxonomies are category,
   link, tag, or post format. [https://codex.wordpress.org/Taxonomies#Default_Taxonomies](https://codex.wordpress.org/Taxonomies#Default_Taxonomies).
   terms assigned to posts [[#2625](https://github.com/wp-cli/wp-cli/pull/2625),
   [#2628](https://github.com/wp-cli/wp-cli/pull/2628)].
 * Normalizes pluginPlugin A plugin is a piece of software containing a group of
   functions that can be added to a WordPress website. They can extend functionality
   or add new features to your WordPress websites. WordPress plugins are written
   in the PHP programming language and integrate seamlessly with WordPress. These
   can be free in the WordPress.org Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
   or can be cost-based plugin from a third-party. / theme version numbers and headerHeader
   The header of your site is typically the first thing people will experience. 
   The masthead or header art located across the top of your page is part of the
   look and feel of your website. It can influence a visitor’s opinion about your
   content and you/ your organization’s brand. It may also look different on different
   screen sizes. formatting when scaffolding [[#2644](https://github.com/wp-cli/wp-cli/pull/2644)].
 * Introduces `--due-now` to run all cron events due or overdue [[#2658](https://github.com/wp-cli/wp-cli/pull/2658)].
 * Permits `wp cron (event|schedule) list` and `wp option list` to output a single
   field [[#2657](https://github.com/wp-cli/wp-cli/pull/2657), [#3033](https://github.com/wp-cli/wp-cli/pull/3033)].
 * Adds field filtering in cron event list command [[#2674](https://github.com/wp-cli/wp-cli/pull/2674)].
 * Includes a `.distignore` file when scaffolding a new plugin, to define files 
   and folders excluded from distributions [[#2697](https://github.com/wp-cli/wp-cli/pull/2697),
   [#2756](https://github.com/wp-cli/wp-cli/pull/2756), [#3042](https://github.com/wp-cli/wp-cli/pull/3042),
   [#3088](https://github.com/wp-cli/wp-cli/pull/3088)].
 * Displays a summary success message when using `--dry-run` with `wp search-replace`[
   [#2740](https://github.com/wp-cli/wp-cli/pull/2740)].
 * Scaffolds plugin based on supported WordPress version [[#2751](https://github.com/wp-cli/wp-cli/pull/2751)].
 * Applies extended insert format to search-replace SQL export, for a substantial
   performance boost [[#2745](https://github.com/wp-cli/wp-cli/pull/2745)].
 * Warns with `wp core verify-checksums` when extra files exist in wp-admin or wp-
   includes [[#2638](https://github.com/wp-cli/wp-cli/pull/2638)].
 * Supports `--format=<format>` argument for `wp cap list`, `wp user list-caps`,
   and `wp super-admin list` [[#2851](https://github.com/wp-cli/wp-cli/pull/2851),
   [#2961](https://github.com/wp-cli/wp-cli/pull/2961), and [#2949](https://github.com/wp-cli/wp-cli/pull/2949)].
 * Accepts multiple term IDs with `wp term url` [[#2865](https://github.com/wp-cli/wp-cli/pull/2865)].
 * Supports PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a 
   widely-used open source general-purpose scripting language that is especially
   suited for web development and can be embedded into HTML. [https://www.php.net/manual/en/index.php](https://www.php.net/manual/en/index.php)
   5.5 Memcache extension when checking cache type [[#2945](https://github.com/wp-cli/wp-cli/pull/2945)].
 * Uses `WP_CLI::warning()` when a theme is already active, to make behavior more
   consistent with plugin activation [[#3015](https://github.com/wp-cli/wp-cli/pull/3015)].
 * Adds `--porcelain` flag to `wp db export` [[#3032](https://github.com/wp-cli/wp-cli/pull/3032)].
 * Allow the author field to be selected in `wp theme list --fields=<field>` [[#3043](https://github.com/wp-cli/wp-cli/pull/3043)].
 * Introduces `wp widget reset <sidebar>`, for removing all widgets from a sidebarSidebar
   A sidebar in WordPress is referred to a widget-ready area used by WordPress themes
   to display information that is not a part of the main content. It is not always
   a vertical column on the side. It can be a horizontal rectangle below or above
   the content area, footer, header, or any where in the theme. and placing them
   in the inactive sidebar [[#3077](https://github.com/wp-cli/wp-cli/pull/3077)].
 * Supports ‘trunk’ and ‘nightly’ version arguments for `wp core download` [[#3127](https://github.com/wp-cli/wp-cli/pull/3127)].
 * Adds verbosity to `wp role reset` [[#3132](https://github.com/wp-cli/wp-cli/pull/3132),
   [#3141](https://github.com/wp-cli/wp-cli/pull/3141)].
 * Adds `--include-columns=<columns>` argument to `wp search-replace` [[#3142](https://github.com/wp-cli/wp-cli/pull/3142)].
 * Adds `--ci=<provider>` argument for `wp plugin test scaffold`, which supports‘
   travis’, ‘circle’, or ‘gitlab’ [[#3144](https://github.com/wp-cli/wp-cli/pull/3144),
   [#3163](https://github.com/wp-cli/wp-cli/pull/3163)].

Framework enhancements:

 * Uses `is_callable()` in `WP_CLI::add_command()`, instead of custom logic [[#2595](https://github.com/wp-cli/wp-cli/pull/2595)].
 * Introduces `CompositeCommand->remove_subcommand()`, and modifies the bootstrap
   process to always register core commands [[#2629](https://github.com/wp-cli/wp-cli/pull/2629)].
 * Runs `before_invoke` and `after_invoke` callbacks on subcommands, such that you
   can hook into immediately before and after subcommand execution [[#2647](https://github.com/wp-cli/wp-cli/pull/2647),
   [#2686](https://github.com/wp-cli/wp-cli/pull/2686)].
 * Introduces `--debug=<group>` to limit debug output to a particular group of debug
   calls [[#2648](https://github.com/wp-cli/wp-cli/pull/2648)].
 * Interacts with the Package Index over SSLSSL Secure Socket Layer - Encryption
   from the server to the browser and back. Prevents prying eyes from seeing what
   you are sending between your browser and the server. [[#2720](https://github.com/wp-cli/wp-cli/pull/2720)].
 * Supports CSV with spaces when using `--fields=<fields>` [[#2750](https://github.com/wp-cli/wp-cli/pull/2750)].
 * Disables WP cron when `ALTERNATE_WP_CRON` is defined [[#3118](https://github.com/wp-cli/wp-cli/pull/3118)].
 * Supports positional arguments defined in `wp-cli.yml` [[#3120](https://github.com/wp-cli/wp-cli/pull/3120)].
 * Introduces `WP_CLI_STRICT_ARGS_MODE` for dealing with arg ambiguity [[#3128](https://github.com/wp-cli/wp-cli/pull/3128)].
 * Registers `--http=<url>` global parameter for use with RESTful WP-CLI [[#3130](https://github.com/wp-cli/wp-cli/pull/3130)].
 * Introduces `WP_CLI::add_wp_hook()`, for adding actions and filters when you don’t
   yet have access to actions and filters [[#3195](https://github.com/wp-cli/wp-cli/pull/3195)].
 * Increases minimum supported PHP version to 5.3.29 [[#2672](https://github.com/wp-cli/wp-cli/pull/2672)].

Bug fixes across the board:

 * Mitigates a DateTime fatal when instantiating the Composer object [[#2607](https://github.com/wp-cli/wp-cli/pull/2607)].
 * Squashes `wp export` notice about `skip_comments` [[#2620](https://github.com/wp-cli/wp-cli/pull/2620)].
 * Avoids regex to fix greedy parsing of parameter arguments [[#2587](https://github.com/wp-cli/wp-cli/pull/2587),
   [#2717](https://github.com/wp-cli/wp-cli/pull/2717)].
 * Ensures `default` and `options` are used when supplied as arg args [[#2741](https://github.com/wp-cli/wp-cli/pull/2741)].
 * Considers image sizes missing when using `wp media regenerate` and `sizes` doesn’t
   have registered sizes [[#2645](https://github.com/wp-cli/wp-cli/pull/2645)].
 * Catches `WP_Error` from `translations_api()` [[#2671](https://github.com/wp-cli/wp-cli/pull/2671),
   [#3179](https://github.com/wp-cli/wp-cli/pull/3179)].
 * Doesn’t erroneously try to (de)activate plugins with `--all` flag [[#2692](https://github.com/wp-cli/wp-cli/pull/2692)].
 * Defines `DOING_CRON` before WordPress is loaded when running `wp cron event run`[
   [#2691](https://github.com/wp-cli/wp-cli/pull/2691)].
 * Only attempts to use `add_user_to_blog()` on multisiteMultisite 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. [Advanced Administration Handbook -> Create A Network.](https://developer.wordpress.org/advanced-administration/multisite/create-network/)
   when importing users from CSV [[#2690](https://github.com/wp-cli/wp-cli/pull/2690)].
 * Fixes listing user metaMeta Meta is a term that refers to the inside workings
   of a group. For us, this is the team that works on internal WordPress sites like
   WordCamp Central and Make WordPress. associated with a given username [[#2700](https://github.com/wp-cli/wp-cli/pull/2700)].
 * Differentiates output when moving comments to trashTrash Trash in WordPress is
   like the Recycle Bin on your PC or Trash in your Macintosh computer. Users with
   the proper permission level (administrators and editors) have the ability to 
   delete a post, page, and/or comments. When you delete the item, it is moved to
   the trash folder where it will remain for 30 days. from output when deleting 
   comments [[#2701](https://github.com/wp-cli/wp-cli/pull/2701)].
 * Prevents runaway memory usage from `wp export` by clearing object cache after
   each file [[#2716](https://github.com/wp-cli/wp-cli/pull/2716)].
 * Ignores ambigious empty plugin and theme slugs when installing [[#2715](https://github.com/wp-cli/wp-cli/pull/2715)].
 * Takes all digits when running commands that use the comment id [[#2714](https://github.com/wp-cli/wp-cli/pull/2714),
   [#2901](https://github.com/wp-cli/wp-cli/pull/2901)].
 * Only displays packages directory path when it exists [[#2773](https://github.com/wp-cli/wp-cli/pull/2773)].
 * Bails early in theme commands if theme is broken or has error [[#2798](https://github.com/wp-cli/wp-cli/pull/2798)].
 * Displays error if theme directory exists but is erred; permits force install [
   [#2821](https://github.com/wp-cli/wp-cli/pull/2821)].
 * Fixes PHP notice when installing a child themeChild theme A Child Theme is a 
   customized theme based upon a Parent Theme. It’s considered best practice to 
   create a child theme if you want to modify the CSS of your theme. [https://developer.wordpress.org/themes/advanced-topics/child-themes/](https://developer.wordpress.org/themes/advanced-topics/child-themes/),
   and running `wp theme status` [[#2976](https://github.com/wp-cli/wp-cli/pull/2976),
   [#3047](https://github.com/wp-cli/wp-cli/pull/3047)].
 * Ensures YAML formatter handles objects and `--fields=<fields>` arg [[#3060](https://github.com/wp-cli/wp-cli/pull/3060)].
 * Fixes exception in `wp menu list` if `--format=ids` [[#3075](https://github.com/wp-cli/wp-cli/pull/3075)].
 * Populates recently active plugins list when deactivating a plugin [[#3068](https://github.com/wp-cli/wp-cli/pull/3068)].
 * Respects `wp-cli.yml` default values when applying argument defaults [[#3111](https://github.com/wp-cli/wp-cli/pull/3111)].
 * Calls `wp_slash()` on data passed to post, comment, term, and user commands [
   [#3156](https://github.com/wp-cli/wp-cli/pull/3156), [#3157](https://github.com/wp-cli/wp-cli/pull/3157),
   [#3158](https://github.com/wp-cli/wp-cli/pull/3158), [#3159](https://github.com/wp-cli/wp-cli/pull/3159),
   [#3167](https://github.com/wp-cli/wp-cli/pull/3167), [#3173](https://github.com/wp-cli/wp-cli/pull/3173)].
 * Appropriately lists duplicated cron events [[#3175](https://github.com/wp-cli/wp-cli/pull/3175)].

Contributors to this release: [andyexeter](https://github.com/andyexeter), [bordoni](https://github.com/bordoni),
[danielbachhuber](https://github.com/danielbachhuber), [diggy](https://github.com/diggy),
[enrico-sorcinelli](https://github.com/enrico-sorcinelli), [ernilambar](https://github.com/ernilambar),
[geo4orce](https://github.com/geo4orce), [gedex](https://github.com/gedex), [gilbitron](https://github.com/gilbitron),
[hideokamoto](https://github.com/hideokamoto), [apertureless](https://github.com/apertureless),
[JRGould](https://github.com/JRGould), [johnbillion](https://github.com/johnbillion),
[kkoppenhaver](https://github.com/kkoppenhaver), [kouratoras](https://github.com/kouratoras),
[markjaquith](https://github.com/markjaquith), [miya0001](https://github.com/miya0001),
[mustafauysal](https://github.com/mustafauysal), [NateWr](https://github.com/NateWr),
[Nikschavan](https://github.com/Nikschavan), [ocean90](https://github.com/ocean90),
[petenelson](https://github.com/petenelson), [phh](https://github.com/phh), [rachelbaker](https://github.com/rachelbaker),
[PatelUtkarsh](https://github.com/PatelUtkarsh), [PeterDaveHello](https://github.com/PeterDaveHello),
[robhenley](https://github.com/robhenley) [rodrigoprimo](https://github.com/rodrigoprimo),
[roelveldhuizen](https://github.com/roelveldhuizen), [ShinichiNishikawa](https://github.com/ShinichiNishikawa),
[shulard](https://github.com/shulard), [stephenharris](https://github.com/stephenharris),
[stevenkword](https://github.com/stevenkword), [swissspidy](https://github.com/swissspidy),
[taianunes](https://github.com/taianunes), [villevuor](https://github.com/villevuor),
[voldemortensen](https://github.com/voldemortensen), [wesm87](https://github.com/wesm87),
[8bitodyssey](https://github.com/8bitodyssey)

You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.24.0+is%3Aclosed)
on GithubGitHub 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 by the repository owner. [https://github.com/](https://github.com/).

Back to work!

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2016%2F07%2F27%2Fversion-0-24-0%2F%23respond&locale=en_US)

 [  ](https://profiles.wordpress.org/danielbachhuber/) [Daniel Bachhuber](https://profiles.wordpress.org/danielbachhuber/)
12:00 am _on_ July 20, 2016      

# 󠀁[RESTful WP-CLI – The final update?](https://make.wordpress.org/cli/2016/07/20/restful-wp-cli-update-4/)󠁿

Last November, I [published a Kickstarter](https://www.kickstarter.com/projects/danielbachhuber/a-more-restful-wp-cli),
and was completely blown away by the support. This month, the funding ran out, so
I thought I’d post one last [RESTful WP-CLI](https://github.com/wp-cli/restful) 
update.

Actually, the story doesn’t end here. I’m writing a massive retrospective post about
using Kickstarter to fund open sourceOpen Source Open Source denotes software for
which the original source code is made freely available and may be redistributed
and modified. Open Source **must be** delivered via a licensing model, see GPL.,
so keep an eye out for that. Also, WP-CLIWP-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/](http://wp-cli.org/) [https://make.wordpress.org/cli/](https://make.wordpress.org/cli/)
v0.24.0 is due out a week from now, July 27th, and it’s looking to be the largest
release ever. When you do a Kickstarter, it’s really just the beginning of something
bigger.

Enough with the superlatives, let’s dive into some new features. Remember: RESTful
WP-CLI features require under the hood changes to WP-CLI. You’ll want to `wp cli
update --nightly` to play with this new functionality locally. Once you’ve done 
so, you can `wp package install wp-cli/restful` to install the latest.

### Effortlessly use WP-CLI against any WordPress install

WP-CLI aliases are shortcuts you register in your `wp-cli.yml` or `config.yml` to
effortlessly run commands against any WordPress install.

For instance, if I’m working locally on the runcommand theme, have registered a 
new rewrite rule, and need to flush rewrites inside my Vagrant-based virtual machine,
I can run:

    ```
    $ wp @dev rewrite flush
    Success: Rewrite rules flushed.
    ```

Then, once the code goes to production, I can run:

    ```
    $ wp @prod rewrite flush
    Success: Rewrite rules flushed.
    ```

Look ma! No more SSHSSH Secure SHell - a protocol for securely connecting to a remote
system in addition to or in place of a password.’ing into machines, changing directories,
and generally spending a full minute to get to a given WordPress install.

Additionally, alias groups let you register groups of aliases. If I want to run 
a command against both runcommand WordPress instances, I can use `@both`:

    ```
    $ wp @both core check-update
    Success: WordPress is at the latest version.
    Success: WordPress is at the latest version.
    ```

Aliases can be registered in your project’s `wp-cli.yml` file, or your user’s global`
~/.wp-cli/config.yml` file:

    ```
    @prod:
      ssh: runcommand@runcommand.io~/webapps/production
    @dev:
      ssh: vagrant@192.168.50.10/srv/www/runcommand.dev
    @both:
      - @prod
      - @dev
    ```

### But wait, what’s the ‘ssh’ in there?

WP-CLI now natively supports a `--ssh=<host>` global parameter for running a command
against a remote WordPress install. Many thanks to XWP and their community for paving
the way with [WP-CLI SSH](https://github.com/xwp/wp-cli-ssh).

Under the hood, WP-CLI proxies commands to the `ssh` executable, which then passes
them to WP-CLI installed on the remote machine. Your syntax for `-ssh=<host>` can
be any of the following:

 * Just the host (e.g. `wp --ssh=runcommand.io`), which means the user will be inferred
   from your current system user, and the path will be the SSH user’s home directory.
 * The user and the host (e.g. `wp --ssh=runcommand@runcommand.io`).
 * The user, the host, and the path to the WordPress install (e.g. `wp --ssh=runcommand@
   runcommand.io~/webapps/production`). The path comes immediately after the TLD
   of the host.

Or, if you use a `~/.ssh/config`, `<host>` can be any host alias stored in the SSH
config (e.g. `wp --ssh=rc` for me).

Note you do need a copy of WP-CLI on the remote server, accessible as `wp`. Futhermore,`--
ssh=<host>` won’t load your `.bash_profile` if you have a shell alias defined, or
are extending the `$PATH` environment variable. If this affects you, [here’s a more thorough explanation](https://runcommand.io/to/wp-ssh-custom-path/)
of how you can make `wp` accessible.

### RESTful WP-CLI v0.2.0 and beyond

Today marks the release of [RESTful WP-CLI](https://github.com/wp-cli/restful) v0.2.0.
Among [43 closed issues and pull requests](https://github.com/wp-cli/restful/milestone/2?closed=1),
I’d like to highlight two new features.

First, use `wp rest (post|user|comment|*) generate` to create an arbitrary number
of any resource:

    ```
    $ wp @wpdev rest post generate --count=50 --title="Test Post"
    Generating items  100% [==============================================] 0:01 / 0:02
    ```

When working on a site locally, you often need dummy content to work with. There
are a myriad of ways custom post types can store data in the database though, so
generating dummy content can be a painstaking process. Because the WP REST APIREST
API The REST API is an acronym for the RESTful Application Program Interface (API)
that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end
of an application (think “phone app” or “website”) can communicate with the data
store (think “database” or “file system”) [https://developer.wordpress.org/rest-api/](https://developer.wordpress.org/rest-api/)
represents a layer of abstraction between the client (e.g. WP-CLI in this case) 
and the database, it’s much easier to produce a general purpose content generation
command.

In the future, I’d love to see [dummy data generated for each field based on the resource schema](https://github.com/wp-cli/restful/issues/69).

Second, use `wp rest (post|user|comment|*) diff` to compare resources between two
enviroments:

    ```
    # "command" isn't a typo in this example; "command" is a content type expressed through the WP REST API on runcommand.io
    $ wp @dev rest command diff @prod find-unused-themes --fields=title
    (-) http://runcommand.dev/api/ (+) https://runcommand.io/api/
      command:
      + title: find-unused-themes
    ```

When working with multiple WordPress environments, you may want to know how these
environments differ. Because the WP REST API represents a higher-level abstraction
on top of WordPress, computing the difference between two environments becomes a
matter of fetching the data and producing a comparison.

There are a [number of ways the diff command could be improved](https://github.com/wp-cli/restful/issues?q=is%3Aissue+is%3Aopen+label%3Acommand%3Adiff),
so consider this implementation to be the prototype.

What’s next?

More immediately, I’d like to start looking at how well RESTful WP-CLI works with
plugins and themes. If you’ve written custom endpoints for the WP REST API, [please weigh in on this Github issue](https://github.com/wp-cli/restful/issues/85)
so I can check it out.

Ultimately, the goal is for `wp rest post` to replace `wp post`, but there are many
months between here and there. In this future where WP-CLI packages are first-class
citizens amongst the commands in WP-CLI coreCore Core is the set of software required
to run WordPress. The Core Development Team builds WordPress., RESTful WP-CLI gets
to serve as a testbed for figuring out how that actually works. We shall see, we
shall see.

As always, thanks for your support!

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2016%2F07%2F20%2Frestful-wp-cli-update-4%2F%23respond&locale=en_US)

 [  ](https://profiles.wordpress.org/danielbachhuber/) [Daniel Bachhuber](https://profiles.wordpress.org/danielbachhuber/)
12:00 am _on_ June 23, 2016      

# 󠀁[The future of WP-CLI](https://make.wordpress.org/cli/2016/06/23/future-wp-cli/)󠁿

As you might be aware, WP-CLIWP-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/](http://wp-cli.org/) [https://make.wordpress.org/cli/](https://make.wordpress.org/cli/)
is an indispensable tool for many individuals and companies. We very much appreciate
our community of users (although we have no idea how many of you there actually 
are), and want to ensure our relationship is strong for the years to come.

Just over a month ago, I [started a Github issue](https://github.com/wp-cli/wp-cli/issues/2743)
with this question:

>  how do I reduce WP-CLI’s bus factor, and more generally lay a foundation for 
> WP-CLI’s long-term organizational stability?

Although things seem to be going reasonably well now, I want to make sure we’re 
taking steps towards ensuring the long-term continuity of the project. Today, Andreas(
WP-CLI’s founder) and I sat down for breakfast to discuss our options and how we
want to proceed.

Based on our conversation, we think the most important task is to reduce WP-CLI’s
bus factor and onboard one or more additional maintainers to focus on a few non-
code roles:

 * Documentation – Help ensure WP-CLI’s documentation is world-class.
 * Marketing / community management – Help spread the word about WP-CLI.
 * Support – Help WP-CLI users where they’re asking questions, let it be GithubGitHub
   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 by the repository owner. [https://github.com/](https://github.com/),
   WordPress.orgWordPress.org The community site where WordPress code is created
   and shared by the users. This is where you can download the source code for WordPress
   core, plugins and themes as well as the central location for community conversations
   and organization. [https://wordpress.org/](https://wordpress.org/), Stack Exchange,
   or elsewhere.

Contributions in these areas will always be welcome. Maintainership is a longer-
term commitment to the project, focused on ongoing improvements to the specific 
area. WP-CLI expects its maintainers to commit a few hours per week to the project.

At this time, we don’t have plans to establish a legal WP-CLI organization. We’ve
decided the operational complexities exceed the benefits. While many companies and
individuals want to donate to WP-CLI, introducing money always has the possibility
of causing more harm than good. Instead, we’ll use Kickstarter to fund larger endeavors(
e.g. a logo and website redesign) on an as-needed basis.

If you would like to become a maintainer of WP-CLI in a non-code role, please email
[info@wp-cli.org](https://make.wordpress.org/cli/page/12/info@wp-cli.org?output_format=md).
Expect to participate in a trial period of 2-3 months.

We have a Mailchimp mailing list now too. [Sign up](http://wp-cli.us13.list-manage.com/subscribe?u=0615e4d18f213891fc000adfd&id=8c61d7641e)
for email notifications of new versions and occasional announcements about the project.

Thanks,

Daniel Bachhuber, maintainer
 Andreas Creten, founder

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2016%2F06%2F23%2Ffuture-wp-cli%2F%23respond&locale=en_US)

 [  ](https://profiles.wordpress.org/danielbachhuber/) [Daniel Bachhuber](https://profiles.wordpress.org/danielbachhuber/)
12:00 am _on_ April 28, 2016      

# 󠀁[Version 0.23.1 released](https://make.wordpress.org/cli/2016/04/28/version-0-23-1/)󠁿

WP-CLIWP-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/](http://wp-cli.org/)
[https://make.wordpress.org/cli/](https://make.wordpress.org/cli/) v0.23.1 is a 
compatibility release for those who’ve installed WP-CLI with Composer and require
a minimum-stability. See [#2664](https://github.com/wp-cli/wp-cli/issues/2664) for
related conversation.

If you’re using the Phar distribution of WP-CLI, you _should_ `wp cli update`, but
don’t need to prioritize it, as the release doesn’t change WP-CLI’s behavior in 
any significant way.

Contributors to this release: [danielbachhuber](https://github.com/danielbachhuber)

You can browse the full list of [resolved issues](https://github.com/wp-cli/wp-cli/issues?q=milestone%3A0.23.1+is%3Aclosed)
on GithubGitHub 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 by the repository owner. [https://github.com/](https://github.com/).

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2016%2F04%2F28%2Fversion-0-23-1%2F%23respond&locale=en_US)

 [  ](https://profiles.wordpress.org/danielbachhuber/) [Daniel Bachhuber](https://profiles.wordpress.org/danielbachhuber/)
12:00 am _on_ April 14, 2016      

# 󠀁[RESTful WP-CLI – What I’ve been hacking on](https://make.wordpress.org/cli/2016/04/14/restful-wp-cli-update-3/)󠁿

Let me just say — Thursday, February 4th was [pretty darn demoralizing](https://twitter.com/Krogsgard/status/695634320401285121).
I spent a huge amount of time in January towards the WP REST APIREST API The REST
API is an acronym for the RESTful Application Program Interface (API) that uses 
HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application(
think “phone app” or “website”) can communicate with the data store (think “database”
or “file system”) [https://developer.wordpress.org/rest-api/](https://developer.wordpress.org/rest-api/)
in preparation for what I wanted to do on the command line, and a lot of momentum/
inspiration / general good feelings were destroyed in that meeting. As such, I spent
much of February and March working on WP-CLIWP-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/](http://wp-cli.org/) [https://make.wordpress.org/cli/](https://make.wordpress.org/cli/)
features unrelated to the WP REST API (e.g. [package management](http://wp-cli.org/commands/package/)).

But, I’m back in the saddle. Because I’m 2/3 of the way through one of those fancy
WP REST API + ReactReact React is a JavaScript library that makes it easy to reason
about, construct, and maintain stateless and stateful user interfaces. [https://reactjs.org](https://reactjs.org/)
WordPress applications, I’m running into dozens of ways I want to be able to make
WordPress more efficiently. And of course, this means doing it on the command line.

Before we proceed: most of the, if not all, RESTful WP-CLI features have required
under the hood changes to WP-CLI. You’ll want to `wp cli update --nightly` to play
with this new functionality locally. Once you’ve done so, you can `wp package install
danielbachhuber/wp-rest-cli` to install the latest.

### Use `--debug` and `--debug=rest` to profile your REST endpoints

REST APIs are all about speed. Milliseconds matter, and every one you manage to 
shave off will have a real world impact on user experience.

To make it _much_, much easier to understand how many queries your endpoint is performing,
and how long they take, I’ve added some lightweight profiling to RESTful WP-CLI.

Use `--debug` to get a summary of your queries for any command.

    ```
    $ wp rest post list --debug
    Debug (rest): REST command executed 7 queries in 0.001954 seconds. Use --debug=rest to see all queries. (1.446s)
    +----+-----------------------------+
    | id | title                       |
    +----+-----------------------------+
    | 1  | {"rendered":"Hello world!"} |
    +----+-----------------------------+
    ```

Use `--debug=rest` to get the full list of queries executed.

    ```
    $ wp rest post list --fields=id,title --debug=rest
    Debug: REST command executed 7 queries in 0.001696 seconds. Ordered by slowness, the queries are:
    1:
      - 0.000291 seconds
      - WP_REST_Posts_Controller->get_items, WP_Query->query, WP_Query->get_posts
      - SELECT SQL_CALC_FOUND_ROWS  wp_posts.ID FROM wp_posts  WHERE 1=1  AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish')  ORDER BY wp_posts.post_date DESC LIMIT 0, 10
    2:
      - 0.000257 seconds
      - WP_REST_Posts_Controller->get_items, WP_Query->query, WP_Query->get_posts, WP_Query->set_found_posts
      - SELECT FOUND_ROWS()
    3:
      - 0.000256 seconds
      - WP_REST_Posts_Controller->get_items, WP_REST_Posts_Controller->prepare_item_for_response, setup_postdata, WP_Query->setup_postdata, get_userdata, get_user_by, WP_User::get_data_by
      - SELECT * FROM wp_users WHERE ID = '1'
    4:
      - 0.000244 seconds
      - WP_REST_Posts_Controller->get_items, WP_REST_Posts_Controller->prepare_item_for_response, setup_postdata, WP_Query->setup_postdata, get_userdata, get_user_by, WP_User->init, WP_User->for_blog, WP_User->_init_caps, get_user_meta, get_metadata, update_meta_cache
      - SELECT user_id, meta_key, meta_value FROM wp_usermeta WHERE user_id IN (1) ORDER BY umeta_id ASC
    5:
      - 0.000233 seconds
      - WP_REST_Posts_Controller->get_items, WP_Query->query, WP_Query->get_posts, _prime_post_caches
      - SELECT wp_posts.* FROM wp_posts WHERE ID IN (1)
    6:
      - 0.000209 seconds
      - WP_REST_Posts_Controller->get_items, WP_Query->query, WP_Query->get_posts, _prime_post_caches, update_post_caches, update_object_term_cache, wp_get_object_terms
      - SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id  WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format') AND tr.object_id IN (1) ORDER BY t.name ASC
    7:
      - 0.000206 seconds
      - WP_REST_Posts_Controller->get_items, WP_Query->query, WP_Query->get_posts, _prime_post_caches, update_post_caches, update_postmeta_cache, update_meta_cache
      - SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (1) ORDER BY meta_id ASC
     (1.598s)
    +----+-----------------------------+
    | id | title                       |
    +----+-----------------------------+
    | 1  | {"rendered":"Hello world!"} |
    +----+-----------------------------+
    ```

Profiling works for any CRUD operation.

    ```
    $ wp rest post create --title="Test post" --user=daniel --debug
    Debug (rest): REST command executed 28 queries in 0.023962 seconds. Use --debug=rest to see all queries. (1.777s)
    Success: Created post.
    $ wp rest post update 3 --content="Foo bar" --user=daniel --debug
    Debug (rest): REST command executed 31 queries in 0.023309 seconds. Use --debug=rest to see all queries. (1.634s)
    Success: Updated post.
    ```

Hopefully this feature becomes an invaluable part of your REST endpoint development
process, as it has mine. Hit me with feedback on [its Github issue](https://github.com/danielbachhuber/wp-rest-cli/issues/42).

### Use `wp rest * edit` to edit a resource in your system editor

Most people probably don’t know this, but you can use `wp post edit <id>` to edit
post content in your system editor (e.g. vim). Now, with `wp rest * edit`, you can
edit any REST resource in your system editor.

    ```
    $ wp rest post edit 3 --user=daniel
    ```

When you run `wp rest * edit`, RESTful WP-CLI fetches the resource, transforms it
into a YAML document, and puts it in your system editor:

    ```
    ---
    date: 2016-04-14T14:02:57
    date_gmt: null
    password:
    slug:
    status: draft
    title:
      raw: Test post
      rendered: Test post
    content:
      raw: Foo bar
      rendered: |
        |
            Foo bar
    excerpt:
      raw:
      rendered: |
        |
            Foo bar
    author: 1
    featured_media: 0
    comment_status: open
    ping_status: open
    sticky: false
    format: standard
    categories:
      - 1
    tags: [ ]
    ```

If you make changes to any of the fields, then the command sends it back to WordPress(
through the WP REST API) to update.

On WordPress installs that support Basic Auth, editing also works over HTTPHTTP 
HTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol
used by the World Wide Web and this protocol defines how messages are formatted 
and transmitted, and what actions Web servers and browsers should take in response
to various commands.:

    ```
    $ wp --http=http://daniel:daniel@wordpress-develop.dev rest post edit 1
    ```

Et, voila.

### Get involved!

I’d love your input on the dozens of ideas I have for a more RESTful WP-CLI:

 * Render the help docs in formats like APIAPI An API or Application Programming
   Interface is a software intermediary that allows programs to interact with each
   other and share data in limited, clearly defined ways. Blueprint and Swagger [
   [#36](https://github.com/danielbachhuber/wp-rest-cli/issues/36)]
 * Introduce `wp rest * generate` to generate mock data in the format your application
   expects [[#55](https://github.com/danielbachhuber/wp-rest-cli/issues/55)].
 * Introduce `wp rest * diff` to be able to diff the state of two different WordPresses,
   a la [Dictator](https://github.com/danielbachhuber/dictator) [[#56](https://github.com/danielbachhuber/wp-rest-cli/issues/56)].
 * Figure out an elegant aliases implementation, so `--http=http://daniel:daniel@
   wordpress-develop.dev` becomes `@wpdev` [[#2039](https://github.com/wp-cli/wp-cli/issues/2039)]

And I want to hear your ideas too! As well as any feedback, questions, or violent
dissent. [Let’s chat on Github](https://github.com/danielbachhuber/wp-rest-cli/issues).

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2016%2F04%2F14%2Frestful-wp-cli-update-3%2F%23respond&locale=en_US)

## Post navigation

[← Older posts](https://make.wordpress.org/cli/page/13/?output_format=md)

[Newer posts →](https://make.wordpress.org/cli/page/11/?output_format=md)