Skip to content

Commit

Permalink
Merge pull request #146 from shadyvb/patch-1
Browse files Browse the repository at this point in the history
Update docs to reference the new vagrant scheme
  • Loading branch information
danielbachhuber authored Oct 17, 2017
2 parents 6cacb49 + eb6964d commit 898b640
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions running-commands-remotely.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Success: Rewrite rules flushed.

You don't need to SSH into machines, change directories, and generally spend a full minute to get to a given WordPress install, you can just let WP-CLI know what machine to work with and it knows how to make the actual connection.

It can also easily utilise Vagrant's ssh helper command to figure out the SSH parameters, by piping the WP-CLI command to `vagrant ssh` using the `vagrant` scheme like `--ssh=vagrant:default` where `default` is the Vagrant machine name/id, or if defined as an alias like the examples below. Some Vagrant boxes [ship this by default](https://github.com/Chassis/Chassis/blob/master/wp-cli.yml) so you can use WP-CLI from the host machine out-of-the-box.

Additionally, alias groups let you register groups of aliases. If you want to run a command against both configured example sites, you can use a group like `@both`:

```
Expand All @@ -54,6 +56,8 @@ Aliases can be registered in your project’s `wp-cli.yml` file, or your user’
ssh: [email protected]~/webapps/production
@dev:
ssh: [email protected]/srv/www/example.dev
@local:
ssh: vagrant:default
@both:
- @prod
- @dev
Expand Down

0 comments on commit 898b640

Please sign in to comment.