MAMP Pro

September 11, 2010 — 25 Comments

I primarily use a Mac for everything I do (and by “primarily” I mean just about 99.9% of the time), and have for years. I’m not trying to start an argument over the best computer, I’m just saying I like the Mac. One of the main reasons I prefer Macs is that it’s Unix (based on Free BSD, since the creation of Mac OS X) without being too Unix-y. For many people I know and work with—great with computers but not a geek, it’s easy to appreciate the nice interface and reliability and features and so forth, without an awareness of the underlying Unix stuff. For me, who regularly works with Web servers, I can do anything on my personal computer just the same as I can on a Web server. When I develop projects on my computer, transferring them to a Web server is completely smooth process. But why is this post about MAMP Pro?

For years, Mac OS X was a 32-bit operating system with a 32-bit version of Apache included. When Mac OS X went to 64-bit, a couple of years back, it started including the 64-bit Apache, too. This caused some problems with PHP, because PHP wasn’t ready as a 64-bit version (or, more specifically, some of the libraries PHP uses weren’t 64-bit ready). Like many people on a Mac, I used Marc’s PHP installer to update my version of PHP, rather than build my own (with some exceptions, like when I wanted to play with PHP 6). So, for some time, it was challening getting PHP to play along nicely with Apache on Mac OS X (one option was to tell Mac OS X to run the 32-bit Apache by default). It’s at this time that I started using MAMP.

MAMP is a all-in-one MySQL, PHP, and Apache installer for Mac OS X (for Windows, XAMPP is the most common equivalent). In my opinion, there are three great things about MAMP:

  • It just works.
  • It doesn’t conflict with the built-in Apache.
  • It’s free.

Really, my only complaint is that MAMP doesn’t, by default, store the databases in a separate directory. If MAMP were to store the databases (MySQL and SQLite) elsewhere, upgrading the version of MAMP wouldn’t overwrite the existing databases. This isn’t a big problem, but would be a nice feature to use. (Conversely, it’s easy in MAMP to use a different directory for the Web files; I use the Sites folder in my home directory, which is more in keeping with the standard of not putting user files in /Applications.)

MAMP comes in a free version that I’ve been using, happily, for years. I’ve thought about upgrading to the Pro version off and on, but, when looking at the features, didn’t see the need. One feature MAMP Pro offers is the ability to use dynamic DNS to serve your sites from your computer, even if your IP address changes regularly (which is the case for most home access). This is not something I do or recommend others do (at the very least, it’s probably a violation of most ISP’s terms). But just the other day I needed a Web site to actually send out email, even while testing it on my computer. I came across a quick fix for MAMP (non-Pro) but that didn’t work for me. So I finally upgraded to MAMP Pro, which I really had intended to do by now anyway (as an act of supporting a product that I value that’s made available for free).

It turns out that I’m so glad I upgraded to MAMP Pro. The cost was $59 (US), which was slightly high, but not unreasonable. MAMP Pro is does not install a new or different version of Apache, PHP, or MySQL, it’s just a nicer interface to the MAMP installation. That may not sound significant, but the interface let’s you control MAMP more easily. For example, the basic MAMP interface looks like this, plus its moderate preferences panel:

MAMP Standard Interface

MAMP Standard Interface

MAMP Standard Preferences

MAMP Standard Preferences

The MAMP Pro interface has many more options. The highlights are:

  • Quickly enabling outgoing mail (even if using a custom SMTP server)
  • Dynamic DNS, as already mentioned (not that I’ll use it)
  • Fine control over all logs, including an easy way to view them (great debugging feature!)
  • Checkboxes for enabling/disabling Apache modules
  • And more
MAMP Pro Interface

MAMP Pro Interface

But what MAMP Pro does, which I was unaware of but appreciate most, is make it really easy to create virtual hosts. I’m frequently working on multiple Web sites at one time. With MAMP standard, to switch back and forth, I had to go into the MAMP panel and change the server directory, then restart MAMP. And when I went to look at another site, I had to repeat this process. With MAMP Pro I just create virtual hosts: somesite1 points to this directory; somesite2 points to this one, etc. Then I just go to http://somesite1:8888 in my Web browser or http://somesite2:8888, etc.

MAMP Pro Virtual Hosts

MAMP Pro Virtual Hosts

For each virtual host, I can also tweak the server settings:

MAMP Pro Virtual Hosts Settings

MAMP Pro Virtual Hosts Settings

This is very useful and it makes me wish I had purchased MAMP Pro a long time ago (and no, I’m not getting paid by MAMP to say this; I have no relationship with them at all). To be clear, MAMP Pro is just a sophisticated interface and there’s nothing that MAMP Pro can do that you can’t do yourself by editing the proper configuration files, going into the command line, etc. These days, for me, I’d rather spend the $59 (US) and have something working the way I need it to, quickly and easily, then to spend a frustrating hour trying to get the right syntax to work in a configuration file.

I consider myself to be pretty cheap, preferring not to spend money if at all possible (my policy is: the money I don’t spend today is money I’ll have not to spend tomorrow). But sometimes it’s worth it to part with some cash. I just learned that MAMP Pro is one of those times.

If you enjoyed this post, then please consider following me using your favorite social media, the RSS feed, and/or by subscribing to my newsletter. Or go crazy, and buy one or more of my books . Thanks!

25 responses to MAMP Pro

  1. Thank you Larry for the info!
    Indeed, it worths a try.
    Take great care!

  2. Nice article. Against spending money unnecessarily also, I’m trying to find out if using MAMP Pro would allow me to host a wordpress site to be used as an intranet with my small workgroup of 7 people. I know it’s really meant for testing development but I’m trying to avoid shelling out money for an OSX Server license.

    • Thanks, Chris. Not to dissuade you, but certainly you could setup WordPress on an intranet without MAMP or MAMP Pro or an OS X Server license. Mac OS X alone has everything you need.

  3. Hi Larry…

    I’ve purchased MAMP PRO and whenever trying to launch PRO I keep getting the message: “The file /etc/hosts couldn’t be written.”

    There isn’t much about this on the MAMP forum http://tinyurl.com/4bbg3hm and I’ve searched for help on this for a while now and have just about run out of ideas. Have you ever encountered this issue with someone else? Any thoughts?

    Thanks!

    John

    • Yeah…I love what MAMP and MAMP PRO can do (i.e., provide an easy MAMP solution for Macs) but their support is…um…lacking. I find it strange that the error would reference /etc/hosts, as that file should affect the built-in version of Apache, not the one that comes with MAMP. Is there anything odd about your installation of MAMP?

      • i have the same problem. and no idea.
        did you find a solution John? Or have you any idea Larry? i have spent hours to fix it. chown, chmod, everything, reset hosts-file. no effect

        • Sorry, Oliver, I’ve not experienced this problem, so have no idea what the cause is or what the fix is.

          • MAMP pro is touchy about permissions, but the situation is easily fixed. Just use the Finder to select to the root folder for your site and type COMMAND-I. This will give you the info box for the folder. Change the permissions so that “everyone” can read and write to the folder, and check to make enclosed items the same. This is an issue if you have the files for your site in the htdocs folder within the Applications folder, because Applications usually has read and write restrictions.

          • Thanks for sharing that, Michael. Actually, I don’t have my site files within the htdocs folder within Applications. I think this authorization issue has to do with the port used, but then I changed the port back, and it persisted. I forget the exact cause, but it’s annoying and the last time I tried to do anything about it, there was no help from MAMP.

          • The files don’t have to be in htdocs for this to be a problem. I have two sites running in my users/user/sites folder, and on both of them, I had no further problems after going to the root site folder, changing the permissions to read/write for everyone, and making all enclosed folders the same.

    • Had this same /etc/hosts couldn’t be written problem.

      My fix was to uninstall mamp pro and the standard version too by using their uninstall apps located on their own folders in /Applications/Mamp/ and /Applications/Mamp Pro/
      The uninstall app gave me errors about two folders not being able to be erased or accessed. I don’t remember which ones but if the problem you’re having is same as mine was, you’ll get a prompt of the folder names. Folders were located in:

      ~/Library/Preferences
      ~/Library/Application Support

      I deleted those manually and restarted the uninstall app. I also deleted the following two files from the ~/Library/Preferences folder:

      de.appsolute.MAMP.plist
      de.appsolute.mamppro.plist.lockfile

      Rebooted and installed Mamp Pro.

  4. Hi Larry,

    I’ve been using MAMP for many years and looked at MAMP Pro, but unless one needs some of the advanced features it’s not hard to set up MAMP to use the regular ports for Apache, write easier local URLs to the etc/hosts file and add the virtual hosts to the end of the MAMP/conf/Apache/httpd.conf file.

    It’s not hard, but not easy for a normal user to find out exactly how to do this. Perhaps you could include instructions on exactly how to do this in your latest books?

    • Hello Stuart,

      Thanks for the input. No, it’s not hard to do this yourself (once you know what you’re doing), but I think there’s also something to be said for supporting a good product that’s given away for free. Setting up virtual hosts is a good potential topic for the new “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)” book, though.

  5. Good article. Just upgraded to Pro, wish I’d done it months ago! Now locally testing a DW PHP/MySQL site and a XOOPS build without the hassle of switching files around in OS X / messing with the config files. Looking forward to next “PHP and MySQL..’ edition.

    • Hello Dave. Thanks for the feedback and for the interest in the PHP and MySQL book. Glad you’re liking MAMP Pro. I think there are a number of things they could do better with it, but overall it’s money well spent, in my opinion. Thanks again!

  6. Is MAMP and MAMP PRO just intended for development? Or can Pro be used to for a public website?

    • Good question. I don’t know an official answer, but I would think you’d be able to use MAMP or MAMP Pro for production purposes. Really, both are just visual interfaces and pre-configuration of the common production tools.

  7. How do you run multiple wordpress sites with MAMP Pro?

  8. I just started with MAMP (had been using XAMPP which was okay as well) and the PRO is free for a few weeks. I’m working on multiple sites and intrigued by the PRO functionality. Ultimately each is packaged up to deploy on Heroku so that step is yet to be investigated. Development will take a few weeks so I’ll hope/look for “one button deploy to Heroku” later. I welcome any advanced ideas though!

  9. Thanks, Larry. The benefits of MAMP Pro are a bit subtle, but it really makes doing things more than basic set-up much easier (virtual hosts, SSL, etc). I kind of stumbled onto that realization, but I think your article would have clarified this for me earlier on. I think it will help others, too!
    Cheers,
    David

  10. Started to liking MAMP Pro but very poor support. I wonder how the Permissions work on MAMP?

Comments are great, but I'd strongly prefer any requests for assistance get made in the support forums. Thanks!