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
Special WordPress Hosting offer for WPBeginner Readers
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 experts 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 »


  1. Fannie says:

    When I’m in “phpMyAdmin”, I don’t see the tab “databases”, neither all the other options in the menu. I just see a table (grey and purple)… Someone know what I did wrong ?

  2. Laura says:

    Is there a newer version of this tutorial to go along with the current version of MAMP? The screenshots here are very different. Also, the instructions to create the document root aren’t very clear – first you advise putting it in a new folder in the Documents folder (which I did), but then you make it seem like it’s supposed to be in the MAMP folder in the Applications folder! I can’t get my localhost page to come up… This is my folder tree thingy…

    Macintosh HD\Applications\MAMP\htdocs\WEBSITES\name\wordpress

    What should my localhost address be?

    I’ve also tried putting the WordPress folder here…
    Macintosh HD\users\me\documents\WEBSITES\name\wordpress

    I’m very confused. :(

  3. Apoorv says:

    This is so helpful..!! Worked like a Charm.

  4. Charles Bewlay says:

    I installed everything – brilliant – and was working on installing a template from template vendor. It asked to select a Cherryframework zip file. I did and then everything went blank. I’ve not been able to see anything since. I realised I had selected the wrong Cherryframework file – not the one in the template folder but one from outside that I had downloaded earlier and just had in my “new website’ folder.

    I don’t really want to have to start from scratch. when I look at all my previous history I just get blank white pages.


  5. Charles Bewlay says:

    Many thanks guys, couldn’t have gone anywhere without you :-)

  6. Ed says:

    I’m developing WordPress sites locally and then move it to a live server when i’m done. But when i start new projects locally I don’t really know how to handle the old files from previous work and databases?? Shall I just delete database, files and everything and start again?? :)

  7. Michael says:

    Okay, so I setup my wordpress page using MAMP on my mac a few weeks ago and it was working and I was able to use edit the content. But going back to it now, I can’t seem to edit, just view my page. I start MAMP, go to the ‘WebStart Page’, click ‘My Website’ from the menu bar and choose my page. It loads, but I don’t see how I get to the WordPress editor??

    Please help…

  8. Carolyn says:

    It is unclear where to create the file below. I did not see this in MAMP or in the new window. If you are going to take people step by step in doing something, you need to be CLEAR!

    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

  9. M L Williams says:

    I have everything installed and working, only I followed other instructions and didn’t use port 80. Plus I ended up using the default site htdocs inside Applications.

    Is there a way I can have a do over, and reinstall everything the way you say to. I cannot may my site multisite, which was the whole reason I went down this rabbit hole.

    Thanks so much for the article. It is well written and very helpful, just what I was looking for. Just wish I had found it first.

    • WPBeginner Support says:

      Yes you can uninstall MAMP by simply visiting the Applications in Finder and then deleting MAMP.

  10. Dee says:

    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.

  11. Elisabeth Howlett says:

    Very Helpful Article, from grateful person thinking that I would NOT be able to pull off MAMP then WordPress install. I actually did it!!!

  12. Claire says:

    I’m having issues where i don’t get the option to ‘Create a Configuration File’. I have the WordPress database information window first, then I get an error ‘Error establishing a database connection’ screenshot below – but no option to create configuration.
    Am I doing it wrong? Any help would be greatly appreciated.

    • Gorish Aggarwal says:

      i too am getting the same error. did u find out how to fix it?

    • Liza says:

      I had the same issue. There was an auto generated DB password in my wp-config.php file, so I changed it to ‘root’ and it worked. Obviously you should change your password after you get everything working.

      /** MySQL database password */
      define(‘DB_PASSWORD’, ‘root’);

  13. SoHoWebStudio says:

    Thanks for the help folks. 1st time doing this stuff. It helps to have good instructions. Some steps have been automated, but that’s cool. Let’s see how it goes from here. One my way to building my website. Thanks again.

  14. Laura says:

    I installed MAMP and got WordPress running, but for some reason my changes to the CSS aren’t being reflected on the page. At first I thought it was a caching issue, until I realized that it’s reflecting other changes, such as adding an item to the navigation menu. It’s the custom.css file it’s not seeing. (I am using Thesis 1.8.5.) Does it have anything to do with my naming the root folder dev-site instead of htdocs? Also my WP installation is directly inside the root folder, not two levels down. Thanks for any ideas you guys might have. :)

  15. AM says:

    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.

  16. Gaetan says:

    Thanks to you guys I have successfully installed WordPress on my computer. Now I have one more issue :
    I already have a live wordpress blog that runs via the online web version of wordpress at
    How can I access the blog I already created via the web version on the version I just installed on my computer?

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.