Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How to Install WordPress Locally on Mac using MAMP

Last updated on by
Follow WPBeginner on YouTube
How to Install WordPress Locally on Mac using MAMP

Recently we published an article about how to install WordPress on your Windows computer using WAMP. As expected, we started to receive emails from our readers asking how to install WordPress in their Mac computer. Actually it is quite similar to Windows and in this article we will show you how to install WordPress locally on Mac using MAMP.

MAMP is an easy-to-install compilation of Apache, MySQL, and PHP bundled together for Mac. Using MAMP you can install WordPress on your Mac and test drive it. Most WordPress developers and designers use MAMP on their Mac for development purposes. However, your website on MAMP is only visible to you. In order to make it live you would need WordPress hosting.

How to Install MAMP on Mac

Go to the MAMP website and download MAMP. Once the download is finished, open the downloaded file. Drag and drop the image file inside it to your Applications folder. Follow the on screen instructions. You can now launch MAMP from Applications » MAMP.

Note: MAMP also installs MAMP Pro, so remember to click on the right one.

Starting MAMP in Mac OS X

Before you get started, we recommend that you configure it to your liking. Click on the Preferences button to change the options. You will see a new dialog box. Lets start with the Ports tab. You need to enter ports which will be used by Apache and MySQL. Enter port 80 for Apache, and 3306 for MySQL. Setting Apache to use port 80 will allow you to access your local websites from http://localhost instead of http://localhost:8888. However, using port 80 also means that each time you start servers you will have to provide the admin password of your computer.

MAMP configuring Apache and MySQL ports

The next step is to set document root. Document root is the folder where you will create and store your websites. In the preferences dialog box, click on Apache and select the folder where you want to store your websites. Ideally, you should store your websites in a new folder inside your documents folder. You can name this folder anything you want, htdocs, mywebsites, wpdev, etc. For the sake of this example, we will call it mysite.

Select the location to store your websites in

Click OK to save your changes. On the MAMP app screen make sure both Apache and MySQL servers are running.

Installing WordPress on Mac

Download a copy of WordPress from Extract the zip file, copy the wordpress folder inside it and paste it in your MAMP document root folder. Rename this folder to anything you want e.g. mysite.

Click on Open Start Page button in MAMP application window. A new browser window will open. Click on phpMyAdmin from the top menu bar.

MAMP start page

phpMyAdmin is a web based application used to manage MySQL databases. In phpMyAdmin click on Databases and then create a new database. You can name this database anything you want. We will use this database name in the next step.

Creating a database in phpMyAdmin for WordPress

Open a new browser window and type http://localhost/mysite. If you re-named the wordpress folder to something else, then use that name here. WordPress will notify you that it was unable to find wp-config.php file. Click on Create a Configuration File button.

Create a Configuration file for WordPress in MAMP on Mac

On the next screen provide your database information. In the database name field, enter the name of database you created earlier. For database username and password fields use root. Use localhost as your database server.

Provide database information in WordPress in MAMP on Mac

WordPress will now connect to your database and create a configuration file for you. After this it will show you a success message. Click on Run Install button to proceed.

On the next screen, WordPress will ask you to provide your website information, choose a username and password, and enter an email address. Fill in the form and then click on Install WordPress button.

WordPress Installation Screen

WordPress will now run the installation script, create tables inside database and set up your website. You will see a success message once the installation is complete.

WordPress installation success message

That’s all, now you can run WordPress on your Mac using MAMP, just like you would run WordPress on a live web server. Just launch MAMP application to start your local server and use WordPress. Once you have played with WordPress on your localhost, then you can install WordPress on a live site.

Migrating from MAMP to Live

After numerous request via twitter, facebook, email, and comments in this post, we have written a guide on how to move WordPress from MAMP local server to a live site. Hopefully you guys will find it helpful when you are ready to deploy your local site to production.

We hope that this article helped you install WordPress on Mac using MAMP. For questions and feedback please leave your comments below.

Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »
  • Dee

    Just wondering – what is the whole point of installing this on a MAC if we can work through the WordPress website? I’m trying to understand if I should bother downloading this onto my MAC or if it’s ok to just work through the regular website. Thanks.

  • AM

    I had this problem too. First I moved the root document folder from my desktop to ‘my documents.’ Then I changed the root in MAMP. When I ‘opened the start page’ I went to phpLiteAdmin and created a database there. Although wordpress said it couldn’t find the name of the database I had created there (I used the phpMyAdmin database name) I think it still got rid of my 404 error not found.

    • Tay

      Did you guys change the port numbers?

  • WPBeginner Staff

    Since we don’t know what went wrong when you deleted the site earlier. We would recommend you to create a new site. Basically repeat the whole process all over again. Except this time create a new directory in your document root folder. Do the same with MySQL DB. Then install WordPress in the new directory using your new MySQL DB.

  • Julie Valin

    Thank you very much for this great step-by-step tutorial! Very helpful for this first-time MAMP user, when at first I felt overwhelmed. Now I’m feeling informed and happy, and I always like to comment on those posts/tutorials that have really helped me. Kudos!

  • WPBeginner Staff

    You can set up a staging environment for on a live server. Take a look at our guide on how to create staging environment for a WordPress site

  • Frank

    Too easy guys, thanks a lot!

  • Alex Koch

    Really appreciate your help. MAMP 3.0.3 comes with a slightly different interface and a different setup – you have to redirect Apache to /bin/phpMyAdmin/ in oder to setup your mysql database for wordpress and THEN redirect Apache to you actual root directory localhost/mysitewahtever/ where you put wordpress.

    WordPress can access the db nevertheless.

  • Rich

    Thank you for this easy to follow guide! I finally got the motivation up to move forward with a project I’ve almost completed and this guide really helped. Thanks again!

  • megan Dickson

    This was AWESOME. SO EASY.
    Thank you!

  • Tim Aldiss

    Really useful, thanks

  • Tom Nguyen

    Is it possible to receive emails from WordPress installed on a local server? I’m only asking because I had installed WordPress and forgot my administrator password. I click the Lost Your Password link to start the password reset process, but I never received an email.

    I just ended up going to the local phpMyAdmin interface and reset the password that way.

  • Kate

    I made an assumption when installing mamp/wordpress with my website name. The “website name” I used to set it up using your tutorial is not my website name my business currently owns and I am redoing. I thought if I used that one it would mess up the current site. So… I have to go back and put my “real” website name in the install files or can I just switch it over to my current domain name when I am done with the new wordpress site? Thanks!

  • Leigh

    hey :)

    followed steps ….up to setting up to part of .. new database – used test_db as per example

    opening http://localhost/mysite in browser and getting 404 kicking out.

    should be saying …
    WordPress will notify you that it was unable to find wp-config.php file. !!!

    …directory set cool , to mysite
    ///using default mamp ports

    thanx for help in advance man !

    smiles :)

  • Kate

    I guess the issue was that I named my wp folder that contains all my wp files in hpdocs folder within MAMP using 2 words. Therefore I put a space in between and when I went to put the local host/mydomainname/wp-admin/ address to find my dashboard I apparently had to add a %20 due to the space. It seems to work now so I think I did it right! Thanks again for your sites guidance and prompt help. I really appreciate it and have added your site to my bookmarks and subscribed!

  • Kate

    Well apparently it was so simple I was missing the part that I needed to put the _db after my new database I created :) Solved!

  • Kate

    I am switching to wordpress from drupal and I appreciate and value your great resources and thorough steps coming from a newbie with no tech experience and knowledge!! I am having the same problem that Jen did above (12/12/2013). I’m using a Macbook Pro and got as far as trying to figure out whether the database that I set up in my wp-config file exists. I did the steps you recommended (it says all privileges are granted in my root user) , but maybe I’m doing it wrong cause I’m still getting the same error message as she did? Maybe I need another way of explaining the steps? I closed Skype and ensured websharing wasn’t on, but that didn’t change anything. Totally stumped!!

    • WPBeginner Support

      Kate once you start MAMP, you need to go to http://localhost/phpmyadmin create a new database. Open your wp-config.php file and enter the database name on the line:

      define('DB_NAME', 'YourDBNameHere');

      Let us know if this solved your problem.

  • Daniel

    Thanks for the guide.

    Now i have installed wordpress onto my mac, and have created a website. How do I go about starting a new website?

    Thanks Dan

    • WPBeginner Support

      Repeat the process by installing WordPress in a new directory (folder) and by creating a new database.

  • Syed

    I am going through a nightmare. Thanks to your instructions, everything was running fine until today when I clicked on upgrade to the new MAMP version and went for an install, thinking that it will happen in the background.

    It appears that the upgrade has either erased my data or has put it away. Incidentally, I had a full copy of the main drive on a different drive (the whole MAMP folder). I can see the folders and files in both places but when I try to start MAMP from the different drive where the old MAMP folders are placed, it still boots up with the new version and I can’t start my site.

    I have no way to really know what to do next. Kindly help. Thanks

  • netyx

    Thanks for the guide!

    I have a problem though. I created a database and then MySQL server crashed. It’s not working anymore. Could you help me please anyone?

  • arzu

    very helpful, thank you :)

  • Art

    Yeah dude, this was very helpfull, thanks a lot!

  • Derek

    Great tutorial. Thanks. It all worked fine for me until the very end. After I successfully installed wordpress I clicked on “View Site” and got a white splash screen that says “Your Website” followed by instructions on how to make it “live.” I don’t want to go live. I just want to work on building a theme locally. But for whatever reason, I’m just not able to view the site.



  • Ian

    Perfect guide, much appreciated

  • Brandon

    A breeze. Many thanks!

  • GH

    Thank you so much. Very helpful explanation.

  • Jen

    I just installed MAMP and my servers won’t start. Have you ever had this problem before? I tried restarting and re-reading the steps, thanks!

    • WPBeginner Support

      check error logs in the directory where you installed MAMP

  • Jen


    So everything was working until I clicked the ‘open start page’ button. Originally it just populated a web browser that only said:

    It Works

    Then, after refreshing it send me straight to the create config screen for wordpress and skipped the database start section. When I submitted the information your tutorial included it says :

    “We were able to connect to the database server (which means your username and password is okay) but not able to select the (my database name) database.”

    What do I do to fix this?? I was reading online and it says that there are some issues with Mac Mountain Lion, so I turned off the web sharing, which was the solution for this problem on all other sites. Please please please help!!

    – Jen

    • WPBeginner Support

      Jen, open your wp-config.php file which is located in your WordPress installation’s root directory. Look at the Database, database username and password sections. Go to phpmyadmin by typing

      http://localhost/phpmyadmin in the browser. Make sure that the database name in your wp-config file exists. Also check that the username used in wp-config file has all privileges by clicking on the Users tab in phpmyadmin.

  • brad

    i rescind my prior victory, when i finished working on my site, I stopped the servers and quit MAMP. When I restarted MAMP to work on a new project a few hours later I am unable to access any files in htdocs without a 404 error. MAMAP support forums have almost no responses to this issue, any one here have this issue? Any possible help? I’m not a tech person, just a designer so this is mostly greek to me.

  • Brad

    Thanks for a simple and well explained tutorial! I got this up and running in under 15 mins!

  • Daniele

    Thank you guys! Really helpful for a young Mac user like me!

  • jeroen faber

    Great guide!
    One thing: the following line in the guide:

    “Open a new browser window and type http://localhost/mysite.”

    didn’t take me to the WordPress installation screen, just typing “localhost” in the browser did.

    Did i make some mistake in the configuration or….?

    • WPBeginner Support

      seems like you have installed wordpress in your main www or htdocs or web directory under your Apache installation.

  • Dee

    Thanks for this, it was really easy to follow and I had no problems at all!

  • Ton in ‘t Veld

    I’ve made many sites already with Dreamweaver. Now I want to set up a WordPress blog for my wife. I installed MAMP. So far so good. In the preference I tried to start the servers. MySQL Server worked immediately, but the Apache server doesn’t go to green. I alreadyI switched off Skype (as advised before.

    Many thanks for looking atmy problem.

    • WPBeginner Support

      Sometimes skype is running in the background check in the activity monitor to make sure that skype is not running in the background.

  • George

    Everything was going well until I got to, http://localhost:8888/wordpress. For some reason the Apache Server wouldn’t start with a port of 80. Please tell me what I’m not doing or doing wrong.

    Thank you,

    • Editorial Staff

      This is happening if you have Skype running. You need to change the port in Skype or quit skype while using Mamp.

  • Justin

    That was exactly what I needed. One hang up I had was that “Web Sharing” was turned on in my Mac OSX “System Preferences.” It was causing a duplicate Apache server to run, which prevented phpmyadmin or the “Start Page” from running.

    • Editorial Staff

      Thanks for sharing that with us Justin. Hopefully it will help others who read the comments :)

  • Jonas

    Followed your instructions an successfully installed WP. Many thanks :)

  • JaY Srivastava

    Thanks for saving me real time, i knew how to do that on windows, but since i use my mac as my main work laptop it was getting difficult for me to test websites.
    I have been always fan of wpbeginner but now i guess it has grown more.

    Thanks Again !

  • RW

    Been using my first install of mamp ever since I read this tutorial. The only thin that I’m struggling with is, porting it over to a live production site. I’m assuming I have to export my DB and then import it using phpmyadmin, but obviously, some things will have to change. Also have to manually upload all upload folders as well.

    Does anyone have recommended workflow ideas?


    • Editorial Staff

      If you have BackupBuddy, then you can easily create a full backup file and import that. To do it manually:

      1. Install WordPress on new site and copy/paste the /wp-content/ directory from the old site.
      2. Import all content using phpMyAdmin
      3. Change the site_url and home_url options in wp_options to reflect the new site.
      4. Login to the new site and go to Settings > General and click on the save button.
      5. Go to Settings > Permalinks and click on the save button.

      • RW

        perfect! thanks! never loved backupbuddy as it didn’t reliably work for me. the manual approach looks simple! thanks so much!


  • RW

    I’ve been using MAMP for a week now and absolutely love it. Makes testing so much faster!


  • Gautam Doddamani

    i have been using XAMPP from a long time and its serving me well…it has the same functionality as MAMP and perfectly runs on a mac :D

  • Raihan

    this post is very useful to me. for this i saved this page

  • Gunstra

    Great Tut, thank you.

  • Debbie

    Finally, concise, step-by-step instructions on how to set-up WordPress. I have followed other instructions and still get lost on what to do. Thank you so much!!

  • Christopher Anderton

    I’m using MAMP myself, however, there is a even simpler way to get up and running in notime using MAMP Stack ( and the WordPress module (see the modules section at the page).

  • Luke

    Definitely a useful process! I wish I had this article the first time I tried to set this up. It would have been a huge help!

    What’s your opinion on modifying the hosts file to allow using a DNS name for the local site ( instead of localhost )? Good practice? Bad practice?

    I’ve personally found it helpful when transferring a site I’ve developed locally to a live server.

  • RW

    That’s so helpful. I’ve read about doing this and I think it will save so much time working locally on sites. I guess it has to be configured (or reconfigured) for different sites?