Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm a Web Developer who has just made the switch over to Mac. Despite all that I know and love about the Windows environment I find myself in a new mysterious place.

My question: what is the best Apache, PHP setup for a Mac developer? On Windows I've been using WAMP which was quite nice, I know Mac comes shipped with Apache 2 and PHP pre-installed. I'm just wondering if there is a better solution out there.


migration rejected from stackoverflow.com Oct 31 '13 at 21:40

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as primarily opinion-based by slhck Oct 31 '13 at 21:40

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

After 14 answers and everyone adding their two cents of opinion, this question really does not appear useful anymore. –  slhck Oct 31 '13 at 21:40

14 Answers 14

Snow Leopard comes with PHP 5.3 and a lot more pre-installed extensions than in Leopard - GD being the one that I always found hardest/most time-consuming to compile myself, but also PDO-mysql which is handy.

There's also MAMP, which is a pre-configured version of PHP, Apache and Mysql, but that hasn't had its PHP version updated for quite a long time, and development generally seems really slow. Until I installed SL though, that's what I used - I turned off the built in Apache (Under "Sharing" in preferences) and set MAMP's apache to port 80.

MAMP makes life very easy. –  davethegr8 Oct 2 '09 at 18:13
MAMP is great for beginners and if you want to get up and running fast. Compiling from source is always the best for seasoned web developers because you can add and remove items from the configuration as needed –  ricbax Dec 10 '09 at 14:27

If you are happy with WAMP on windows, then you could try XAMP on OS X

BTW although Apple pre-installs various packages such as PHP, you will probably find that they are not the most up to date ones. I know that this was the case for PHP on plain old Leopard. I am not sure what is installed on Snow Leopard.

It's real name is XAMPP, with two 'P's. –  donut Feb 23 '10 at 7:54
I use XAMPP. Works on Windows and Mac, can't go wrong. –  danixd Aug 20 '10 at 15:44

On Windows you use Wamp, on Linux you use Lamp on Mac you use... guess... Mamp!


I think that the Zend Server CE is one of the better packages you can install for windows or mac. Comes with instruction caching and what not. Its what I run on my mac. It installs everything in /usr/local/zend and you don't need to worry about software updates messing up your custom apache/php compiles.


There's something to be said for learning to compile things from source all by yourself. Give yourself a weekend to build up a bunch of build scripts.

I can't tell you how valuable it is to have a bunch of scripts that will more-or-less build the environment you want and need. I actually have several, distinct, AMP stacks running on my Leopard laptop. They mirror the builds running on various client machines.

It's pretty easy to get started. On the mac, get familiar with MacPorts or Fink so you can install various dependencies. Then grab a recent apache. Build it with a prefix like --prefix=/testing/httpd. Bang on it until you can get it to compile, and you can start it up with "/testing/httpd/bin/apachectl start". Then you can start playing with compiling Apache with OpenSSL, then figure out how to build PHP (with whatever extensions you like).

It's tedious, but if you write shell scripts to do it for you, you can always come back and make minor tweaks to include any weird esoteric library you'll ever need.

Even if it never helps you with web development directly, knowing your way around the configure/make/make install dance is a skill you may as well pick up whenever you can.


You can stay up-to-date with the MAMP provided through MacPorts. They have instructions on how to install for as old as Mac OS 10.4.


I think XAMPP is the best one as i am using it from a quite long and i only have 1 GB RAM and developed a lot projects like facebook twitter and similar .... works fine ... the best XAMPP


There is mamp. It's has a mac like interface to.


FWIW, I work on a project that requires, among other things, memcached and postgres support.

The version of PHP 5.3 bundled in Snow Leopard doesn't have postgres support compiled in.

Installing memcached against MAMP is non-trivial -- its version of PECL doesn't work. There's a blog post which includes a link to a pre-built memcache extension binary, but it's only compatible with a single old version of MAMP.

The Mac Ports version of PHP, on the other hand, fairly trivially supports postgresql and memcached. It does not, however, have a pretty interface like MAMP -- you'll be spending some time on the command line installing and managing it.

Haven't tried XAMPP. It may be worth a shot.

In summary, if you have a simple set of dependencies -- you don't need any extensions -- and you're not comfortable on the command line, go with MAMP.

If your project has many dependencies (multiple PECL extensions, etc.) Mac Ports may be your only option.


If you're interested in rolling your own MAMP development environment (perhaps the Apple-supplied PHP 5.3 is missing some things you want) I wrote a step-by-step tutorial of my installation at http://www.teamonetickets.com/software/howto-setup-php-apache-mysql-dev-environment-on-snow-leopard.html


Another option is to run your web environment(s) in virtual machines. You could use VirtualBox or similar to do this for free (assuming licensing concerns are taken care of). I've started doing this although with a dedicated server running virtualization software (Xen on Linux) and it's wonderful.

It's certainly different from the other options presented. One concern is if battery life is important -- running a VM would likely consume more resources and reduce battery life. Otherwise, assuming enough resources (memory) is available, it's a great way to keep your separate web sites as completely separate environments.

Just a thought. I know it's not quite what you asked.


While the included stuff is nice and things like MAMP work well I have always liked to roll my own so I can be in control of updates and changes.

Even thought it was written for Leopard Sean's article is a good guide to getting everything setup. Doing this has allowed me to change the installed PHP quickly and easily as necessary.


MAMP is ok. It works, but I would prefer to get the default setup working before installing something over the top of it that mucks everything up. I had a really hard time trying to get PHP and MySQL installed on Leopard, but now that Snow Leopard is out, it makes it a lot easier. My recommendation is start with a fresh install of Snow Leopard and find a good tutorial (or separate tutorials) on how to set up Apache, MySQL, and PHP.


I also had to "go Mac" on a recent project, and did a bit of digging. There are four ways to go, listed here in descending order of ease of implementation.

  • MAMP (or MAMP Pro)
  • MacPorts
  • roll your own

Because I didn't have a whole lot of time (or patience, I have to admit), I used MAMP. I had earlier used XAMPP on my Windows machine and it looks and feels similar on a Mac, so that's a viable option too. I had heard too many warnings about using MacPorts that scared me off, and like I said, I really didn't have a lot of time so I didn't want to muck around with it, but I hear that it does work well. The "best" way, I have heard, is to use the built-in services on a Mac to do it (i.e. roll your own), especially if you want to do more than just PHP development on your machine (e.g. Drupal).

I will edit this answer in a few minutes to include good links to information on all four of these alternatives.