wordpress-docker-compose icon indicating copy to clipboard operation
wordpress-docker-compose copied to clipboard

wp-cli not working until the database is created manually

Open trenccan777 opened this issue 2 years ago • 1 comments

When I run wp db create I'm getting /usr/local/bin/docker-entrypoint.sh: line 11: exec: db: not found. When I install database manually the wp command suddenly work and I can do commands like wp db check and etc. But when I drop the database with wp db drop and run wp db create, empty database is created. But from that point doesn't work any command and I'm getting again /usr/local/bin/docker-entrypoint.sh: line 11: exec: db: not found or when I run wp core version I'm getting /usr/local/bin/docker-entrypoint.sh: exec: line 11: core: not found.

When I again create the database manully by installing trough wordpress main screen, everything work's just fine.

My OS is Ubuntu 22.04. Thank you.

trenccan777 avatar Aug 09 '22 13:08 trenccan777

@trenccan777 please share your yaml file try something like in the end volumes let me know. volumes: db:

mughalmuneeb786 avatar Oct 24 '23 19:10 mughalmuneeb786