How To Install WordPress Locally On A Mac Using Mamp (Guide For Beginners)

In this post, I’ll show you how to install WordPress locally on a Mac computer using MAMP.

If you have a WordPress website then I’m sure you love to spend time messing around with it, tweaking it endlessly.

Hey, I’m exactly the same, I love messing around with my site. I think it’s a great way to learn how to do new things with WordPress.

These days, however, I try not to do too much messing around with my actual live site.

Reason being is that if I make a mistake, I could bring down my entire site.

And the headache of trying to fix things I could do without.

I much prefer to mess around with a WordPress site that is actually installed locally on my Mac.

There are some advantages of hosting a WordPress website locally on your computer, here are some of them –

  1. You can do all the messing around you want without running the risk of breaking your live site.
  2. You can access your site offline since it’s installed locally on your Mac.
  3. If you’re a web developer like myself, a great way to start a new project is locally, before moving it over to a staging or live site.
  4. You save yourself money on additional web hosting resources, and you don’t need to purchase a new domain for your local site either.

OK, so now let’s get on with the detailed tutorial on how to install WordPress locally on your Mac.

I’m running a 2016 MacBook Pro with Touch bar with the latest version of Mac OS, however, it really doesn’t really matter which version of the OS you’re using or how old your Mac is, this tutorial is universal.

Are you ready? Let’s get to it.

Step One: Go get yourself a beverage of your choice

You know what I love sipping on whilst I’m working on website projects?

Well, it’s either a blackberry iced-tea mojito, or a nice flat white coffee with a double shot of espresso, or, a caramel macchiato coffee.

You can choose what ever beverage you prefer.

Step Two: Download and install MAMP on your Mac

OK, so now we really begin.

Head over to the MAMP website to download the latest version of the MAMP app. Here is the link.

Remember to download the version for Mac OS X, unless of course, you’re using Windows.

Step Three: Install MAMP

OK so once you have downloaded MAMP, go ahead and unpack the files and run the installer to add the software on your Mac computer.

This process is fairly simple as you are guided through the steps. See images below.

Once the installation is complete, you can go ahead and close the box. See image below.

Step Four: Launch Application

OK so now find the MAMP application on your computer and double click on it to launch it.

Once the software has loaded, hit the Start Servers button.

Both the Apache Server and the MySQL Server lights will illuminate green shortly after. See image below.

Shortly after starting servers, the WebStart page should automatically load in your web browser. If it doesn’t just click on the Open WebStart page link. See image above and below.

Step Five: Create a database

Right, you now need to create a database for your WordPress install.

So, in your web browser, open a new tab and enter the following URL:

localhost:8888/MAMP/index.php?page=phpmyadmin#

What you should see is the phpMyAdmin page like this –

What you’ll need to do to create your database is the following –

  1. Enter database name – To keep things very simple, name your database something like WordPress1 or Installation1. Adding a number after the name will help you keep databases organized each time you want to create a new WP installation. See image above.
  2. Leave Collation as it is.
  3. Hit create – Once you’ve added the database name, just hit create and it should appear in the left-hand file tree. See image above.

And that’s it for the database for now.

Step Six: Download WordPress and add to htdocs file

Next, go to the WordPress.org website and download a fresh version of the WordPress software. See image below.

Now open the download file on your Mac where the zip file of WordPress should be.

Then go to Finder > Applications > MAMP > htdocs, and using drag and drop, move the zip file of WordPress from the download file to the htdocs fileSee image below.

Next, double click the zip file of WordPress to unpack it. Once it has unpacked, delete the actual zip file and leave the unpacked file in place.

The next step is very important.

Rename the unpacked WordPress file to match the database name you created in step five. So in this instance, rename it WordPress1 or Installation1See image above.

Step Seven: Install and configure WordPress

The final stage of this tutorial is to install WordPress.

First, head over to:

http://localhost:8888/wordpress1/wp-admin/setup-config.php

In the URL, don’t forget to change the name of the file to match the WordPress file name in htdocs and the database. In this instance, WordPress1 or Installation1.

I have marked this in red above.

Once you’ve entered this address and hit go, what you should see is a WordPress config setup pageSee image below.

Follow the steps until you get to the config options pageSee image below.

Here we’re going to add information about the database you created earlier for this WordPress installation.

When you’re ready just hit the Let’s go! button as shown above.

OK so let me walk you through the process shown in the above screen capture.

In Database Name, simply add the name of the database you created earlier, which is either WordPress1 or Installation1, or whatever else you named it.

In Username add the word root.

The Password is the same, root.

For Database Host put localhost.

And finally, you can add a Table Prefix number such as wp_1 or what ever number you want.

This is just to help you remember which database is for which WP installation later on.

Once you’re ready, simply hit the Submit button as shown in the image above.

If all goes well, you should see the message as shown below appear. Simply hit Run the install to continue…

So, shortly after, you should see the Welcome message with a request for some additional information.

This information is about your actual WordPress site.

If you look at the screen capture below, you’ll see most of it is pretty self-explanatory.

  1. Give your site a title.
  2. Add a username for the site, something simple like Admin is fine enough.
  3. Enter a password to access the site.
  4. Enter your email address.

Important: Make sure you make a copy of the username and password so that you can log into your site later, this is very important.

Once you’re all set, hit the Install WordPress button.

Hey, you’re so close now and almost done.

Once the installation has completed you should see a success message.

You’re all done and dusted. You can now hit the Log In button to launch the Login page.

Enter your name and password you created a few moments ago to access the admin area of your new locally hosted WordPress site. See images below.

Installing more WordPress installs locally

If you want to create a second WordPress installation on your Mac, simply go back to step five and create a new database.

You can name it something like WordPress2 or Installation2.

After, follow the steps to the end of the tutorial again.

Wrapping up

So that’s it. That’s how easy it is to install WordPress locally on a Mac, and as I said, this is a great way to mess about with a new theme, plugin, or just learn how to do new things with WordPress, all without messing around with your live site.

I hope you’ve enjoyed reading this tutorial, don’t forget to check out my other useful tutorials on my recommended posts list below.

Leave a Reply

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