wordpress-docker-compose
wordpress-docker-compose copied to clipboard
wp-cli not working until the database is created manually
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 please share your yaml file
try something like in the end volumes let me know.
volumes: db: