Skip to content

MAMP: Macintosh, Apache, MySQL & PHP

Through Michael Doig’s excellent tutorial, I recently discovered MAMP, a free package which provides recent builds of Apache, MySQL and PHP as a standalone installation on Mac. It’s geared towards local server development on a machine, as opposed to live sites, so it’s great for testing out stuff like WordPress locally.

Unfortunately, MAMP has issues. First of all, there is no documentation or even a FAQ which addresses the simple question of how to update MAMP. After taking a hint from the MAMP forums, it turned out to be rather straightforward:

  1. Stop the servers; I did this via the MAMP widget.
  2. Backup /Applications/MAMP/htdocs/ —basically any web content that you have added or changed.
  3. Backup /Applications/MAMP/db/ —your database(s). MySQL instructions: Actually, don’t backup the default /Applications/MAMP/db/mysql/mysql/ or /Applications/MAMP/db/mysql/test/ folders, which are usually updated. Only backup the other folders and files under /Applications/MAMP/db/mysql/ which are specific to your installation.
  4. Backup other folders you had added to /Applications/MAMP/, such as a Gallery 2 data folder.
  5. Replace /Applications/MAMP/ with the newer version.
  6. Replace the content and database folders with the ones you had saved in steps 2 through 4.
  7. Uninstall the previous MAMP Dashboard widget, then install the newer version (which is located in /Applications/MAMP/). Apply any widget fixes (see below).
  8. Restart the servers, again via the MAMP widget.

Ah, and the other problem: The “Open Start Page” in the MAMP widget doesn’t do anything. (The Start Page does open if I launch MAMP.app, oddly.) I found a helpful fix at gaarf.info, where you edit mampwidget.js (in the Mamp Control widget package contents) to correct a preference file reference. Using your favorite text editor, go to line 90:

var startPage = widget.system("/usr/bin/defaults read com.webEdition.MAMP
startPage",null).outputString.replace(/[\r\n]/,"");

Change com.webEdition.MAMP to com.living-e.MAMP. Start Dashboard, hit the Manage Widgets (+) button, remove the MAMP widget (tick its ‘x’ button), then re-add it from the Manage Widgets strip. Restart servers, and the Open Start Page button now works. Whew.

I hope the MAMP folks can fix these simple issues of documentation and the widget. It’s a shame their forums seem to be plagued with spam (at least the English ones), too, which makes finding answers a bit slow.

Update (6-Nov-2006): Thanks to Holger Meyer for answering my email about upgrading!

Update (22-Feb-2007): The latest 1.5-beta1 still has the Start Page bug with the Dashboard widget. Gallery 2 and some of the WordPress plugins no longer seem to work. 🙁

Update (8-May-2007): MAMP 1.6 came out, and still has the Start Page bug with the Dashboard widget. The download now includes both the free and Pro versions of MAMP. Gallery 2 stoutly refused to run (blank page issue), but the workaround was easy: In the php.ini configuration file, increase memory_limit from 8MB to 16MB. While Gallery will run when given 12MB, the WPG2 plugin won’t work (no random image in Sidebar), unless memory_limit is set to at least 16MB.

Update (17-July-2007): Was noodling around the MAMP website and noticed that version 1.6.1 was released on 11 April 2007. Likely a typo in the date, since the files have a timestamp of 15 May 2007. The widget bug seems to be fixed at least (enfin!). The packages listed on the releases page are the same between 1.6 and 1.6.1. It’s a shame, though, that MAMP hasn’t had a more recent, thorough update to include the latest Apache, MySQL, PHP and phpMyAdmin bits (compare with the newer packages in XAMPP for OS X, a less mature OS X server bundle). You’d think they’d do that to keep the paid MAMP Pro version up to date.

8 comments

  1. WordPress › Error

    There has been a critical error on this website.

    Learn more about troubleshooting WordPress.