MAMP without MAMP

February 24, 2012

For a couple of years now, I’ve used, and advocated using, the MAMP application as the easiest way to run a Web server on a Mac. Currently, the best argument for MAMP is that it doesn’t affect the built-in Apache. This also means that changes to the built-in Apache (via Mac OS X software updates) don’t impact your setup, as can happen if you modify and configure how the built-in Apache runs. Although MAMP itself is free, in time I went ahead and purchased MAMP Pro. MAMP Pro is just a better interface to the MAMP stack, in particular providing an easy way to establish virtual hosts, which I use extensively (i.e., I create a new virtual host for each client or personal project). But I think it’s now time to start doing MAMP—Mac OS X, Apache, MySQL, and PHP—without MAMP, the application. Let’s look at the history and the options here to understand why it may be time for a switch.

I’ve been using Apple computers for thirty years now: I first learned how to program with Basic on an Apple IIe. My first Mac computer was purchased in 1994, a Color Classic. This was a few years before I begin my life as a programmer and Web developer. As a Mac user, and as a Web developer, I was so thrilled when Apple made the big switch in 2001 to Mac OS X, which is by far the most user-friendly version of Unix (Mac OS X uses a version of FreeBSD as its core). With Mac OS X, the same software running on Web servers also runs equally well on my home computer (and many of my clients run Mac servers, too). The specific software is the *AMP stack: Apache, MySQL, and PHP.

For the first several years, I always used the built-in Apache that came with the operating system, and then installed MySQL and PHP separately (Marc at provided the best PHP installer). Then, a couple of years ago, Mac OS X began using a 64-bit version of Apache by default. This requires a 64-bit version of PHP, which requires 64-bit versions of all the associated libraries. Which wasn’t happening. Many PHP developers were stymied by Apple’s switch to a 64-bit Apache. One solution was to have the Mac run the 32-bit version of Apache instead of the 64-bit, which required some command-line tinkering. Fortunately, there was a better alternative: MAMP, which is also free.

The MAMP application installs Apache, MySQL, PHP, phpMyAdmin, and a couple of other niceties, separate from your built-in software. MAMP then slaps on a simple interface for starting and stopping them all, and adds a wee bit of possible configuration. Because of the issues with the built-in 64-bit Apache, I began using MAMP, and even started recommending it in my books. In time, I went ahead and purchased MAMP Pro, which provides an even better interface for controlling the same MAMP stack of applications. With MAMP Pro, you can easily create virtual hosts, set up an outgoing mail server, apply DNS, and more. Mostly, I purchased MAMP Pro because I had been using MAMP long enough that I thought it time I support the application. And that’s when I started second-guessing MAMP…

First, the paid version of MAMP comes with no more documentation or support than the free version, which is pretty much just wrong. For example, I had to enter my administrative password every time I started or stopped MAMP, which shouldn’t be necessary (and is annoying). I searched online, tried a couple of things: to no avail. MAMP Pro now allegedly comes with email support but no support was forthcoming when I first stated with MAMP Pro. In short, I realized that MAMP Pro isn’t giving you much for the $60 (USD) it costs, but I had already purchased MAMP Pro and had been using it for years, so I could live with that decision.

Another problem with MAMP is that it’s a bit of a pain to upgrade and they do released updates frequently enough to make it a factor. You have to copy out the database directory, install the new version, and then move the database directory back. I would think MAMP could come up with a better system, because the risk of wiping out all of your databases (and sites, if you place those within the MAMP directory) is far too high.

The next hiccup with MAMP is that they recently released version 2, which was a paid upgrade. MAMP 2 provides a couple of new features, but not a lot, and costs half the price of the original to upgrade. That may not be a lot compared to, say, upgrading an Adobe product, but remember that MAMP is just a package and an interface to a slew of free software. I’ve been holding off on upgrading, and then…

The final straw was that I needed to use a version of PHP with a couple of extra modules enabled. When I went searching online, I came across a number of excellent ways to install PHP on my Mac that don’t cost any money. Those are…

  • AMPPS is a stack of Apache, MySQL, PHP, Perl, and Python. It runs on both Windows and Mac OS X, and is free. It’s not foolproof to install but documentation and support are available. The AMPPS control panel makes it very easy to configure Apache, PHP, and MySQL (e.g., change the version of PHP or what modules are loaded). And AMPPS comes with the ability to install many different software packages, such as WordPress.
  • Brian Gilbert posted an article at RealityLoop that explains how to install MySQL and PHP (PHP built from the source code) In a second article, Gilbert explains how to setup Gmail as an SMTP server.
  • Finally, what I’ll personally start using the most is a new PHP package for Macs, based upon the classic one. It worked flawlessly for me, and is well designed. It uses the built-in Apache, and doesn’t include MySQL, however, so you’ll have to install that separately (which is easily done). But this package is easier to install than building PHP from source. (For more information on this package, see this blog post.)

I’ll also add that if you, like me, really make use of virtual hosts, but don’t want the hassle of setting them up manually, you can consider VirtualHostX. It costs $30 (USD), but that’s still half the price of MAMP Pro. Personally, I’m just inclined to create virtual hosts manually anymore.

So there you have a quick long discussion of using Apache, MySQL, and PHP on your Mac. Mostly I feel that MAMP created an excellent, free product, that was a major asset to the Mac community for years. But the commercial product lacked many attributes that commercial applications should have. It’s been years now, and MAMP has yet to make the MAMP Pro application as professional as it should be. And so, it’s time for a switch, I think.

If any other Mac Web developers out there have any thoughts on the subject, I’d love to hear them.