Running a Local Server with MAMP

If you’re a website designer, developer or blogger, the ability to test websites locally can be remarkably useful. It could serve as a testing environment before uploading a new page to your website, or provide a way to work on a website project without an internet connection.

Although OS X comes bundled with a basic web server installed, a more user-friendly solution is available in the form of MAMP. Today we’ll be walking you through the process of setting up a local server with MAMP and outlining the difference between the basic and pro versions.

What is MAMP?

MAMP stands for Mac, Apache, MySQL and PHP. Each of these are the basic elements needed for a functional web server, and MAMP puts them together into an easy-to-use package.

OS X already comes with a basic Apache web server installed, and you’ll be pleased to know that MAMP leaves it completely untouched. No system files are interfered with, and it’s equally easy to uninstall if you find yourself with no use for it.

If you’re planning on creating a site purely with HTML and CSS, there’s no need for a local “web server” as such – just open the file you’ve created in Safari or Firefox. The need for MAMP arises when you need to create a dynamic site with server-side scripting (such as PHP), and a database (in this case, MySQL).

Installation & Setup

After downloading and installing MAMP, you’ll be presented with this simple user interface. Green means that everything is running fine; red means that the server is stopped:

The MAMP Interface

The MAMP Interface

The best starting point after installing MAMP is to click “Open start page”. This will launch your default web browser and take you to the following page:

Welcome Page

Welcome Page

This page confirms that everything is working correctly, and provides the basic settings required for connecting to your local MySQL database. You can view the phpInfo page for details about the version installed and path settings etc, or directly access a database administration tool (which we’ll come to shortly).

MAMP is also a great solution for running web applications locally. I use it for hosting a copy of Fever, a web based RSS reader, resulting in a far more responsive interface than if accessed over the web.


MAMP is fairly light on the preferences front but a few exist which are certainly worth mentioning. Firstly, you can select whether opening or quitting MAMP will start/stop the server behind it. Deselecting these two options can be useful if you’d like the server to run in the background with any MAMP user interface.

Start & Stop Settings

Start & Stop Settings

Another setting to be considered is the “Document Root” – where MAMP will look for your website. This can be set to any location on your Mac, and should point to the location of your website files. I have mine set to my “Sites” folder for simplicity, but it can point anywhere.

Alter Document Root

Alter Document Root

Accessing your website is then simply a case of typing “http://localhost:8888/” into a web browser.

Managing a MySQL Database

logo_leftThe inclusion of a MySQL (and SQLite) database is very useful, and saves a great deal of setup and configuration that would otherwise be necessary. Two administration interfaces are available: SQLiteManager and phpMyAdmin. Both are excellent tools for managing the content of your database, tables, and records.

Another option to mention (we are a Mac application blog after all) is to use an app such as Querious or Sequel Pro. Both are perfectly capable of interacting with your local MAMP installation, though you’ll need to use the connection settings displayed on the “Start page” to get everything working correctly.

Should you go Pro?


Two different versions of the servers software are available: MAMP, and MAMP PRO. The professional version has a number of additional features which you may find useful (particularly if testing more than one website):

  • Virtual Hosts – For managing several sites locally, each with their own web address and folder structure
  • Local Mail Server – For sending messages via PHP
  • Dynamic DNS – To allow easy external access to your MAMP installation (outside a local network)
  • Easier configuration of Apache modules

It also has a more full-featured administration interface:

MAMP Pro Interface

MAMP Pro Interface

MAMP PRO costs around $50, but it’s a price worth paying if you feel the additional features may be useful.


If the default Apache installation on OS X isn’t powerful enough for you (and the thought of editing server configuration files makes you shudder), MAMP is a fantastic option. Installation is incredibly simple and you can have a fairly advanced server running in no time at all.

The free release is advanced enough for most casual users, though if you’re looking to test several different domains/websites I would strongly recommend paying $50 for the PRO version.

Do you have any experience with MAMP? I would be interested to know which version you run, and which websites you test locally!


Add Yours
  • I’ve been using MAMP for over a year now and love it. I use it to host a local wiki (, WebSVN (, and a couple of CMake Dashboards ( for a small development team. It has been rock solid.

  • I use the free version of Mamp and find it an absolute breeze. Annoying thing is that it asks for my password everytime I load/close it.

    • I’ve been using it for a while and it never asked me for a password?

    • Have you maybe changed the password for the root user with MySQL?

    • I get that too, think its related me setting the ports to default though ! ?

      Very good app indeed, no messing, does what is says on the tin.

    • I also have to do this, but it does really bother me too much as I don’t have it load on boot, but use the Dashboard widget to fire it up as and when I am designing.

    • From the FAQs: “You probably have set the Apache port smaller than 1024. Under a Unix system like Mac OS X you must have “root” (administrative) privileges to start IP-services using ports smaller than 1024.”

      • My ports are 8888 & 8889 and I have to put a password in every time I CLOSE the MAMP app… Is this normal?

  • MAMP is probably in the top 5 most used apps I have. Seeing as how I code more than design, this and Espresso are usually open more than Photoshop. I might upgrade to Pro when I get my MBP, but we’ll see.

    I test, my website, client’s websites, scripts/templates for Themeforest, articles that use PHP, and stuff that I need to do that I can’t do just by viewing a file in the browser.

  • You could also build the MAMP stack yourself and control it yourself if you feel geekish or want to know how things really work underneath. You would not need the PRO version to get the same result as all is free! Go to and read all about it.

  • I had nothing but trouble with MAMP. Switched to XAMPP (a more up-to-date stack) and it has been a very pleasant experience.

  • If you’re considering paying $50 for the ability to easily manage virtual hosts, the free version of MAMP and VirtualHostX ($19, might be a better solution. It works with XAMPP and the Apache installation that ships with OS X, so if MAMP updates stop (as they had for a long time), you’re not stuck with a $50 app you have no desire to use.

    The other features of MAMP Pro might make it worth your money though.

  • I’ve used MAMP several times for messing around with WordPress installations before I make them live. Works perfectly – highly recommeded.

  • What do you thing about Zend Server CE? Will there be a review?

  • Seems to be a great app ! Someone can confirm that you can use fever with it ? I always wanted to use it but I don’t want to pay for fever AND a web server… So using it with MAM seems to be an excellent way !!

  • Seems to be a great app ! Someone can confirm that you can use fever with it ? I always wanted to use it but I don’t want to pay for fever AND a web server… So using it with MAM seems to be an excellent way !!

  • OOps, double post :( Would you mine to delete these two message ? Thanks and sorry for the inconveniance.

  • Works great for me. It took awhile but I got it working with the dev version of Coldfusion 8 as well.

    Another cool tip is using symlinks for the MAMP sites and database folders so you can keep them synced on two machines via Dropbox (i.e. Workstation and a laptop).

  • introduction again, it will be good if teach like how to backup before upgrade to new one, how to this and that.

  • I love MAMP. I just have this weird problem where I’m being redirected to the live site (on the internet) of a previous site I’ve build, whenever I try to access my localhost!?

    Maybe I’ll have a closer look at XAMPP and see what it can do.

  • One user had Kerio running on his server and, to prevent spam by his users, it was limiting the SMTP server to 20 messages per hour… Green Widget

  • MAMP Pro is 50% off until September 6 with coupon code mamp-pro !
    I have been using the free version to setup custom WordPress sites, I am now upgrading because $29.50 US is a great value for the extra features!

  • MAMP is really nice app. I’m using it for 1 year with no problem.

  • I agree with Zac Avery, MAMP has an outdated stack, also is mostly unsupported by it’s creator (check their forums). I too switched to XAMPP and have been very pleased. XAMPP is also regularly updated.

    • I need to make a correction to my comment above. I did not realize that MAMP was very recently updated (after a long lapse from updates). I downloaded the latest revision and it is working great once again.

  • Horribly insecure & should never be used in production. IMO it’s better to take the 5 minutes it takes to learn how to do the stuff yourself and when something goes wrong you have an understanding of why and you can fix it.

    To many new web developers out there that can’t even add their own sites to a server.

    • Amen! MAMP is a awesome utility but it’s way too open for production use. I use it on a local machine for development purposes only!

  • To bad its for the mac,

    • Sorry didn’t see that this is a mac site ;) lol

  • I’ve been using MAMP almost a year now and I love it. Been contemplating going Pro for a while but not sure yet. I may just get an NAS with the features of MAMP Pro. Still weighing the options.

    Great Article though!

  • Or you can just install Zend Server (CE) which is a much more powerful solution, actively updated and maintained by Zend, the company behind php. It’s free and works on Mac/Linux/Windows with the added bonus of it being designed to run as a production server.

  • been using the free version for some time now.. overall the app is fast and direct. imo a must have for anyone who want to host DB locally ;)

  • We’ve just released a free bugfix update of MAMP & MAMP PRO: Version 1.8.2 fixes two issues. Download page:

  • I use MAMP since a couple of years, running WordPress locally. Perfect for theme development and easy enough for a stopid designer like me to use.

  • Regarding the tip: “MAMP is also a great solution for running web applications locally. I use it for hosting a copy of Fever…”

    I’d be very interested in a follow-up tutorial on how to do that!

  • To make the differences cleaner between MAMP & MAMP PRO we’ve published a feature matrix:

    • I and others would find it very useful if you developed a little tutorial on how to Set up MAMP Pro to manage multiple Vhosts: Creating the vHosts, Using them, etc.

      For example if one uses the from of It does display correctly, but it causes the DNS for your real site to no longer being rendered correctly. Something happens with the DNS…. what in fact happens? Could this not be explained in the docs?

    • I agree with vanni. I’ve looked through the manual and there’s nothing regarding configuring MAMP PRO for Virtual Hosts. I’m a bit disappointed because it says on MAMP website that this is what it’s designed for. If that’s the case, why no tutorial on Multiple Virtual Hosting? Hope I haven’t just wasted ¬£39-00!!!

  • i have been using MAMP for years and it was easy to have multiple sites to test. i simply had sub directories within htdocs… But the draw back was that i was not bale to use real URLS for when i wanted to migrate to my live ISP. So I bought MAMP Pro. I have tried to use multiple Vhosts. Nothing. I can’t get it to work. Shame that the paid version didn’t come with some easy instructions/examples on setting up virtual hosts and then how one gets to view them? Has someone done a good tutorial that they could share?

  • Hi Vanii.. Think I had the same problem. Check this post out.. It helped me.

    I now view all my dev sites just like i would the live sites, so ftping a complete dev site to live doesnt break a thing. All with mamp too.

    Basically (and im using a mac btw):

    Add this to the end of the httpd.conf file (mamp/conf/apache/)

    DocumentRoot “/Users/flashmac/Sites/”

    then edit the host file (/etc/hosts) and add the new site address to the line with like so: localhost

    then go to and hey presto.

  • I just installed MAMP. Can some one write back what is the difference between the path document root being htdocs and users/sarah/site?

    Also, can some one recommend any web development tool in Mac. Can WordPress be used to build websites?

    Thank you,

    • BBedit is the best XHTML coding tool for Mac. It’s very easy to understand. It works really well. It save’s the user from doing too much typing: You can drag and drop most of the tags from the toolbar and drop ’em where you want them in the document – very cool. It’s a lot cheaper than dreamweaver and much faster/stable. The FTP program supplied with it is better than dreamweaver’s.

      CSS edit can be good for css, but overall, BBedit is the best(company’s motto: Software that doesn’t suck)

    • The difference between those two paths is this: users/sarah/site is the default location for website testing as per os x installation. htpdocs is a directory/folder that’s created when you installed MAMP.

      WordPress can be used to build websites,but I wouldn’t recommend it initially. This is because to really get WordPress to look and behave as you would like i.e. customizing it, you have to understand php/mysql. Your first priority should be to get a basic grasp of XHTML/css first. This is the markup code that is fed to browsers so you can see a webpage.

      Hope this helps

  • I’m having the same problem as Mikkel. When I try to log in to my local installation of WordPress (WordPress + MAMP) I’m redirected to the login page of a live hosted WordPress site I built. I tried clearing browser caches and scowering the local files to see what’s forcing it, but I’ve come up with nothing

  • I have been using the free version of Mamp for a long time. It works quite well and has been helpful enough to save the pain of installing a server through individual modules of php, mysql etc. The only problem I have met is that i could not make the .htaccess files work to enable friendly URLs. Does anyone had this issue? if so please could you tell me how you solved it. thanks a lot

    • I have and I have also googled many a web sites for answers. I have gotten many answers to how to enable Finder to make hidden files visible but have yet to get it to work. I have resulted to putting my rewrite rules in the virtual host config file instead. I have come to like it so much that I do it in production as well.

  • Its really good article,


  • I used Mamp, great app.
    But a problem once set friendly url’s at localhost
    Is there anybody can help out to figure this issue

    thank you in advance

  • Of course, which a wonderful web page and educative posts, I definitely can bookmark your site. Ideal Regards!

  • Greetings from Idaho! I’m bored to tears at work so I decided to check out your website on my iphone during lunch break. I really like the information you provide here and can’t wait to take a look when I get home. I’m amazed at how fast your blog loaded on my phone .. I’m not even using WIFI, just 3G .. Anyhow, very good blog!

  • Does anyone know if MAMP can be installed on a Mac Server running Snow Leopard?

  • Mamp not starting when i go to open start page

  • We’re running MAMP pro on our mac server to serve our internal and external content