# Sync database between multiple developers

**URL:** https://discourse.roots.io/t/sync-database-between-multiple-developers/5416
**Category:** trellis
**Created:** 2015-12-04T11:03:48Z
**Posts:** 4

## Post 1 by @Yast — 2015-12-04T11:03:49Z

Hello,

Currently we are developing with Trellis/Bedrock, we are 3 developers working on the same WP project. But it’s a pain maintain the database synced between us. We can’t create a DB Server inside our network, and if we use an external DB Server (DigitalOcean, AWS…) and we develop in local with the external DB settings the Wordpress becomes VERY slow, unusable…

So, ATM we are sharing DB Dumps, we start a project, someone generate the Wordpress Menus and then uploads the SQL file, the rest of developers download the file and overwrite the local databases with this… When the project is in a mature stage, the changes on the DB are not a problem, but on early stages this is a pain!

Which is the best method for doing this? I think any idea will be better than this.

Thanks

---

## Post 2 by @Twansparant — 2015-12-04T14:49:59Z

I adjusted the **Vagrantfile** a bit, so it automatically imports the database on up, resume, reload and exports it on halt, suspend, destroy. Maybe that’s a start?

> [@Keep database synced between computers in Trellis/Bedrock/Sage setup](https://discourse.roots.io/t/keep-database-synced-between-computers-in-trellis-bedrock-sage-setup/4478/12):
>
> Thanks fullyint! I read up on the Synced Folders option in Vagrant and tried adding the following line to my Vagrantfile: config.vm.synced\_folder "../db", "/var/lib/mysql/example\_wp", owner: "root", group: "root" and added the folder db in my main project folder. When running vagrant up the folder seems to be mounted correctly: ==\> default: Mounting NFS shared folders... ==\> default: Mounting shared folders... default: /vagrant =\>~/Dropbox/Websites/example/ansible default: /var/lib/…

---

## Post 3 by @duncan — 2015-12-04T15:15:09Z

There is a good plugin for syncing db that has been discussed on this forum. Sorry I’m on phone so little hard to grab the link for you

---

## Post 4 by @vdrnn — 2015-12-04T15:29:59Z

we’ve been using this plugin [WP Migrate DB Pro](https://deliciousbrains.com/wp-migrate-db-pro/) for a while.  
this is certainly not the best method, but it’s very straight forward without a lot of setting up.

Also, have a look at this thread here as well:

> [@Pushing local database to the remote with wp_cli](https://discourse.roots.io/t/pushing-local-database-to-the-remote-with-wp-cli/3160/3):
>
> I’m currently experimenting with capistrano-wpcli. It looks to be a very convenient tool to manage db and media syncing. Also, thanks for the suggestion to check database files into the repository. This will probably be a good way to always have a backup at hand.
