visiblevc / wordpress-starter

A slightly less shitty wordpress development workflow
688 stars 167 forks source link

Dumping the development db gives error: No such file or directory #141

Closed MariusStuparu closed 6 years ago

MariusStuparu commented 6 years ago

Hello,

I have adapted (mostly, blatantly copied) the main files inside my project, and everything works fine (WP is up and running). But I get an error when trying to create a db dump:

docker-compose exec wordpress /bin/bash 'wp db export /data --allow-root'

gives this error:

bin/bash: wp db export /data/ --allow-root: No such file or directory

I have the /[my-project]/data/ folder, and everything else is mostly the dafault.

I'm runnig Docker 18.05.0-ce-mac67 on MacOS 10.13.6

dsifford commented 6 years ago

Try adjusting your command to this and let me know if that works...

docker-compose exec wordpress /bin/bash -c 'wp db export /data --allow-root'
MariusStuparu commented 6 years ago

It was actually docker-compose exec wordpress /bin/bash -c 'wp db export /data/mysqldump.sql --allow-root' (the filename is needed). But it works now, thanks.

dsifford commented 6 years ago

Great. Glad you got it sorted out.

Of note, you shouldn't need allow-root with the lastest image unless explicitly running sudo.

PabloDinella commented 6 years ago

I think README should be updated :)

dsifford commented 6 years ago

PRs accepted

PabloDinella commented 6 years ago

Done: https://github.com/visiblevc/wordpress-starter/pull/145