I’d like to run a mirrored dev environment between 2 computers. I use dropbox to sync my wordpress installs. Is there a way to do the same with the wordress database? Does Local store the db in the same parent folder as the rest of the site files (wordpress install, etc)?
I’ve used the WP Migrate DB Pro for remote > local database syncs before, but I’m not sure that would work between 2 local environments and even if it did, it would be nice to have it even more automated through local.app.
You can use the Volumes Manager add-on and make the MySQL raw data folder be exposed in Dropbox on both computers. I believe the folder you’ll want to mount is /var/mysql
This isn’t officially supported so if you have any findings and get it working we’d love if you shared how
@lessis@clay Just curious if you found a solution. I wanted to do something similar (except using Google Drive vs. Dropbox). I have my site set up on one computer. How would I go about syncing it on the other? If I add the same site with the same path, I get an error saying “site” has existing Local by Flywheel data. Please choose a different path.
I know this is not something official, but could you go further into detail for us non-server folks? I would be very happy to be able to develop locally on two synced machines. Thank.
I took a peek inside /var/mysql – seems to me it is the same as what’s inside ~/conf/mysql : just some conf data.
Still looking for a (sensible) way to get Local to be synchronized between 2 computers. No idea how to do this for the database, but just had a crazy idea involving Volumes Manager and Dropbox for the theme and site-specific plugin files.
Seconding @dgalfano’s question - I couldn’t find a way to sync a site across two computers. I tried to add a site that I have in Dropbox and got the “[path] has existing Local by Flywheel data. Please choose a different path.” error message. It looks like the database files are contained right in the /app/sql/ folder, so if there was a way to add an existing Local by Flywheel site on the other computer, it might just work. Not sure how to get past that roadblock, though.
Those files in /app/sql/ are, I think, just backup files – they’re updated only when a Local site is shut down (or exported, I’d guess). I don’t think that they would get imported in any way automatically into an existing Local install, unless we could make WP-CLI do this.
Yeah, I realized that after I posted! The files in /app/sql/ look like a database dump rather than the actual, live database files. I think my roadblock is that the database files are only in the virtual machine in /var/lib/mysql and have no equivalent location (that I can tell) on my computer in the way that the conf and log files and folders do. I ended up figuring out pretty quickly how to get the WordPress files synced between Local sites on two computers with Volumes Manager since that was as simple as mapping my /app/ folder in Dropbox to the /app/ folder on the server, but I couldn’t get the reverse direction working for the database (pulling the database folder from the server to Dropbox in order to share it across computers).
Using Volumes Manager to map folders to DropBox also has a drawback: sites exported/archived to .zip do not include the mapped files. I currently map only the theme and plugin folders I work on to Dropbox, and when duplicating/archiving a site always have to remember re-mapping said folders into the new install. Logical, of course, but not quite perfect.
Oh, and the database is still un-synched, or rather, manually “synched” using Migrate DB Pro.
Until this is something that is more easily doable with Local I’m running my local installs of WP from dropbox on my Mac that is then connected to a remote “development” database. Point the MAMP document root to dropbox on all your computers and you’re all sorted - you can pick up on a laptop where you left off all whilst developing locally…once Local does have this though please let me know!!
Bump. I assumed this would be a “no-brainer” feature when I first installed Local; that everything would be self-contained in whatever destination folder was chosen by the user. Like virtually every other application. Why the Local app’s per-site configuration isn’t stored with the site doesn’t make sense.
Thanks for these instructions. When creating the new site on second computer, do you leave the site path to default? On my original site, I have put that site path in the dropbox folder, so I’m wondering if that was a mistake that the volumes add-on instructions is trying to fix.