16 Comments

Summary:

For those of you who have dabbled with website design and development, you may be interested to know that OS X is bundled by default with the Apache web server. This allows you to easily develop websites on your own computer without the need to invest […]

For those of you who have dabbled with website design and development, you may be interested to know that OS X is bundled by default with the Apache web server. This allows you to easily develop websites on your own computer without the need to invest in a domain name or hosting package. However, the standard Apache system in Leopard is fairly limiting for those wanting to delve deeper into web based development languages such as PHP and database technology.

Fortunately, there is a remarkably simple way to set up a fully featured server on your Mac: MAMP. We previously mentioned MAMP when it was conceived way back in 2005, but this post will explain in a little more detail exactly how simple it is to install, configure and start using your MAMP installation.

The abbreviation MAMP stands for: Macintosh, Apache, MySQL and PHP. These are the four main constituents you need to design and develop a full featured website or application on your Mac.

Downloading MAMP

There are two versions of the server available to download, both of which come bundled in the same 130MB package. MAMP Pro is a configurational program for MAMP, allowing you to set up any number of servers to carry out tests without danger for your live system. It’s aimed primarily at those running a production server on their OS X machine, and at the outset you’ll likely be fine with the free version.

Once installed, it creates a ‘MAMP’ folder in your Applications directory. This contains the entire server along with the directory in which to place your website files (‘htdocs’).

Configuring and Using MAMP

There are three main components installed with MAMP.

  • Apache: This is the basic web server, and makes the display of HTML pages possible. You can view your local Apache web pages through the URL http://localhost:8888/.
  • MySQL: This is the database server, and comes bundled with a utility for easily adding, editing and removing database tables and records — phpMyAdmin. This is the easiest starting point for getting to grips with MySQL. The default username and password for the database install are both ‘root’.
  • PHP: Where HTML is great for displaying content, PHP allows you to process information and connect to the MySQL database to store and retrieve information. MAMP allows you to choose between using PHP4 or PHP5, and the configuration options for both can be found in /Applications/MAMP/conf/.

Starting and stopping all these services can be done through the MAMP application itself, or through the bundled Dashboard widget.

The full list of services bundled with MAMP consists of:

  • Apache 2.0.59
  • MySQL 5.0.41
  • PHP 4.4.8 & 5.2.6
  • APC 3.0.14
  • eAccelerator 0.9.5.3
  • XCache 1.2.0
  • phpMyAdmin 2.11.7.1
  • Zend Optimizer 3.3.3
  • SQLiteManager 1.2.0
  • Freetype 2.3.4
  • t1lib 5.1.1
  • curl 7.18.2
  • jpeg 6b
  • libpng-1.2.18
  • gd 2.0.34
  • libxml 2.6.32
  • libxslt 1.1.24
  • gettext 0.17
  • libidn 0.6.14
  • iconv 1.11
  • mcrypt 2.5.8
  • YAZ 3.0.6 & PHP/YAZ 1.0.12

Uninstalling MAMP

If you choose to remove MAMP at any time, uninstallation is as simple as dragging the folder from your Applications folder to the Trash. This makes a huge change from a standard server installation which would historically include a series of complicated uninstall steps. If you are interested in the app on a superficial level it is easy to install it, play around, and remove it with no long-lasting effects on your system.

Going Live

Once you’ve created a world-changing web application on your local machine, you’ll need to search for somewhere to host the site permanently. Unfortunately, even if your ISP offers a fixed IP address, hosting your website ‘at home’ is unadvisable. It’s likely to be considerably slower than a server hosted in a professional data center and can cause some tension between you and your ISP. There are literally thousands of hosting companies offering a professional service, with the one I would recommend personally being Media Temple.

Do you have any experience using MAMP, or are you employing a different tactic to locally test and design websites?

You’re subscribed! If you like, you can update your settings

Related research

Subscriber Content

Subscriber content comes from Gigaom Research, bridging the gap between breaking news and long-tail research. Visit any of our reports to learn more and subscribe.

By David Appleyard

You're subscribed! If you like, you can update your settings

Related stories

  1. So, does MAMP override the built-in services? Or does it just consolidate them? Or what?

  2. This is just info that I could’ve read at the MAMP site. Why don’t you give a step-by-step explanation about creating a new MySQL database under MAMP by using phpMyAdmin. Something that is often glossed over when apps ( blog, CMS etc. ) have to be tested that need this as a prerequisite. Surprisingly difficult to find a foolproof tutorial using Google.

  3. MAMP works swell. I’ve been using it for the past couple of months for my php development – it beats the heck outta manually moving files up to a webserver every time you make a simple change. Great stuff.

  4. Thanks for the article. I’ve been looking for something like this for quite some time.

  5. Bizarrely, the links on their download page for the source code or the platform-specific versions of MAMP haven’t been working for more than a month…

  6. @dave: Just tried the links and they work fine for me.

  7. As part of this package does MAMP comes with a mod_jk module. This is the part which I had problems with the pre-installed version of Apache, and despite manual installation of mod_jk I was not able to do much with it.

  8. I have a wordpress.org blog hosted at bluehost with a couple years worth of posts. I’ve updated to WP 2.7. I installed MAMP Pro on my Mac and was able to get a new installation of WordPress running fine.

    My question, which I could not find an answer to anywhere online, is whether it is possible for me to download my current active WordPress blog folder through Transit FTP and install it on MAMP. Then have the files in MAMP (on my Mac) be “mirrored” with the files up on the remote server at bluehost?

    Any thoughts?

  9. Re: Timothy Post

    You can definitely download your current WordPress blog folder and run in locally on MAMP, but you’ll need to edit wp-config.php so that it accesses the MySql installation in MAMP, which will have different settings that your bluehost db.

    Thus, if you want to mirror the folders, make sure that you exclude wp-config so that when the changed files get uploaded to your server it doesn’t break the database connection.

  10. @jn Thank you.

Comments have been disabled for this post