-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new section about how to run commands remotely. #89
Conversation
running-commands-remotely.md
Outdated
|
||
WP-CLI accepts an `--ssh=<host>` global parameter for running a command against a remote WordPress install. | ||
|
||
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Giving the format spec [<user>@]<host>[:<port>][<path>]
would be good. Mentioning it's similar to scp
and git
. Mentioning port
in list. And "to the WP-CLI installed" perhaps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added these changes. I rewrote the examples, as the "list all combinations" did not make any sense with the added port.
running-commands-remotely.md
Outdated
|
||
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. | ||
|
||
Additionally, alias groups let you register groups of aliases. If I want to run a command against both configured example sites, I can use a group like `@both`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe stick with "you" rather than using "I" here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
|
||
## Making WP-CLI accessible on a remote server | ||
|
||
Running a command remotely through SSH requires having `wp` accessible on the `$PATH` on the remote server. Because SSH connections don’t load `~/.bashrc` or `~/.zshrc`, you may need to specify a custom `$PATH` when using `wp --ssh=<host>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention ~/.ssh/environment
as an option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a mention and a link to relevant docs.
@danielbachhuber Yes, agree regarding the long sidebar. This should be discussed in #87 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very educational example!
@danielbachhuber Ok to merge this, provided we discuss the layout of the entire content structure in #87 ? |
Yep, works for me. |
Add new section about how to run commands remotely.
No description provided.