Closed andrewhavens closed 7 years ago
@andrewhavens This project has wp-cli
preinstalled. If you have it installed on your production server as well, all you need to do is wp db export db.sql
to run a MySQL dump, then copy the file from your production server to your local ./data
directory (I use rsync
for this because it's the fastest), then if you build from scratch, the database will automatically be imported. If you're not building from scratch (and assuming your ./data
directory is listed as a volume) all you would need to do is docker exec app_wordpress_1 /bin/bash -c 'wp db import /data/db.sql'
.
I'm just getting started using this project, and am fairly new to both Docker and Wordpress development (though I am an experienced Ruby/JavaScript developer). I'm wondering if any of you are using some sort of script to export then import your production database in a way that is compatible with this docker setup. I came across
wordmove
but it doesn't seem compatible withwordpress-starter
/Docker, but I could be wrong.Anyway, if anyone has a script like this, I would appreciate if you could share it. Also, I think providing a configurable script like this out-of-the-box could be beneficial to others as well.