Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use PHP on my Mac.

If I were using Windows I would install WAMP server, but I'm not familiar with how to use PHP on Mac OS X. What kind of software should I use for installing/running my php developed sites locally on my Mac?

share|improve this question
up vote 7 down vote accepted

MAMP is the equivalent of WAMP for Mac OS X.

share|improve this answer
I would give you +5, if i could. – Sagar R. Kothari Oct 17 '09 at 22:42
MAMP would be my first choice. Excellent program. – Josh K Oct 18 '09 at 5:25
I think that MAMP is no longer a normal AMP stack (seems like it disallows virtual hosts in the free version?). Are there any alternatives? I found an "install mysql and you're done" here:… – Dan Rosenstark Mar 7 '12 at 5:06
@Yar: Well, I suppose that's what you get for convenience. I'm not aware of any other application that does this, so your best bet would be to manually install and configure each part, like in the article you linked. – Sasha Chedygov Mar 7 '12 at 6:55
Horrific. I might just run this stuff on Linux instead. At least that way I'm playing with one of the possible deployment platforms. – Dan Rosenstark Apr 26 '12 at 4:44

PHP comes pre-installed in Mac OS X. It's not perfect for everyone (as it may or may not have the extensions you wish). To enable it (PHP 5.3 on Snow Leopard) you need to enable it in Apache 2's configuration file (Uncomment the module).

Applications such as MAMP provide a separate installation of the *AMP stack that work on Mac OS X.

Alternatively if you want to install other versions of PHP on your Mac you can either use MacPorts or compile it yourself.

From the way you are wording your question it sounds like you are not looking for how to use PHP on Mac OS X but how to set up the web development stack (Apache, MySQL, PHP) on your Mac.

share|improve this answer
Hey ! A great thing. On which version of Snow Leopard? A great Answer. You are aware of most of the things. – Sagar R. Kothari Oct 17 '09 at 23:48
Both Server and Client come with PHP 5.3. All versions of Mac OS X came with versions as well (Leopard had PHP 5.2, Tiger 4.3, even older versions not worth mentioning) – Chealion Oct 17 '09 at 23:56

Marc Liyanage very kindly maintains a current build of PHP for Mac OS X at his website:

Go there, download it, follow the installation instructions, and you're good to go.

share|improve this answer

You can try using mac ports. Although it is difficult to setup initially, but once setup, its very easy to add packages. You can install new servers/memcached/mysql/php just by few commands.

There are many articles on google on installing Macports and then installing AMP. I found this article helpful.

share|improve this answer
Hi Saurabh, welcome to SuperUser. Your answer is pretty close to the one posted by Chealion from October 2009. I would suggest editing it to improve the quality and information on it. Take a look at the FAQ for some tips. – user3463 Jul 31 '12 at 6:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .