Quick and Easy WordPress Development on a Mac with MAMP

Wdd Logo.
December 20, 2008

Ready for some WordPress development on your Mac? First, you need to be running Apache, MySQL, and PHP.

Although Mac OS X comes with Apache and PHP, you don’t want Apple’s automatic software update to break your development environment by changing your working versions of PHP and Apache. Plus, do you really want to spend time tweaking MySQL?

In this guide, I will show you how to quickly install and configure a working WordPress environment including Apache, PHP, and MySql.

1. Turn off Web Sharing

First, you need to make sure the Mac OS X installation of Apache is not running. Navigate into your System Settings and check the “Sharing” settings. You want to turn off “Web Sharing” if it is currently enabled.

2. Use MAMP

MAMP is a free and ready-to-go install of Apache, MySQL, and PHP for Mac OS X. It is developed by Living-e. They also have a “Pro” version at additional expense. One of the great things about MAMP is that it includes almost every PHP option pre-installed and enabled. As a bonus, it comes with phpMyAdmin to help you work with databases quickly. To get MAMP, open up your web browser and go to http://www.mamp.info/en/download.html. Download MAMP, mount it, and then drag the MAMP folder into your Applications folder. You can safely ignore the “MAMP Pro” folder.

3. Configure MAMP

Go into the MAMP folder and then open the MAMP icon.


The status lights will tell you if Apache and MySQL are running. If the lights are red, click “Start Servers”. Next, modify the ports for Apache and MySQL by selecting “Preferences” and select “Set to default Apache and MySQL ports.” You should end up with port 80 for Apache and port 3306 for MySQL. Next, click on the Apache section and change the Document Root to a location that you can quickly access. All your websites will reside in this location, so you want to pick something that you can navigate into easily. I like to use a root folder called “webspace” that I created in the Finder.

4. Make a Database for WordPress

WordPress requires a MySQL database to store posts and settings. You already have MySQL running, but you need to create a separate database for each WordPress website that you develop on your Mac. From the main MAMP menu, click on “Open start page.” Your web browser should pop open up to a “Welcome to MAMP” page.

Next, click on “phpMyAdmin” to launch the phpMyAdmin web application. Look for the section entitled “Create new database” and name your database. As an example, enter “wp-superblog” and click “Create” to make a database.

5. Make a folder for your website

Within your “webspace” folder, make a new folder with the name of the website that you will be developing. As an example, make a folder called “super-blog” to correspond to the database you made.

6. Install WordPress

The easiest way to download WordPress is to point your web browser to http://www.wordpress.org/latest.zip Unzip the WordPress package and copy everything in the WordPress folder into your “super-blog” folder.

7. Configure WordPress

Navigate into your “super-blog” folder and locate a file called “wp-config-sample.php”. Open that file and change both the database username and password to “root” on lines 4 and 5. Next, make sure the name of your database (“wp-superblog” in our example) is shown on line 3. Save the changes you made to this file and then rename the file “wp-config.php”.

8. Take a Test Drive

Open up a web browser and navigate to “localhost”. You should see a folder for each website you are developing. In our example, you should see a folder named “super-blog”. If you click on it, you should instantly get to your new WordPress website.

9. Turning MAMP on and off

When you are not developing and testing a website, you may want to turn off Apache, PHP and MySQL. MAMP comes with a dashboard widget that will turn your environment on and off instantly. You can find the widget in the MAMP folder.

Written exclusively for WDD by Derek Underwood, a professional web designer and software developer. You can read more about Derek and contact him at his website: http://www.derekunderwood.com

WDD Staff

WDD staff are proud to be able to bring you this daily blog about web design and development. If there's something you think we should be talking about let us know @DesignerDepot.

Read Next

30 Most Exciting New Tools for Designers, 2023

As we near the end of 2023, we wanted to take a look back over all the tools we collected over the past year, to pick…

3 Essential Design Trends, December 2023

While we love the holidays, too much of a seasonal theme can get overwhelming. Thankfully, these design trends strike a…

10 Easy Ways to Make Money as a Web Designer

When you’re a web designer, the logical way to make money is designing websites; you can apply for a job at an agency,…

The 10 Most Hated Fonts of All Time

Remember when Comic Sans wasn’t the butt of the jokes? Long for the days when we actually enjoyed using the Impact…

15 Best New Fonts, November 2023

2023 is almost over, and the new fonts are still coming thick and fast. This month, we’ve found some awesome variable…

Old School Web Techniques Best Forgotten

When the web first entered the public consciousness back in the 90s, it was primarily text-based with minimal design…

20 Best New Websites, November 2023

As the nights draw in for the Northern hemisphere, what better way to brighten your day than by soaking up some design…

30 Amazing Chrome Extensions for Designers and Developers

Searching for a tool to make cross-platform design a breeze? Desperate for an extension that helps you figure out the…

Exciting New Tools for Designers, November 2023

We’ve got a mix of handy image helpers, useful design assets, and clever productivity tools, amongst other treats. Some…

The Dangers of Doomscrolling for Designers and How to Break Free

As a creative professional, navigating the digital realm is second nature to you. It’s normal to follow an endless…

From Image Adjustments to AI: Photoshop Through the Years

Remember when Merriam-Webster added Photoshop to the dictionary back in 2008? Want to learn how AI is changing design…

3 Essential Design Trends, November 2023

In the season of giving thanks, we often think of comfort and tradition. These are common themes with each of our three…