How to Locally Install WordPress on your Mac

Installing WordPress is one of those tasks that can be a little scary the first time. In this post we’ll walk step-by-step through the process to complete a local install of WordPress on your Mac. The process relies on some Mac-specific features, but some of the steps are shared with doing the installation or Windows, or a hosting account.

Having WordPress installed locally is essential for being able to make sensitive development changes without having to worry that you’ll break a live site. If you’re trying to get out of the habit of cowboy coding, this is the first step!

  1. Install MAMP if you haven’t yet. If you already have MAMP, open it and click “Start Servers.”
  2.  Download WordPress.

    (click to enlarge)

  3. Unzip your WordPress zip download and drag the folder into your “Sites” folder. (Or whatever folder you set up as the “Document Root” when you installed MAMP. Setting info is located under  “Preferences > Web Server.”

    (click to enlarge)

  4. In MAMP, click “Open WebStart Page” which will open a MAMP page in your browser.

    (click to enlarge)

  5. In the MAMP browser window that pops up, select “phpMyAdmin” under the “Tools” drop-down.

    (click to enlarge)

  6. In phpMyAdmin, you’ll create new database for this WordPress installation. Click the “Databases” tab and create a new database by typing in a name — remember it for later — and clicking “Create”.

    (click to enlarge)

  7. In your browser, visit http://localhost:80/wordpress. (Assuming your MAMP is serving on port 80, and you put WordPress in the wordpress folder.)
  8. Select your language and click “Continue.”

    (click to enlarge)

  9. We know our database details and already created the database. So we’ll click “Let’s go!” on the next screen.

    (click to enlarge)

  10. Enter your database details and click “Submit”.
    Database Name: your database from step 6 (mine was "wphp")
    User Name: root
    Password: root
    Database Host: localhost
    Table Prefix: wp_
  11. Click ‘Run the install”.

    (click to enlarge)

  12. Enter in the requested information: site title, username, password, and email. Because this is a local install and is only available on your computer, don’t have to worry too much about creating a secure password. Then click “Install.”

    (click to enlarge)

  13. You did it! Click “Log In”. You’ll be directed to the familiar WordPress login page, which should be located at http://localhost/wordpress/wp-login.php. Make sure you bookmark the URL so you can easily log in in the future.

    (click to enlarge)

Most Voted
Newest Oldest
Inline Feedbacks
View all comments
April 2, 2020 1:10 am

Hey there, thanks so much for this!

When I get to step 7 – It’s just showing up a completely blank white screen – any ideas?!

San Lu
February 17, 2020 9:41 am

Awesome instructions, worked on first shot. Less than 10 mins. and I was up and running wordpress locally on my mac!. Thank you!.

November 3, 2019 9:00 pm

Great guide, very simple, easy to follow!

Ryan Elizabeth
May 25, 2019 5:12 pm

Hi Harper,

Thank you so very much for this well-written and clear tutorial. I’ve been banging my head against a wall for weeks trying to figure out how to redesign a website “locally” before jumping server ships and then I stumbled on your tutorial. I followed your steps and it worked perfectly. I’m now editing away on my local server. Thank you SO MUCH for helping me work through this road block!!!

May 20, 2019 12:35 pm

Great tutorial! I am having some troubles, though.

When I try to do step 7 (going to localhost:///), I am getting “Error establishing a database connection”.
Any ideas on why it is happening?

Thanks 🙂

May 20, 2019 12:36 pm
Reply to  Augusto

oops, I meant localhost://PORT/FOLDER

Robert Hartung
May 5, 2019 9:39 pm

I have Apache2, php, and MySQL (all latest versions as of 5-5-2019) installed on my
Mac (OSX 10.14.2), and I just found your article . It seems that I could have saved a lot of time had I found it earlier.
I have a press user set up along with two other test users and each has it’s own Sites directory and they work. Now if I decide to install MAMP will it overwrite all my painstakingly modified .conf files in /etc/apache2?

It seems the would be much easier to use to set up WordPress.
I have WordPress 5.11 downloaded and ready to move to /Users/wpress/Sites.

Any suggestions appreciated. Should I start over after saving all my conf files.

April 13, 2019 3:27 am

Thanks so much! That was super easy and I had it installed in under 30 min. Great job on the simple instructions!

April 5, 2019 6:26 pm

Thank you do much! I’ve spent hours trying to find a solution to set up a local server with WordPress. There’re a lot of great solutions with really awful tutorials on how to install and configure them. Your instructions were so clear and straight forward. I’m very grateful!

My Wander Story
March 1, 2019 8:50 pm

Thank you for sharing this tips. I’m a beginner and I’ve been trying to install wordpress on my Mac and your tips are very helpful and easy to understand. Thank you again.

Thomas Fitzgerald
February 22, 2019 10:59 pm

Thank you so much. I just downloaded Semplice and was struggling so much with their installation instructions. Yours were so clear and easy to follow.

Alex Morco
November 1, 2018 8:39 am

Thanks for sharing this awesome article, it helped me a lot while installing WordPress on Mac, for the rest, I am using Cloudways WordPress optimized hosting and fixed through their managed platform.