Skip to content

Commit 94f44e2

Browse files
committed
DESCW-3157 update bin/commands to account for different container names for wp-cli, update documentation
1 parent b90822d commit 94f44e2

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

dev/bin/commands.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ wp_stop() {
2727
# Access to the WordPress cli
2828
wp() {
2929
#cd $ROOT_PATH
30-
docker exec -it dev-wp-cli-1 wp $@
30+
# gets any container that has the image of wordpress:cli-php7.4, so wp cli can be ran on any developer instance
31+
docker exec -it $(docker ps --filter "ancestor=wordpress:cli-php7.4" --format "{{.Names}}") wp $@
3132
}
3233

3334
# Audit plugins or themes

documentation/docs/guide/GettingStarted/deploy_locally.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ This is useful for working on projects, where the database, and resources can be
142142

143143
There are two variations that can be used, one is by using the existing `.env` or by creating an alternative `.env-mysite` file in which a new location could be setup.
144144

145+
The `wp` cli might no longer work, here are the two solutions
146+
- download latest version of https://github.com/bcgov/wordpress, as it has a fix, and allows any project, to execute the `wp` cli command
147+
- manually shell into container
148+
- ```docker exec -it mysite-wp-cli-1 sh```
149+
- use the wp cli command
150+
145151
### Creating with Existing .env
146152
Choosing the existing `.env` file, the `MULTISITE` variable will need to be set to `0`, until the multi-site installation has been completed, this instance will be constrained to the same `uploads` folder structure. Possibly causing conflicts with existing assets.
147153
```sh:no-line-numbers

0 commit comments

Comments
 (0)