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

---

 [  ](https://profiles.wordpress.org/danielbachhuber/) [Daniel Bachhuber](https://profiles.wordpress.org/danielbachhuber/)
11:46 pm _on_ June 28, 2017      

# 󠀁[Good first issues for new contributors](https://make.wordpress.org/cli/2017/06/28/good-first-issues-for-new-contributors-2/)󠁿

Want to submit your first pull request 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/)?
We’ve identified a few good first issues for you to get your feet wet:

 * [Mention and document use of `tee` in “Save command output” section of Shell friends](https://github.com/wp-cli/handbook/issues/79)
   `
   tee` is a useful utility if you want to capture _and_ display output from a command.
   For this issue, you’ll get to explore how `tee` works, and share your learnings
   in the WP-CLI documentation.
 * [Flag to skip populating wp-config.php with the multisite constants](https://github.com/wp-cli/core-command/issues/11)
   
   The default behavior of `wp core multisite-install` is to modify `wp-config.php`
   to include the 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/)
   constants. It would be helpful to have a `--skip-config` flag to support skipping
   this behavior.
 * [Indicate files included from wp-config.php when running ](https://github.com/wp-cli/config-command/issues/11)`
   [wp config get](https://github.com/wp-cli/config-command/issues/11)`
    `wp config
   get` is a new command that shows you globals and constants defined in `wp-config.
   php`. It would be helpful if it also showed you files included from `wp-config.
   php` so, for instance, you could see which environment-specific configuration
   file was being included.
 * [Implement `--all` flag for ](https://github.com/wp-cli/entity-command/issues/18)`
   [wp post term delete](https://github.com/wp-cli/entity-command/issues/18)`
    If
   you want to remove all terms of a given 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).
   from a post, it’d be nice to have an `--all` flag to do so.

[Read through the contributing guide](https://make.wordpress.org/cli/handbook/contributing/)
for details on how to get started, or join us in the [#cli channel](https://wordpress.slack.com/messages/C02RP4T41/)
with any questions you might have.

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2017%2F06%2F28%2Fgood-first-issues-for-new-contributors-2%2F%23respond&locale=en_US)

 [  ](https://profiles.wordpress.org/schlessera/) [Alain Schlesser](https://profiles.wordpress.org/schlessera/)
10:42 am _on_ June 25, 2017      

# 󠀁[WordCamp Europe 2017 Contributor Day Recap](https://make.wordpress.org/cli/2017/06/25/wordcamp-europe-2017-contributor-day-recap/)󠁿

On Thursday, June 15th, WordCampWordCamp WordCamps are casual, locally-organized
conferences covering everything related to WordPress. They're one of the places 
where the WordPress community comes together to teach one another what they’ve learned
throughout the year and share the joy. [Learn more](https://central.wordcamp.org/about/).
Europe 2017 in Paris had the very first Contributor DayContributor Day Contributor
Days are standalone days, frequently held before or after WordCamps but they can
also happen at any time. They are events where people get together to work on various
areas of [https://make.wordpress.org/](https://make.wordpress.org/) There are many
teams that people can participate in, each with a different focus. [https://make.wordpress.org/support/handbook/getting-started/getting-started-at-a-contributor-day/](https://make.wordpress.org/support/handbook/getting-started/getting-started-at-a-contributor-day/)
where 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/)
was officially represented as a separate team that people could contribute to.

On the official WordCampe Europe 2017 website, you can find the [organization information that was sent to the attendees](https://2017.europe.wordcamp.org/2017/05/17/everything-you-need-to-know-about-wceu-contributor-day/).

To get a sense of the event, you can visit the [Contributor Day album by Olivier Gobet on Flicker](https://www.flickr.com/photos/gd6d/albums/72157682186520382).

### Team Attendance

Over the course of the day, there were a dozen contributors joining the team to 
work on WP-CLI. Considering that the command line is not a mainstream topic in the
WordPress world and that the team has only recently been officially added, we can
consider this a success in itself.

After a small introductory round, it was clear that all of the contributors had 
prior experience with WP-CLI, either making regular use of it or even having already
done development against it. This meant that we could skip the basic introduction
and immediately dive into a more technical analysis of how the tool and its packages
are architected.

We then split the team into two groups, depending on what the individual contributors
preferred to work on: one group focussing on commands, and the other group focussing
on the framework itself. The main difference between these two is the skill set 
needed: for the commands, the development closely mimics regular WordPress development,
whereas for the framework, WordPress has not been loaded yet and the development
is closer to pure 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)
console development.

### Things That Worked Well

Once we’ve split up the teams, we went through the [Good First Issues](https://make.wordpress.org/cli/good-first-issues/)
page, and everyone was quickly able to find something to work on. This was a definite
success, as I’ve often attended Contributor Days where some people were lost during
the entire day, not really knowing where to focus their efforts on.

The fact that the code is managed through git and 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/)
was well received by the contributors, as it made issue discovery easier and allowed
for faster feedback cycles.

What made everything run smoothly as well was the fact that the contributors to 
join this team were mostly of above average technical proficiency. This meant that
technical issues that were encountered were quickly taken care of, with people helping
each other out, and there has even been an impromptu introductory session to test-
driven development (TDD) by one of the contributors as well.

### Things That Need To Be Improved

We are still facing some issues with the contributor onboarding process, mostly 
around documentation and testing.

One problem we faced was the fact that it is not obvious for most contributors that
they need to create a test database first before being able to run the functional
tests. Documentation could be clearer on this step, and we might even provide a 
hint in the console when the tests are being run without access to a database.

Another source of confusion was that there are different conventions (workflows,
file names, …) of how to proceed depending on whether you want to work on a command,
or the framework itself. This should all be streamlined so that every single `wp-
cli` package will have the exact same requirements and support the same workflows.

### Au Revoir

Big thanks to the organizing team of WordCamp Europe in Paris for the additional
efforts they went through in order to find a space for our brand-new team! Although
we hadn’t been included in the original planning (when they didn’t yet know about
the WP-CLI team), we had a flawless experience and felt welcome as an integral part
of the WordPress project.

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2017%2F06%2F25%2Fwordcamp-europe-2017-contributor-day-recap%2F%23respond&locale=en_US)

 [  ](https://profiles.wordpress.org/danielbachhuber/) [Daniel Bachhuber](https://profiles.wordpress.org/danielbachhuber/)
12:38 pm _on_ June 6, 2017      

# 󠀁[Version 1.2.1 released](https://make.wordpress.org/cli/2017/06/06/version-1-2-1-released/)󠁿

As it turns out, refactoring can introduce bugs. Who knew?!

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.2.1 fixes 
a few regressions introduced in [v1.2.0](https://make.wordpress.org/cli/2017/05/31/version-1-2-0-released/):

 * Properly registers commands to existing namespaces when defined by plugins [[#4123](https://github.com/wp-cli/wp-cli/pull/4123),
   [#4130](https://github.com/wp-cli/wp-cli/pull/4130)].
 * Restores compatibility with using WP-CLI as a dependency of a Composer-based 
   WordPress install [[#4126](https://github.com/wp-cli/wp-cli/pull/4126)].
 * Only forces use of `/usr/bin/mysql` on *nix systems [[#4132](https://github.com/wp-cli/wp-cli/pull/4132)].
 * Improves wordwrapping by using total columns in terminal, instead of an arbitrary
   width [[#4133](https://github.com/wp-cli/wp-cli/pull/4133)].

Want to help us catch these bugs earlier? Run `wp cli update --nightly` in your 
local and staging environments to use the latest and greatest.

**Contributors to this release (4 total):** [danielbachhuber](https://github.com/danielbachhuber),
[gitlost](https://github.com/gitlost), [schlessera](https://github.com/schlessera),
[szepeviktor](https://github.com/szepeviktor)

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

 [  ](https://profiles.wordpress.org/danielbachhuber/) [Daniel Bachhuber](https://profiles.wordpress.org/danielbachhuber/)
8:11 pm _on_ May 31, 2017      

# 󠀁[Version 1.2.0 released](https://make.wordpress.org/cli/2017/05/31/version-1-2-0-released/)󠁿

Happy release day!

After 325 merged pull requests, we’re 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/) v1.2.0, chock
full of enhancements, bug fixes… and a bootstrap refactor.

But first…

## We have a new logo!

Coming soon to a laptop near you:

![](https://i0.wp.com/make.wordpress.org/cli/files/2017/05/wp-cli-cropped.png?resize
=363%2C208&ssl=1)

Thanks to Chris Wallace and the crew at [Lift UX](https://liftux.com/) for their
work, as well as everyone who responded to my pings about feedback.

## Commands abstracted to distinct packages

We’ve split up the project!

The main `wp-cli/wp-cli` repository now only contains the framework itself. All 
of the bundled commands can be found in separate repositories. For instance, the`
wp cache *` series of commands are now located at [github.com/wp-cli/cache-command](https://github.com/wp-cli/cache-command).

This abstraction provides a few benefits:

 * While developing, the tests are only run for the specific component you’re working
   on, making the feedback loopLoop The Loop is PHP code used by WordPress to display
   posts. Using The Loop, WordPress processes each post to be displayed on the current
   page, and formats it according to how it matches specified criteria within The
   Loop tags. Any HTML or PHP code in the Loop will be processed on each post. [https://codex.wordpress.org/The_Loop](https://codex.wordpress.org/The_Loop)
   much shorter.
 * Individual command packages can be controlled and set up independently, opening
   up the opportunity for better collaboration.
 * Hotfixes and intermediary releases can be published for individual commands, 
   that can then be updated through the built-in package manager.
 * Tests run really fast now.
 * When you submit a pull request, you don’t have to wait two hours for the tests
   to run.

For those using WP-CLI via Composer, you can contribute improvements to packages
as you’d normally contribute to Composer dependencies. Use `composer install --prefer-
source` to install dependencies as 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/) clones.

For those using WP-CLI via Phar downloadable, you can contribute improvements by
installing the package (which will override the bundled version). For instance, 
with the cache command, this is:

    ```
    $ wp package install git@github.com:wp-cli/cache-command.git
    $ cd $(wp package path wp-cli/cache-command)
    ```

Check out [#3728](https://github.com/wp-cli/wp-cli/issues/3728) for the original
history. For a better understanding of the underlying infrastructure, read Alain’s
posts about the [new bootstrapping mechanism](https://make.wordpress.org/cli/2017/05/17/new-bootstrapping-mechanism-to-load-the-wp-cli-framework/),
[managing command dependencies](https://make.wordpress.org/cli/2017/05/03/managing-command-dependencies/)
and [dependency resolution mechanisms](https://make.wordpress.org/cli/2017/05/31/command-dependencies-revisited/).

## Next up: Contribution workflow

The investments in package abstraction and the bootstrap process are a part of our
larger effort to improve the contribution workflow.

Ultimately, we’d like to make contributing to the project:

 * **Effortless.** While understanding the WP-CLI codebase does require a certain
   technical knowledge, those who can contribute to the codebase should be able 
   to do so with as little overhead as possible.
 * **Enjoyable.** Making improvements to WP-CLI should be fun and rewarding. For
   contributors, this means well-defined entry points, sufficient workflow documentation,
   clearly-articulated vision, roadmap, and decision-making process, and so on.

For new contributors, we now have a [Good First Issues page](https://make.wordpress.org/cli/good-first-issues/):

[[

For committers, we now have the [beginnings of a customized dashboard](https://make.wordpress.org/cli/dash/):

[[

Work on the contribution workflow is an on-going process. We’ve barely scratched
the surface.

Expect to see lots efforts on some of the key areas that make up the contributor
experience:

 * Articulation of the decision making process for transforming ideas into new commands.
   We need to identify how we can sustainably transform [ideas](https://github.com/wp-cli/ideas/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc)
   into maintained packages.
 * Improving the onboarding of new committers through documentation, tools and processes.
   Read the [Committers credo](https://make.wordpress.org/cli/handbook/committers-credo/)
   to better understand our expectations.

Join the conversation during our weekly office hours, [Tuesday, April 25 at 16:00 UTC](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20170425T1600),
or at WordCampWordCamp WordCamps are casual, locally-organized conferences covering
everything related to WordPress. They're one of the places where the WordPress community
comes together to teach one another what they’ve learned throughout the year and
share the joy. [Learn more](https://central.wordcamp.org/about/). Europe.

## New commands

Want to sanity check your `wp-config.php`? Use `wp config get` list constants and
globals defined in `wp-config.php` [[#9](https://github.com/wp-cli/config-command/pull/9)]

    ```
    $ wp config get --fields=key,value
    +--------------------+-----------------+
    | key                | value           |
    +--------------------+-----------------+
    | table_prefix       | wp_             |
    ```

Don’t want to remember where `wp-config.php` is on your filesystem? Use `wp config
path` to get the path to `wp-config.php` [[#7](https://github.com/wp-cli/config-command/pull/7)]

    ```
    # Edit wp-config.php in your editor.
    $ vim $(wp config path)
    ```

Curious how much your database weighs? Run `wp db size` to get the size of the database
and its tables [[#16](https://github.com/wp-cli/db-command/pull/16)]

    ```
    $ wp db size --tables
    +-----------------------+--------+
    | Name                  | Size   |
    +-----------------------+--------+
    | wp_users              | 64 KB  |
    | wp_usermeta           | 48 KB  |
    | wp_posts              | 4 MB   |
    | wp_comments           | 2 MB   |
    | wp_links              | 32 KB  |
    | wp_options            | 1 MB   |
    | wp_postmeta           | 8 MB   |
    | wp_terms              | 416 KB |
    | wp_term_taxonomy      | 336 KB |
    | wp_term_relationships | 736 KB |
    | wp_termmeta           | 48 KB  |
    | wp_commentmeta        | 2 MB   |
    +-----------------------+--------+
    ```

## Everything else in v1.2.0

**Command improvements**

 * `wp core install`:
    - Generates 18 character password for admin user [[#4002](https://github.com/wp-cli/wp-cli/pull/4002)].
 * `wp cron event run`:
    - Only runs specified events when `$args` are passed with `--due-now` [[#11](https://github.com/wp-cli/cron-command/pull/11)].
 * `wp db *`:
    - Uses `/usr/bin/env mysql` instead of `mysql` when calling 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/)
      executable [[#14](https://github.com/wp-cli/db-command/pull/14)].
 * `wp db (drop|reset)`:
    - Presents database name to confirmation prompts for `wp db drop` and `wp db
      reset` commands [[#12](https://github.com/wp-cli/db-command/pull/12)].
 * `wp db export`:
    - Adds `--exclude_tables=<tables>` option when exporting a database [[#20](https://github.com/wp-cli/db-command/pull/20)].
 * `wp db import`:
    - Speeds up import process by disabling auto-commit and (unique and foreign)
      key checks [[#3829](https://github.com/wp-cli/wp-cli/pull/3829)].
 * `wp language core install`:
    - Processes `--activate` flag even when language is already installed [[#3851](https://github.com/wp-cli/wp-cli/pull/3851)].
 * `wp language core (install|uninstall)`
    - Permits multiple languages to be installed or uninstalled at the same time[
      [#4](https://github.com/wp-cli/language-command/pull/4), [#5](https://github.com/wp-cli/language-command/pull/5)].
 * `wp media import`:
    - Error handling is improved in a variety of ways [[#3755](https://github.com/wp-cli/wp-cli/pull/3755)].
 * `wp media regenerate`:
    - Deletes existing PDF preview images upon regeneration [[#3824](https://github.com/wp-cli/wp-cli/pull/3824)].
    - Fixes media regeneration when an image has a dimension smaller than a registered
      image size [[#5](https://github.com/wp-cli/media-command/pull/5)].
    - Adds `--image_size=<size>` to regenerate a specific image size [[#9](https://github.com/wp-cli/media-command/pull/9)].
 * `wp menu location assign`:
    - Increases verbosity and error reporting [[#3852](https://github.com/wp-cli/wp-cli/pull/3852)].
 * `wp package *`:
    - Fixes path returned from `get_composer_json_path()` under Windows [[#11](https://github.com/wp-cli/package-command/pull/11)].
 * `wp plugin install`:
    - Disables renaming behavior when installing from 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/) raw ZIP URLs [[#3823](https://github.com/wp-cli/wp-cli/pull/3823)].
 * `wp plugin update`:
    - Introduces `--minor` and `--patch` flags for limiting updates based on semantic
      versioning [[#13](https://github.com/wp-cli/extension-command/pull/13)].
    - Displays correct error when 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. fails to update [[#3803](https://github.com/wp-cli/wp-cli/pull/3803)].
 * `wp (plugin|theme) update`:
    - Adds `--exclude=<name>` argument to exclude plugins or themes from updating[
      [#16](https://github.com/wp-cli/extension-command/pull/16)].
 * `wp post term *`:
    - Introduces `--by=id` argument to explicitly handle terms as ids [[#3896](https://github.com/wp-cli/wp-cli/pull/3896)].
    - Pluralizes messages based on term count [[#3898](https://github.com/wp-cli/wp-cli/pull/3898)].
 * `wp rewrite *`:
    - Warns user when managing rewrites with `--skip-plugins` or `--skip-themes`,
      because rewrites may be missing [[#3917](https://github.com/wp-cli/wp-cli/pull/3917)].
 * `wp scaffold (child-theme|_s)`:
    - Includes a default `.editorconfig` based on 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. [[#3902](https://github.com/wp-cli/wp-cli/pull/3902)].
 * `wp scaffold plugin-tests`
    - Variety of improvements to scaffolded `.travis.yml` and `circle.yml` [[#3919](https://github.com/wp-cli/wp-cli/pull/3919)].
    - Caches Composer in scaffolded `.travis.yml` [[#3816](https://github.com/wp-cli/wp-cli/pull/3816)].
    - Installs PHPUnit `4.8.*` for 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.*`, and PHPUnit `5.7.*` for everything else [[#6](https://github.com/wp-cli/scaffold-command/pull/6)].
    - Tests PHP 7 versions in scaffolded `circle.yml` [[#16](https://github.com/wp-cli/scaffold-command/pull/16)].
 * `wp server`:
    - Permits environment variables to define a specific PHP binary [[#3868](https://github.com/wp-cli/wp-cli/pull/3868)].
 * `wp user create`:
    - Generates 24 character password for new users [[#7](https://github.com/wp-cli/entity-command/pull/7)].
 * `wp user import-csv`:
    - Disables coreCore Core is the set of software required to run WordPress. The
      Core Development Team builds WordPress.’s email notifications when updating
      a user [[#3904](https://github.com/wp-cli/wp-cli/pull/3904)].

**Framework enhancements**

 * Symfony 3.x components can be used with WP-CLI. We didn’t even need to break 
   backwards-compatibility [[#4067](https://github.com/wp-cli/wp-cli/pull/4067)].
 * New hooksHooks In WordPress theme and development, hooks are functions that can
   be applied to an action or a Filter in WordPress. Actions are functions performed
   when a certain event occurs in WordPress. Filters allow you to modify certain
   functions. Arguments used to hook both filters and actions look the same.:
    - `before_add_command:<parent command>` lets you check runtime requirements 
      before adding a command
    - `after_add_command:<parent command>` lets you depend on a specific parent 
      command before triggering a given functionality [[#4033](https://github.com/wp-cli/wp-cli/pull/4033)]
 * Automatic command dependency resolution. If a sub-command depends on a parent
   command not yet registered, the addition of this sub-command is deferred until
   the parent is available [[#4094](https://github.com/wp-cli/wp-cli/pull/4094)].
 * Spelling suggestions. If you mistype a command, WP-CLI will now be smart enough
   to make suggestions about what you probably wanted to type, and suggest these
   corrected spellings. This helps with discovery and error resolution. Suggestions
   are provided for commands, parameters and aliases [[#4004](https://github.com/wp-cli/wp-cli/pull/4004),
   [#4008](https://github.com/wp-cli/wp-cli/pull/4008), [#4109](https://github.com/wp-cli/wp-cli/pull/4109)]
 * Help documentation wordwraps to 80 characters by default. It wordwrapped previously,
   but inconsistently so it was often broken [[#4105](https://github.com/wp-cli/wp-cli/pull/4105)].
 * Variety of testing framework improvements:
    - Variables are replaced in subdirectory paths [[#4085](https://github.com/wp-cli/wp-cli/pull/4085)].
    - Forces `RUN_DIR` deletion, safely, to ensure Behat doesn’t hang on cleanup[
      [#4112](https://github.com/wp-cli/wp-cli/pull/4112)].
    - Terminates all launched background processes in a cross-platform compatible
      manner [[#4074](https://github.com/wp-cli/wp-cli/pull/4074)].
    - Only applies `@require-wp` tags when `WP_VERSION` isn’t ‘latest’ or ‘nightly’
      to ensure full test suite is run in these contexts [[#4055](https://github.com/wp-cli/wp-cli/pull/4055)].

**Contributors to this release (43 total):** [1naveengiri](https://github.com/1naveengiri),
[aaemnnosttv](https://github.com/aaemnnosttv), [afragen](https://github.com/afragen),
[balbuf](https://github.com/balbuf), [behzod](https://github.com/behzod), [carl-alberto](https://github.com/carl-alberto),
[CodeProKid](https://github.com/CodeProKid), [danielbachhuber](https://github.com/danielbachhuber),
[davgothic](https://github.com/davgothic), [diablodale](https://github.com/diablodale),
[diggy](https://github.com/diggy), [dnmvisser](https://github.com/dnmvisser), [fjarrett](https://github.com/fjarrett),
[flaskboy](https://github.com/flaskboy), [geekoun](https://github.com/geekoun), 
[gitlost](https://github.com/gitlost), [hason](https://github.com/hason), [JayWood](https://github.com/JayWood),
[jeremyfrady](https://github.com/jeremyfrady), [ka7](https://github.com/ka7), [kcarwilemiller](https://github.com/kcarwilemiller),
[lichtscheu](https://github.com/lichtscheu), [mbovel](https://github.com/mbovel),
[MiteshShah](https://github.com/MiteshShah), [miya0001](https://github.com/miya0001),
[Nikschavan](https://github.com/Nikschavan), [ntwb](https://github.com/ntwb), [petenelson](https://github.com/petenelson),
[rahul3883](https://github.com/rahul3883), [raquelmsmith](https://github.com/raquelmsmith),
[Rarst](https://github.com/Rarst), [ryanshoover](https://github.com/ryanshoover),
[schlessera](https://github.com/schlessera), [Sidsector9](https://github.com/Sidsector9),
[SosyalAlkolik](https://github.com/SosyalAlkolik), [ssnepenthe](https://github.com/ssnepenthe),
[Steveorevo](https://github.com/Steveorevo), [tfrommen](https://github.com/tfrommen),
[tillkruss](https://github.com/tillkruss), [timdream](https://github.com/timdream),
[trepmal](https://github.com/trepmal), [wp-make-coffee](https://github.com/wp-make-coffee),
[zacksheppard](https://github.com/zacksheppard)

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

 [  ](https://profiles.wordpress.org/schlessera/) [Alain Schlesser](https://profiles.wordpress.org/schlessera/)
10:06 am _on_ May 31, 2017      

# 󠀁[Command dependencies revisited](https://make.wordpress.org/cli/2017/05/31/command-dependencies-revisited/)󠁿

As I already described in [Managing command dependencies](https://make.wordpress.org/cli/2017/05/03/managing-command-dependencies/),
we have added two hooksHooks In WordPress theme and development, hooks are functions
that can be applied to an action or a Filter in WordPress. Actions are functions
performed when a certain event occurs in WordPress. Filters allow you to modify 
certain functions. Arguments used to hook both filters and actions look the same.
that allow developers to explicitly state what type of requirements need to be fulfilled
before loading their custom command.

This works just fine when you know about these hooks and make proper use of them.

But there’s a large number of third-party commands out there already that are not
yet making use of these new hooks, obviously. As we want to provide a safe update
path, we had to look into providing a mechanism for the commands that might break
due to the bootstrapping and package distribution changes.

### Automatic dependency resolution to the rescue

As it turns out, having these hooks available makes it very easy to solve the dependency
resolution in a fully automated way.

If a sub-command depends on a parent command that is already registered, or if a
command does not have a dependency at all, we add the command immediately, just 
as before. This is the standard behavior.

If a sub-command depends on a parent command that is not yet registered, adding 
the sub-command immediately would just break. Imagine wanting to add a `scaffold
my-plugin` sub-command, when the `scaffold` command has not yet been registered.
In this case, we hook up the sub-command addition to the `after_add_command:<parent
command>` hook, and add the command to the list of deferred command additions.

Once we add a deferred command when its hook has been triggered, we remove that 
command from the list of deferred command additions.

If we processed all commands, any remaining additions on the list of deferred command
additions are executed as a final step. This is needed for sub-commands like `network
meta`, where the parent does not actually exist (and thus, the `after_add_command:
<parent command>` hook is never called).

### Backward compatibility and ease of use

With the above mechanism, all current commands that relied on the fact that bundled
commands were always loaded first will still work, even if the bundled commands 
might now be loaded later, due to the fact that all bundled commands have been split
out into their own packages.

What’s more, any command depending on any other command will now just work, no matter
what the loading order is, as long as both commands are loaded eventually.

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2017%2F05%2F31%2Fcommand-dependencies-revisited%2F%23respond&locale=en_US)

 [  ](https://profiles.wordpress.org/schlessera/) [Alain Schlesser](https://profiles.wordpress.org/schlessera/)
11:22 am _on_ May 30, 2017      

# 󠀁[X-posting Proposal: WordPress Community Conduct Project](https://make.wordpress.org/cli/2017/05/30/x-posting-proposal-wordpress-community-conduct-project/)󠁿

Please read + comment on the original post.

> [Proposal: WordPress Community Conduct Project](https://make.wordpress.org/updates/2017/05/19/proposal-wordpress-community-conduct-project/)

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2017%2F05%2F30%2Fx-posting-proposal-wordpress-community-conduct-project%2F%23respond&locale=en_US)

 [  ](https://profiles.wordpress.org/schlessera/) [Alain Schlesser](https://profiles.wordpress.org/schlessera/)
6:59 pm _on_ May 17, 2017      

# 󠀁[New bootstrapping mechanism to load the WP-CLI framework](https://make.wordpress.org/cli/2017/05/17/new-bootstrapping-mechanism-to-load-the-wp-cli-framework/)󠁿

The upcoming 1.2.0 release 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/)
will include a refactored bootstrapping flow that provides a more flexible way of
loading the framework itself and setting everything up. This refactoring is needed
to allow for some of the expected functionality to work in conjunction with bundled
commands being provided through external packages and the general use of autoloading(
[Issue #3850](https://github.com/wp-cli/wp-cli/issues/3850) | [Pull Request #3872](https://github.com/wp-cli/wp-cli/pull/3872)).

## What does the term “bootstrapping” mean?

In general terms, bootstrapping code is code that is not part of the actual logic
meant to solve the problem, but rather code that is needed to prepare the environment
so that the actual logic is able to run.

This usually means locating files and folders, setting constants, reading configuration,
etc…

## What problem does this change solve?

The current stable release has all bundled commands be part of the `wp-cli/wp-cli`
repository as a big monolithic package. This has several drawbacks, like having 
a huge testsuite be run for every single change to the framework (and waiting for
2 hours on feedback from the tests), and coupling the update frequency of these 
commands to the framework itself (making a quick hotfix to one single command difficult).

To get around these problems, we’ve extracted all of the commands into separate 
repositories that exist on their own, come with their own testsuites and have their
own release cycles. To be able to profit from these decoupled release cycles, though,
you need to be able to update a bundled command independently of the framework. 
This means that the act of loading the framework needs to be strictly separate to
the act of loading the bundled commands.

The new bootstrapping mechanism separates the procedural list of load operations
into a set of isolated steps for which the order can be freely defined.

## General flow

After defining some constants to locate the needed files, WP-CLI will load the bootstrap
component and call the `WP_CLI\bootstrap()` function ([source](https://github.com/wp-cli/wp-cli/blob/85e639e34ed18ec1b6e4a5a71eac5de7e37c4a5c/php/wp-cli.php#L15)).

This function defines a list of bootstrapping steps that will then be loaded and
processed in the provided order ([source](https://github.com/wp-cli/wp-cli/blob/85e639e34ed18ec1b6e4a5a71eac5de7e37c4a5c/php/bootstrap.php#L68-L77)).

The list of bootstrapping steps is a basic array of fully qualified class names (
[source](https://github.com/wp-cli/wp-cli/blob/85e639e34ed18ec1b6e4a5a71eac5de7e37c4a5c/php/bootstrap.php#L17-L32)).
Each of the classes implements the `WP_CLI\Bootstrap\BootstrapStep` interface, meaning
that it provides a `process( BootstrapState $state )` method ([source](https://github.com/wp-cli/wp-cli/blob/85e639e34ed18ec1b6e4a5a71eac5de7e37c4a5c/php/WP_CLI/Bootstrap/BootstrapStep.php#L21)).

## Bootstrap steps

When the `process( BootstrapState $state )` method of a `WP_CLI\Bootstrap\BootstrapStep`
object is being called, that object will execute its tasks to take care of its responsibilities
and then return the (potentially modified) `$state`.

Each step works in isolation, so that they can be added/removed/rearranged as needed.

The current code does not allow for the list of steps to be modified from outside
code yet, while we collect data and feedback about this new mechanism. However, 
if we feel confident about the reliability and usefulness, we might open up the 
array of steps for modification with a later release. If you feel you have a valid
use case for such modifications to the bootstrapping process, please let us know!

## Bootstrap state

The `WP_CLI\Bootstrap\BootstrapState` object that is being passed from one step 
to the next is a very basic key-value store. It currently only knows about one key,`
BootstrapState::IS_PROTECTED_COMMAND`, which is used to skip certain steps when 
dealing with protected commands ([source](https://github.com/wp-cli/wp-cli/blob/85e639e34ed18ec1b6e4a5a71eac5de7e37c4a5c/php/WP_CLI/Bootstrap/BootstrapState.php#L20)).

The only protected command right now is `wp cli info` ([source](https://github.com/wp-cli/wp-cli/blob/85e639e34ed18ec1b6e4a5a71eac5de7e37c4a5c/php/WP_CLI/Bootstrap/DefineProtectedCommands.php#L40)).
This protection means that loading of external command packages and `--required`
files is skipped, so that the command can not be overridden. In this way, you can
always be sure that the `wp cli info` command is indeed the one provided by the 
framework.

## Split autoloader

The current implementation uses a custom Composer 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. to split the Composer autoloader
provided by the `wp-cli/wp-cli` package into two separate autoloaders ([source](https://github.com/wp-cli/autoload-splitter)).
This is needed to allow autoloaders from external command packages to take precedence
over the bundled commands. Otherwise, you would not be able to update bundled commands
through the built-in package manager.

This is only a workaround to get around the fact that the “WP-CLI Framework” would
actually need to be a separate repository from the “bundled WP-CLI”. If the repositories
themselves should be split at a later date, this custom Composer plugin will not
be needed and removed again. So don’t rely on this plugin or the functionality it
provides to be available.

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2017%2F05%2F17%2Fnew-bootstrapping-mechanism-to-load-the-wp-cli-framework%2F%23respond&locale=en_US)

 [  ](https://profiles.wordpress.org/schlessera/) [Alain Schlesser](https://profiles.wordpress.org/schlessera/)
6:45 am _on_ May 3, 2017      

# 󠀁[Managing command dependencies](https://make.wordpress.org/cli/2017/05/03/managing-command-dependencies/)󠁿

A combination of changes we are currently working on – putting all commands into
external packages as well as making the 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/)
bootstrapping process more flexible – made it obvious that we need to deal with 
command dependencies in one way or another. As an example, the `scaffold package`
command depends on the `scaffold` command to be already registered. Both are provided
through external packages, though. If they are loaded in the wrong order, adding
the `scaffold package` command will not work as expected.

Therefore, the current nightly includes a new mechanism for dealing with these command
dependencies. This is achieved through a pair of new hooksHooks In WordPress theme
and development, hooks are functions that can be applied to an action or a Filter
in WordPress. Actions are functions performed when a certain event occurs in WordPress.
Filters allow you to modify certain functions. Arguments used to hook both filters
and actions look the same.:

### Before adding a command – check requirements

**`before_add_command:<command>`**

The main purpose of this hook is to allow you to check runtime requirements at the
moment the command would be added.

The callback you provide will have a `WP_CLI\Dispatcher\CommandAddition` object 
be provided as the first argument. This object has a method `abort( $reason )` that
you can use to prevent the command from being added. The reason that you provide
is not yet being used, but the plan is to display this reason in the help screen
so that users have feedback about why certain commands are unavailable.

_Usage example:_

    ```
    WP_CLI::add_hook( 'before_add_command:db', function ( $addition ) {
        if ( ! $this->database_is_available() ) {
            $addition->abort(
                'The db command needs a working connection to the database.'
            );
        }
    } );
    ```

### After adding a command – load dependent commands

**`after_add_command:<command>`**

This hook is used to have one command depend on a different command being loaded
first. The main use case is when you add a new sub-command to a parent command located
in a different package. As you cannot simply depend on loading order, you can wrap
the addition of this sub-command in the `after_add_command:<command>`  hook.

_Usage example:_

    ```
    WP_CLI::add_hook( 'after_add_command:scaffold', function () {
        WP_CLI::add_command( 'scaffold package', 'WP_CLI\ScaffoldPackageCommand' );
    } );
    ```

### Future considerations

These two hooks allow commands to be built in a more robust way and open up new 
possibilities for the future.

One of the goals we currently discuss is to have the help screen display unavailable
commands together with the reason why the command has been disabled. This provides
valuable feedback to the user and might even point to the next action for resolving
the issue.

Also, getting rid of some of the run-time errors that let WP-CLI fail without even
showing a help screen can potentially be defused through these hooks as well. A 
simple requirements check before adding a command can then display a warning, and
avoid adding the command that would throw an error.

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2017%2F05%2F03%2Fmanaging-command-dependencies%2F%23respond&locale=en_US)

 [  ](https://profiles.wordpress.org/danielbachhuber/) [Daniel Bachhuber](https://profiles.wordpress.org/danielbachhuber/)
12:40 pm _on_ April 25, 2017      

# 󠀁[Good first issues for new contributors](https://make.wordpress.org/cli/2017/04/25/good-first-issues-for-new-contributors/)󠁿

Want to submit your first pull request 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/)?
We’ve identified a few [good first issues](https://github.com/issues?q=is%3Aopen+sort%3Aupdated-desc+org%3Awp-cli+label%3Agood-first-issue)
for new contributors to get their feet wet:

 * [Update ISSUE_TEMPLATE to mention abstracted commands](https://github.com/wp-cli/wp-cli/issues/3912)
   
   Now that we’ve abstracted all WP-CLI coreCore Core is the set of software required
   to run WordPress. The Core Development Team builds WordPress. commands to a series
   of distinct packages, we need to update `.github/ISSUE_TEMPLATE` to point reporters
   to the corresponding package.
 * [Clarify error message for incorrect ‘DOMAIN_CURRENT_SITE’](https://github.com/wp-cli/wp-cli/issues/4015)
   
   If someone has an incorrect value for the `DOMAIN_CURRENT_SITE` constant in their`
   wp-config.php`, we should communicate that `DOMAIN_CURRENT_SITE` doesn’t match
   any registered blogs.
 * [Mention database name when confirming operation](https://github.com/wp-cli/db-command/issues/2)
   
   When confirming an operation in the `wp db *` set of commands, it would be helpful
   to indicate the database name in the confirmation prompt.
 * [Create a `wp config path` command to get the path to wp-config.php](https://github.com/wp-cli/config-command/issues/5)
   
   It should print the path in a fashion similar to `wp package path`.
 * [Improve “Submitting a bug report” to clarify on what additional detail can be helpful](https://github.com/wp-cli/handbook/issues/26)
   
   Some details from April’s “Write the Docs” newsletter that would be good to work
   into our documentation.

[Read through the contributing guide](https://make.wordpress.org/cli/handbook/contributing/)
for details on how to get started, or join us in the [#cli channel](https://wordpress.slack.com/messages/C02RP4T41/)
with any questions you might have. Office hours are today, [Tuesday, April 25 at 16:00 UTC](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20170425T1600)

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2017%2F04%2F25%2Fgood-first-issues-for-new-contributors%2F%23respond&locale=en_US)

 [  ](https://profiles.wordpress.org/danielbachhuber/) [Daniel Bachhuber](https://profiles.wordpress.org/danielbachhuber/)
2:19 pm _on_ April 3, 2017      

# 󠀁[New co-maintainer, Alain — thanks 2017 sponsors](https://make.wordpress.org/cli/2017/04/03/new-co-maintainer-alain-thanks-2017-sponsors/)󠁿

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/) welcomes its 
second maintainer, thanks to the support of our 2017 sponsors.

## New co-maintainer: Alain Schlesser

First, I’d like to formally welcome [Alain Schlesser](https://www.alainschlesser.com/)
as WP-CLI’s newest co-maintainer. If you’ve been following the project over the 
last month, you may have noticed him diving deep into WP-CLI’s internals. We’re 
excited about the infrastructural improvements coming in the next release, and the
new features they’ll enable.

Alain is new to the WordPress community, and brings years of experience developing
for other platforms, from hobby game development to large enterprise projects in
a government environment.

> I’m wildly excited about the opportunity to join Daniel and work on WP-CLI. This
> project represents a special facet of the WordPress ecosystem and comes with a
> unique set of requirements and challenges. I can’t wait to explore the possibilities!
> —
> Alain

With Alain joining the project as a co-maintainer, the WP-CLI project is restoring
capacity to meet current demands (e.g. [support](https://make.wordpress.org/cli/2017/03/17/new-support-venue-wordpress-org-support-forum/)),
and ramping up on new feature development and evangelization. We’ve already improved
the build time by 33%!

Come say hello to Alain at our new office hours every Tuesday. Office hours start
tomorrow, [Tuesday, April 4 at 16:00 UTC](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20170404T1600)

## Thanks 2017 sponsors

Maintaining an 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. project requires
a substantial, ongoing commitment of time and energy. WP-CLI is a dependable tool
loved by thousands because it’s actively maintained, which is made possible by the
generosity of its sponsors.

### Premier Sponsors

[[

[[

[[

[[

[[

### Individual Sponsors

Aaron Jorbin, Anant Shrivastava, Andy Fragen, Austin Ginder, Barry van Someren, 
Ben Meredith, Ben Welch-Bolen, Bill Christensen, Birgit Pauli-Haack, Bjørn Johansen,
Boone Gorges, Carl Hancock, Chuck Reynolds, Craig Martin, Daniel Hüsken, David Herrera,
David McDonald, Doruk Fisek, Drew Linsalata, Dwayne McDaniel, Erik Joling, Full 
Name, Hidetaka Okamoto, Hugh McGuire, Ian Johnson, Jared Atchison, Jason Conroy,
Javi, Javier Arnáez, Jeremiah J Terhark, Joel Gaeddert, John Speed, Jonathan Bossenger,
Jonathan Daggerhart, Joost de Valk, Joshua Koenig, Kevin Cristiano, Knight Tan, 
Matt Gross, Matthew Lawrence, Mike Garrett, Miya0001, Ned Zimmerman, Nicholas Duncan,
Nick Cernis, Patrick Garman, Per Søderlind, Pippin Williamson, Rachel Baker, Rahul
Bansal, Ralf Hortt, required gmbh, Richard Aber, Rick Wiggins, Robert Mathews, Rocket
Lift In., Ross Wintle, Ryan Sullivan, Sean Hayes, Simon Blackbourn, Steph Gray, 
Tadpole Collective, Tanner, Thiana Kitrilakis, Thorsten Ott, Vlad Olaru, WP Bullet,
Yash Chandra

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcli%2F2017%2F04%2F03%2Fnew-co-maintainer-alain-thanks-2017-sponsors%2F%23respond&locale=en_US)

## Post navigation

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

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