Add wp-cli and abra wp
command #2
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Looks like
wp-cli
may or may not be added to upstream image eventually: https://github.com/docker-library/wordpress/issues/283In the mean-time, it's relatively easy to use another container:
https://medium.com/@tatemz/using-wp-cli-with-docker-21b0ab9fab79
But we'd have to expose
/var/www/html
as a volume :(Add `abra wp` commandto Add wp-cli and `abra wp` commandHaving gritted our teeth and plumped for a
/var/www/html
volume, the magic recipe for runningwp
commands is:export CONTAINER_ID=$(DOCKER_CONTEXT=swarm.example.com docker container ls -f 'Name=example_com_app' --format '{{ .ID }}'); DOCKER_CONTEXT=swarm.example.com docker run -it --volumes-from "$CONTAINER_ID" --network "container:$CONTAINER_ID" wordpress:cli wp search-replace --path=/var/www/html https://old.domain https://new.domain
Wow, That's A Big Command-Line! 😸