Setting up a test site (MAMP)

Update: These instructions are old. See new instructions in the CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. Handbook.

What is MAMP? What is MAMP?

MAMP stands for Macintosh, Apache, MySQL, and PHP. MAMP is an application you can install on your Mac which allows you to have access to a local PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. http://php.net/manual/en/intro-whatis.php. server and MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com/. server. Essentially, MAMP gives you all of the tools you need to run WordPress on your machine, for development and testing purposes. You can accomplish this in different ways, but the other ways aren’t nearly as simple (see MacOS_X_Local_Mirror for the long, manual version of installing PHP and MySQL on your Mac).

Top ↑

Step 1: Installing MAMP Step 1: Installing MAMP

Before you can install MAMP on your Mac, you’ll need to download it from the MAMP website. MAMP requires that your Mac be running Mac OS X 10.6.6 or later and you need roughly 550megs of free space.

Once the MAMP download is complete, unzip the file and double-click the MAMP PKG (it should be something like MAMP_MAMP_PRO_2.1.2.pkg). This will walk you through the install.

Top ↑

Step 2: Basic MAMP Settings Step 2: Basic MAMP Settings

Now that you’ve got MAMP installed on your system, launch MAMP.app (located at /Applications/MAMP/MAMP.app).

While you’re editing settings, MAMP might prompt you for an administrator password. This is required because MAMP needs to run two processes: mysqld (MySQL) and httpd (ApacheApache Apache is the most widely used web server software. Developed and maintained by Apache Software Foundation. Apache is an Open Source software available for free.), and depending on the settings you set for those processes, you may or may not need to input your password.

Screen Shot 2013-03-19 at 10.28.01 AM Once you open MAMP, click the Preferences button. Next, click over to “Ports.” The default MAMP ports are 8888 for Apache, and8889 for MySQL. If you use this configuration, you shouldn’t get asked for your password, but you’d need to include the port number in the URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org (localhost:8888). If you’d like to leave the port number out of the URL, change the Apache port to 80. If you chose to use port 80, it’s easiest to click ‘Set to default Apache and MySQL ports.’

The downside of using port 80 as your MAMP Apache port is that you’ll always be asked for your password, unless you chose to install the Apache & MySQL – No Password app.

On the PHP tab, select PHP version 5.4. The PHP minimum requirement for WordPress was raised to 5.2.4+ in version 3.2, and MAMP comes with version 5.2.17 and 5.4.10 currently.

Lastly, on the Apache tab, you’ll need to set a document root. This is where all of your files are going to be for your local web server. An example of a document root is /Users/USERNAME/Sites/wordpress/. You can leave this as the default /Applications/MAMP/htdocs if you want.

Once you’re done editing all of the settings, hit OK to save them.

Top ↑

Step 3: Starting MAMP Servers & Creating The Database Step 3: Starting MAMP Servers & Creating The Database

To start the MAMP Apache and MySQL servers, simply click “Start Servers” from the main MAMP screen. Your MAMP servers have now been started.

Once the MAMP servers start, the MAMP start page should open in your default web browser. If not, click on “Open start page” in the MAMP window. Once that’s open, select phpMyAdmin from the webpage.

Under “Create new database”, enter in a database name such as “wordpress”, and press “Create.”

Top ↑

Step 4: Downloading and Installing WordPress Step 4: Downloading and Installing WordPress

Now it’s time to download WordPress. Once you’ve downloaded and unzipped the WordPress download, open up the “wordpress” folder. Click and drag all of the files from the wordpress folder to your MAMP document root.

Lastly, we’ve got to run WordPress’ famous 5-minute install. Visit your local site (localhost:port or localhost:port/wordpress), and enter the following information into the database setup form:

database name: wordpress
database host/server: localhost
database user: root
database password: root

Once that’s complete, enter a blog name and email address, and you’re ready to use WordPress on your Mac.

Last updated: