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.”

    install-wordpress-2

    (click to enlarge)

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

    install-wordpress-3

    (click to enlarge)

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

    wordpress-install-4

    (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.”

    wordpress-install-7

    (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.

    wordpress-install-8

    (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_
    wordpress-install-9
  11. Click ‘Run the install”.

    wordpress-install-10

    (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.

    wordpress-install-12

    (click to enlarge)


9 Responses

Comments

  • Alex Morco says:

    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.

  • Thomas Fitzgerald says:

    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.

  • 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.

  • Alan says:

    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!

  • AussieGirl says:

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

  • 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.

  • Augusto says:

    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 🙂

  • 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!!!

Add a Comment

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