MAMP development across computers via Dropbox

I use the following MAMP PRO setup for testing and development. It lets me sync data and host information across my computers, so that I have access to my local setup1 no matter where I’m working. This assumes some knowledge of basic UNIX commands, Terminal, and MAMP, and starts from scratch.

First, install and run MAMP on your primary computer. Verify that MySQL is running, and then stop the servers and quit MAMP.

In your Dropbox directory, create a directory called MAMP; this will hold all of MAMP-related files.
mkdir ~/Dropbox/MAMP

Move MySQL to Dropbox

Move your MAMP PRO db directory into your ~/Dropbox/MAMP directory.

You are moving databases! Backup your data first.

mv /Library/Application\ Support/appsolute/MAMP\ PRO/db ~/Dropbox/MAMP/

Symlink the previous location of the db directory to the new Dropbox location.

ln -s ~/Dropbox/MAMP/db /Library/Application\ Support/appsolute/MAMP\ PRO/db

Set up databases

Start MAMP and create a database in phpMyAdmin for each of your desired test servers.

Set up localhost

Create an htdocs folder in your MAMP directory for storing your localhost web site and set it up as the document root.

Set up hosts

Create a directory for each of your test domains in your MAMP directory, and add it as the document root for that host in MAMP PRO.

Set up name resolution

No need to do anything — MAMP PRO will handle changes to the hosts file for you when you start your servers.

If you are running Gas Mask, make sure that “Override external modifications” is not checked in Gas Mask > Preferences > General.

Make sure that Dropbox is synced completely, then stop the servers and quit MAMP.

Set up a secondary computer

Make sure that Dropbox has synced completely before beginning setup. Install and run MAMP; verify that MySQL is running, and then stop the servers and quit MAMP.

Remove the existing MAMP database directory.

You are removing databases! Anything here that is not backed up will be gone forever.

rm -rf /Library/Application\ Support/appsolute/MAMP\ PRO/db

Symlink the previous location of the db directory to the new Dropbox location.

ln -s ~/Dropbox/MAMP/db /Library/Application\ Support/appsolute/MAMP\ PRO/db

Start MAMP, start the servers, and verify in phpMyAdmin that you are looking at the correct set of databases.

Set up your hosts, pointing their document root at the existing Dropbox directories.

MAMP PRO should handle your name resolution.


  1. Running multiple concurrent instances of MAMP off the same database across Dropbox is bad, m’kay? Really bad. Don’t do it. 

6 responses to “MAMP development across computers via Dropbox

  1. Pingback: MAMP Pro mit Dropbox auf mehreren Geräten synchronisieren

  2. Pingback: MAMP Pro mit Dropbox auf mehreren Geräten synchronisieren