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.
has this been figured out? would like to do this on google drive if possible.
Would like to bump this thread - if someone could figure this out it would literally be the ultimate WP dev environmentâŚ
Agreed. Would literally change everything about how I develop.
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!!
I recently tested this with Local on macOS (Faster Docker Volumes enabled) and it works. You have to use the Volumes add-on mentioned before.
Before going into what I did, here are some important notes:
-
This is not supported! Do not complain if and when things break
- Do not run the site on both computers at the same time. You will run into nasty conflict files and then have to use InnoDBâs recovery functionality.
- To reiterate, stop the site on one computer before running the site on another computer
- Wait for Dropbox to sync prior to starting the sites!
Hereâs what I did:
- Created a site I want to share with multiple computers via Dropbox
- Right-clicked on the site and then went to âOpen Site SSHâ
- Entered
cp -r /var/lib/mysql /mysql-backup
- With the Volumes add-on under âMoreâ, I pointed
/app
to a folder in Dropbox named something like~/Dropbox/site-name/app
- Added a new mount pointing to
/var/lib/mysql
in the container and set~/Dropbox/site-name/mysql-raw
as the host folder - Right-clicked on the site and went to âOpen Site SSHâ again
- Entered
rm -rf /var/lib/mysql/*
- Entered
cp -r /mysql-backup/* /var/lib/mysql
- Restart the site
- Once you verify itâs working right you can SSH in again and
rm -rf /mysql-backup
to remove that folder
That will set the site up to start syncing with Dropbox.
Now, on the other computer youâll need to:
- Wait for Dropbox to sync!
- Create a new site with the same exact domain as the one on the other
- Use the Volumes add-on to link
/app
and/var/lib/mysql
like before - You should be good to go after that. If not, restart the site.
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.
Thanks again for the help!
Site path doesnât matter on the second site since youâll be remapping it with the Volumes add-on. I would just keep it as the default.
I followed the steps just so that I could move everything over to Dropbox while developing. That said, whenever I restarted the site I now see Error establishing a database connection.
Whenever I click on connect to Adminer to check the database I see no such file or directoryâŚ
I still have the mysql backup so hopefully iâm not totally screwed
Iâd check the MySQL log in the logs
directory for clues.
Yes I have two designers that work on these sites - is it possible to share the root folders on same network? idk any thoughts on how this works?
Hey, i followed @clay instructions and it works, only thing here is that You need to turn on âFaster Docker Volumesâ in app preferences - advanced.
Is there an issue with using Flywheel as the bridge? I.e. Develop on computer A, push to Flywheel using Local on computer A, pull from Flywheel using Local on computer B?
Not ideal, have to pay for that site on the server, but would this not be a viable way of bouncing dev between two machines?
I used to run this setup with MAMP, not sure if itâs possible with LBF but it seems close.
So we have 3 computers - one acts as the server (computer 1), I develop on another one (computer 2) and our second developer was on a third computer (computer 3).
We had MAMP running on the 3 computers.
Computer 1 had the site setup on it⌠but all we needed was the database. We then copied the files to computers 2 and 3.
Then on computers 2 and 3 we changed the wp-config.php file to point at computer 1âs database by doing:
/** MySQL hostname */
define( 'DB_HOST', '192.168.1.75:3306' );
So the database was always in sync between us. We then used GIT to sync the files between us.
Iâve tried something similar with LBF by changing the configs on computers 2 and 3 to point at the database on computer 1:
/** MySQL hostname */
define( 'DB_HOST', '192.168.95.100:4002' );
(All those details are in the LBF dashboard)
It canât connect to the database though. Is there a way to change the config to point to another computers database?
Hi, I can sync files across 2 machines using the volumes add-on, but Iâm unsure on how exactly you used mapping to sync the database. I canât find a âlet me hold your hand through the stepsâ tutorial any where, is the reason because you feel itâs a bad idea to sync databases, and youâd rather we didnât? Thank you.
Ok, itâs working, databases are syncing thanks to you. I plan on making a YouTube tutorial, donât worry, Iâll make it absolutely clear that this is not supported! I think flywheel has the potential to easily be the number one leader in this field, that is, the go to solution for devs to set up their local projects. Thanks guys, and please, find a way to start charging some money for this lol!
Any recent updates on this? To recap, Iâd like to be able to store my sites currently under development entirely in Dropbox so that I can work on my iMac or MacBook Pro as necessary, always having the latest changes.
Iâm primarily a designer, not a developer, so Clayâs command line instructions above are just north of my pay grade. Hoping for a slightly more automated solution.
Hey @Collin â
With the new releases of Local ( the 5.x
line of releases ) this sort of thing should be much easier to accomplish, however there will still be an issue of re-importing the database on the different machines.
If you havenât done so yet, go ahead and download and install the most recent version of Local from the Releases category her in the Forums:
From there, you should be able to create a new site and store it somewhere like a Dropbox folder. Then, whenever the site is stopped, the database will be exported to sql
files within the sql
folder for the site.
This will mean that the files and database dump will be syncing, however, youâll need to re-import the database from the sql
files when you change environments.
This is probably the most tricky part if you arenât using the command line, or some other tool to import the DB since there are so many possible ways of going about this.