Install WordPress on a Mac

How to Install WordPress Locally on Your Mac Computer

Coding in a “live” environment can be a perilous — if not ill-advised — endeavor, and working remotely on a WordPress installation is no different. Any misstep in a live environment could result in an alteration that damages your site and lands you in a terrible mess.

However, there’s no need to live on the edge. It’s possible to install WordPress locally on your Mac machine, thus providing you with a safe working environment. This method will shield you from the effects of coding mishaps and supply a host of benefits, such as the avoidance of downtime.

In this article, we’ll elaborate on the benefits of installing WordPress locally on your Mac and then lead you through the process of starting servers, creating a database, and installing the platform itself. Let’s get cracking!

What Are the Benefits of Installing WordPress Locally on Your Mac Computer?

Before we cover how to install WordPress locally on your Mac computer, it’s important that we go into detail concerning why it is a preferable solution to working on your live site. Using a local WordPress environment can provide you with a wide set of benefits, including:

  • Fewer problems to deal with. If you already have an existing WordPress site, you probably understand how live development can lead to unintended errors, such as problems establishing database connections or syntax issues. Working in a local environment removes that risk from the equation. If you do break something, no one needs to know.
  • A secure working environment. Since you’ll be working in an offline environment, you won’t be subject to any external attacks.
  • Greater productivity. You’ll be working from a local drive, so connectivity issues won’t affect your performance. Furthermore, your site will load very quickly in comparison with a regular web host. Those two benefits combined will undoubtedly lead to higher productivity.
  • The ability to work from anywhere. A local WordPress install can be accessed even when offline. That means you can work in environments you otherwise couldn’t, such as airplanes without Wi-Fi connectivity.
  • Work is kept private. When you install WordPress locally, search engines can’t index your site. That means no one will see your work until you’re ready for its grand debut. No more prying eyes on your unfinished projects!
  • You’ll have a bonus backup. A local installation can double as a partial backup of your live WordPress website, should you have one.

If any of the above sound like the type of features that could simplify your workflow, then you should definitely learn how to install WordPress locally on your Mac computer. With that in mind, let’s see how the process works.

What is MAMP?

The MAMP homepage.

MAMP website splash screen

Macintosh, Apache, MySQL, PHP (MAMP) is an application that enables you to install WordPress on your Mac. As its moniker indicates, the program creates a local MySQL database and a PHP server on your Mac – both of which are essential for installing WordPress locally. It’s perfect for our needs because it removes the need for manual MySQL and PHP installations, which can get complicated.

While MAMP arguably remains the most popular local WordPress installation tool for Mac, it’s not the only name in the field. Local by Flywheel, for example, is a tool expressly designed to manage multiple local WordPress installations on Macs. It offers one-click WordPress installations, SSL support,  SSH/WP-CLI access, demo URLs, and more, as part of the hosting provider’s free tier. There’s also the Bitnami WordPress Stack, which enables one-click local, virtual and cloud-based WordPress installations. It’s an out-of-the-box solution offering ongoing support, and it’s available at no charge.

That said, MAMP is our tool of choice, and the one we will be using for the remainder of this tutorial. So without further ado, let’s get to it!

How Do I Use MAMP to Create a Local WordPress Installation?

In this section, we’ll guide you through the entire process of installing MAMP and setting up a local WordPress installation on Mac. Let’s start right at the beginning by downloading the tool.

Step #1: Download and Install MAMP

Before we get started, if you feel comfortable installing the tool on your own, feel free to skip right to step number two. Otherwise, let’s proceed:

  1. Download MAMP. Ensure you’re operating a 64-bit Intel processor Mac with Mac OS X 10.10 or above, and then download MAMP from the official site.
  2. Drag the MAMP disk image. If your download goes smoothly, a MAMP window will appear once it’s complete. Drag the MAMP folder from the window to your Applications folder. Note that the latest version of MAMP comes with a 14-day free trial of MAMP PRO. We’re going to stick with the free version for this tutorial, so feel free to ignore that option for now.

If you run into any issues while installing MAMP – and are sure that you meet the requirements – check out the tool’s official documentation, which should contain solutions for your specific issue.

Step #2: Launch (And Configure) MAMP

Now that you’ve installed the tool, you’ll find a new file located in your Applications folder. Go ahead and launch it. Click on Preferences Ports and you’ll arrive at the following window:

MAMP's default port settings.

MAMP default port settings

You’ll notice that MAMP’s Apache and MySQL ports are set at 8888 and 8889, respectively. Using these default settings will not require the input of your administrator password. If, however, you don’t wish for the port number to appear in your URL (i.e. localhost:8888), you can change the Apache Port setting to 80.

With that out of the way, go to the Web Server Settings and choose a root directory for your server – that is to say, the location where all of its files will be stored once it’s up and running. Finally, save your settings by clicking OK move on to step number three.

Step #3: Start a Server and Create a Database

With MAMP configured, it’s time to launch our local server. To do so click on the Start Servers button located in the tool’s main screen.

Once your server is up and running, the MAMP start page will open on your browser automatically. If not, you can open it manually by clicking on the Open Start Page option (also on the main screen).

Our PHP server is up now, so all that’s left is to create a MySQL database and add a user by following these four steps:

  1. Choose the phpMyAdmin option on the MAMP browser start page.
  2. Click on Create New Database, input the database name of your choosing, then select Create. Note that you may ignore the collation option on this screen.
  3. Jump over to the Users tab and select Add User, input the username and password of your preference, and click on Local to set the host correctly. Make sure you don’t forget those – you’re going to need them!
  4. You should now see the user you set up in the previous step. Click on Edit Privileges, choose Check All, and then hit Save.

At this point, you should have a working PHP server and a MySQL database with one user (you) that possesses full privileges. The only thing left on our list is to set up WordPress so that we can begin to tinker with it.

Step #4: Install WordPress Locally

A glance at the MAMP document root directory.

A glance at the MAMP document root

First things first – let’s download WordPress. Once the download is complete, open the file and extract the WordPress folder in the same location you designated as the root directory for your MAMP install.

Now, let’s kick off WordPress’ famous 5-minute installation by navigating to your local site, which should be located at either localhost:port/wordpress or localhost:port. Here are the values you should input in the form that will come up once inside:

  • Database Name: yourdatabasename
  • User Name (database): root
  • Password (database): root
  • Database Host/server: localhost
  • Table Prefix: wp_

Note that the database name above is simply a placeholder – you will need to input the database name you chose while configuring PHP during step number four. Also, make sure that your user name and password match those you established in step number three. Finally, type in the name of your blog and your email address, once the setup requests them.

There you have it — you’re ready to enjoy your local WordPress installation on your Mac computer!


Choosing to work in a live WordPress environment always carries risk. However, those willing to perform the (relatively) quick work necessary to install WordPress locally on their Mac machine will reap great benefits. A local WordPress environment enables you to mitigate risk, reduce downtimes, and can even boost your overall productivity.

If that sounds like a good deal, here are the four steps you need to follow to install WordPress locally on a Mac computer:

  1. Download and install MAMP.
  2. Launch and configure MAMP.
  3. Start a server and create a database for your WordPress site.
  4. Install WordPress locally.

Do you have any questions about how to install WordPress locally on Mac? Ask away in the comments section below!

Image credits: MAMP

This post may contain affiliate links, which means Nimbus Themes may receive compensation if you make a purchase using these links.

Leave a Reply

Your email address will not be published. Required fields are marked *