Local Community

Merge live and local databases

I’m using MagicSync for the first time. Woot. I successfully pulled the live site to my local device. I’m editing locally (code and database) but realized the client is also making database edits (on certain pages) to the live site. Can MagicSync resolve these? Or does MagicSync replace the entire database?

Sorry if this is answered somewhere else. I tried finding an answer.

MagicSync can’t help with this sort of situation where there are changes being made to both the remote site’s database and the Local site’s database.

This is mostly due to how WordPress stores much of its data within the wp_posts table, and therefore, the various post id’s can get jumbled up depending on how the various plugins/themes use those post ids.

Honestly, the best solution for this at this time is to use a dedicated tool like Migrate DB Pro:

Other tips that I recommend is to in general, make all content related changes (or as much as possible) on the remote site. Treat the remote site as the source of truth and then only pull in the DB changes from the remote site.

Another tool that I think is really cool, but not quite ready for production environments is Versionpress:


Again, I wouldn’t use it in production just yet, but if you are curious about tinkering with something that should eventually solve for the things you bring up in this topic, it might be a cool thing to take a look at!