Guestpost: Sync Magento websites with MAMP and Dropbox on your Macs
If you’re anything like me, the confines of 4 walls is unpalatable. So you opt for working at the local coffee shop, book store or even the beach where there are signs of life other than your own pulse. But how can we do that when our work is so dependent on having an internet connection? Simple. With a couple of Macs, three apps and about an hour, you can cut the cord — the Ethernet cord that is.
What you’ll need:
- 2+ Macs
- A Dropbox account (dropbox.com)
- MAMP or MAMP Pro (mamp.info)
- SymbolicLinker 2.0 (macupdate.com)
- The latest Magento build (magentocommerce.com)
Preparing your directories for syncing Magento files on your first machine:
- Install MAMP (or optionally MAMP Pro)
- Install Dropbox: when prompted, choose to change the location of the Dropbox folder. Place the folder in /Users/Shared rather than a specific user.
“Why,” you ask, “should I put it in the Shared folder rather than the user folder?”
There is a very good reason for it. The path will be used in Magento’s configure.php file so the path needs to remain consistent whether you are working one Mac or another. If you use two different usernames, naturally that would be a problem; the path would work on one machine and not the other. You can always opt to create a user that is named exactly the same on all of your machines. - Now that you have your Dropbox folder, create a directory inside of it for site files, you can name it whatever you’d like.
- Now open MAMP and click the “Preferences” button. Go to the Apache tab and change the document root to: /Users/Shared/Dropbox/YOUR-SITE-DIRECTORY/.
(In MAMP Pro, change you disk location to: /Users/Shared/Dropbox/YOUR-SITE_DIRECTORY/.) If you don’t see the Disk Location box, look at the top left and make sure you are on the Hosts tab rather than the Server tab.
Preparing the databases for syncing on your first machine:
- Download and install SymbolicLinker 2.0
- Create db directory in Dropbox directory, you can name it whatever you’d like.
- Ctrl + Click (or Right Click if you have that option) on the db directory you just created in Dropbox and choose “Make Symbolic Link”.
- Open a finder window and go to: Applications/MAMP/db. Copy the contents of the MAMP db directory to the database directory you made in your Dropbox.
(In MAMP Pro, the databases are in a different directory: /Library/Application Support/appsolute/MAMP PRO). - Delete the /db directory in /MAMP directory
(In MAMP PRO /Library/Application Support/appsolute/MAMP PRO). - Move db symbolic link you have created to /MAMP
(In MAMP PRO /Library/Application Support/appsolute/MAMP PRO). - Rename the Symbolic Link to: db (the same name of the MAMP db directory you deleted).
And finally, let’s sync those other machines…
- Repeat steps 1-2 and 4-5 on your other Mac(s). You can skip step 3 because you already created the directory in Dropbox and it will automatically sync.
- Ctrl + Click (or Right Click if you have that option) the database directory you already created in Dropbox when setting up your first machine and choose “Make Symbolic Link”.
- Open a finder window and go to: Applications/MAMP/db. Delete the MAMP /db directory.
(In MAMP Pro, delete the /db directory in: /Library/Application Support/appsolute/MAMP PRO). - Move the Symbolic Link for the database directory from your Dropbox directory to: Applications/MAMP/
(In MAMP Pro, move it to: /Library/Application Support/appsolute/MAMP PRO). - Rename the Symbolic Link to: db
- Create your database with phpMyAdmin
- Add Magento files to your new website directory in Dropbox and install Magento as you normally would.
Done. Dropbox needs a few minutes to sync depending on how much there is to sync. Take this time to pack your beach bag and don’t forget the sunscreen.
This is a guestpost from Cristina Solana, originally posted at magazine.joomla.org about Joomla! MAMP and Dropbox. This post is slightly rewritten to make it work for Magento.
Related posts:
I'm passionate about helping your business to improve its online user experience and persuasiveness. I can help you by advising and helping you with usability, testing, persuasion, behavioral targeting & my knowledge of Magento. 








