Create a Web Development Environment With MAMP

  Matt Cone       July 18, 2007      Tutorials Mac Developer

Those of us who have websites know that we need a development environment to work on new features, make changes, and just experiment. If you’re creating static HTML pages, you don’t need much - you can create the pages on your Mac and preview them locally in your web browser or a with WYSIWYG application like iWeb. However, things are a bit more complicated if you’re working with web applications that use PHP and MySQL.

In that case, you’re going to want to use MAMP, a free web development environment for your Mac. MAMP comes with everything you need, including Apache, PHP, MySQL, and even the buzzword-compliant acronym. (MAMP, by the way, stands for Mac, Apache, MySQL, and PHP.) It’s not suitable for a production web server, but it’s perfect for your home Mac.

The MAMP application icon

We’ll show you how to install and configure MAMP on your Mac. To spice things up a little, we’ll also install Drupal, an open source content management system (CMS).

Install and Configure MAMP

Installing MAMP is a pretty straightforward process. The installer is graphical, and MAMP keeps itself contained to a single folder in your Applications folder, which is really nice. Here’s how to install:

  1. Download MAMP from living-e. It could take a bit longer to download than other applications - our MAMP download weighed in at a hefty 109 MB.

  2. Double-click on the MAMP disk image to mount it on your Mac. Drag the MAMP folder to your Applications folder. Leave MAMP in your Applications folder and don’t nest it in other folders. (The server applications require this.)

    The MAMP application

  3. Launch MAMP by double-clicking the MAMP icon in the MAMP folder. Once the MAMP window appears, click Start Servers to get everything going. When you see green lights, you know you’re good to go.

    The MAMP application

  4. MAMP will open a web page in your default web browser. This web page contains important information! Do not close this web page until you have jotted down all of the information you need. The page also contains links to phpMyAdmin and SQLiteManager.

    The MAMP application

  5. That’s it! Now you can start installing your web site. (Applications > MAMP > htpdocs) Your website can be found at: http://localhost:8888.

Install and Configure Drupal

Now that we have MAMP working, we need to put it to use. You can host anything you want - content management systems such as WordPress will work perfectly. We’re going to use Drupal as an example. Here’s how you can install it, too:

  1. Download Drupal from the official website.

  2. Uncompress the zip file in: Applications > MAMP > htdocs. Cutting and pasting all of the Drupal files into the home directory is a good idea. To do this, take all of the files in the Drupal folder (ours is called “drupal-5.1”) and drag them to the htdocs folder.

  3. With your web browser, visit http://localhost:8888. If everything worked, you should see a web page like the one below.

    The MAMP application

  4. Set the database type to mysql. In the Database name box, type test. We could create a new database, but it’s easier just to use test - a database MAMP creates by default. The database username and password is root. If everything works, you’ll see a Drupal installation complete message on the next page.

    The MAMP application

  5. We’d like to say that you’re finished, but you’re actually just getting started. Customizing Drupal can be a long, painstaking task. Click here for a wonderful tutorial on using Drupal.

    The MAMP application

XAMPP: The MAMP Alternative

If you don’t like MAMP, be sure to try XAMPP, another free Mac web development environment. We don’t think XAMPP is quite as polished as MAMP, but it does have a number of features that MAMP doesn’t, so if you’re a hardcore tinkerer, you better check out XAMPP!

Subscribe to our email newsletter

Sign up and get Macinstruct's tutorials delivered to your inbox. No spam, promise!

About    Privacy Policy    Terms and Conditions

© 2023. A Matt Cone project. CC BY-NC-SA 4.0. Made with 🌶️ in New Mexico.