Skip to content

Commit b94a42b

Browse files
authored
Merge pull request #1030 from infosiftr/wp-cli
Add a simple description of the WP-CLI variants
2 parents aed2762 + 507edb7 commit b94a42b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

wordpress/variant-cli.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## `%%IMAGE%%:cli`
2+
3+
This image variant does not contain WordPress itself, but instead contains [WP-CLI](https://wp-cli.org).
4+
5+
The simplest way to use it with an existing WordPress container would be something similar to the following:
6+
7+
```console
8+
$ docker run -it --rm \
9+
--volumes-from some-wordpress \
10+
--network container:some-wordpress \
11+
wordpress:cli user list
12+
```
13+
14+
Generally speaking, for WP-CLI to interact with a WordPress install, it needs access to the on-disk files of the WordPress install, and access to the database (and the easiest way to accomplish that such that `wp-config.php` does not require changes is to simply join the networking context of the existing and presumably working WordPress container, but there are many other ways to accomplish that which will be left as an exercise for the reader).

0 commit comments

Comments
 (0)