-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document default login credentials and
wp-env run
command (#20678)
* Document default login credentials and run command * Add more descriptive CLI help messages * Update README.md * Update wording in `run` command description * Fix typo in cli.js * Fix linting errors * Remove extra ; * Whitespace
- Loading branch information
Showing
2 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ Then, start the local environment: | |
$ wp-env start | ||
``` | ||
|
||
Finally, navigate to http://localhost:8888 in your web browser to see WordPress running with the local WordPress plugin or theme running and activated. | ||
Finally, navigate to http://localhost:8888 in your web browser to see WordPress running with the local WordPress plugin or theme running and activated. Default login credentials are username: `admin` password: `password`. | ||
|
||
### Stopping the environment | ||
|
||
|
@@ -175,6 +175,32 @@ Positionals: | |
[string] [choices: "all", "development", "tests"] [default: "tests"] | ||
``` | ||
### `wp-env run [container] [command]` | ||
```sh | ||
wp-env run <container> [command..] | ||
Runs an arbitrary command in one of the underlying Docker containers, for | ||
example it's useful for running wp cli commands. | ||
|
||
|
||
Positionals: | ||
container The container to run the command on. [string] [required] | ||
command The command to run. [array] [default: []] | ||
``` | ||
For example: | ||
```sh | ||
wp-env run cli wp user list | ||
⠏ Running `wp user list` in 'cli'. | ||
|
||
ID user_login display_name user_email user_registered roles | ||
1 admin admin [email protected] 2020-03-05 10:45:14 administrator | ||
|
||
✔ Ran `wp user list` in 'cli'. (in 2s 374ms) | ||
``` | ||
## .wp-env.json | ||
You can customize the WordPress installation, plugins and themes that the development environment will use by specifying a `.wp-env.json` file in the directory that you run `wp-env` from. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters