Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Install WordPress Locally on Mac using MAMP

Do you want to install WordPress locally on Mac? Installing WordPress on your computer allows you to try out WordPress before you start a blog. In this article, we will show you how to install WordPress locally on Mac using MAMP.

Installing WordPress locally on Mac using MAMP

Tip: Not using Mac? We also have a tutorial on how to install WordPress locally on Windows.

How to Install MAMP on Mac

The first thing you need to do is visit the MAMP website and download MAMP. Once the download is finished, you will need to open the downloaded file and drag the image file inside it to your Applications folder. Next, simply follow the on-screen instructions.

Mamp Installer

After the installation, you can go ahead and launch MAMP from the Applications » MAMP on your computer.

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

Before you get started, we recommend configuring a few settings to make your MAMP experience better. You can do this by launching the Preferences menu and then switch to the ports tab.

Change Apache ports

Enter port 80 for Apache and then click on the OK button.

Setting Apache to use port 80 will allow you to access your local websites from http://localhost instead of http://localhost:8888. However this also means that each time you start MAMP servers, you will have to provide the admin password of your computer.

The next step is to set the document root folder. This will be the folder where you will create and store your websites. By default, MAMP uses /Applications/MAMP/htdocs/ folder, but you can change that to a more accessible location.

In the preferences dialog box, click on Web Server tab and then select the folder where you want to store your websites. Ideally, you should store each of your website in a new folder inside the Documents folder.

Select document root folder

You can name this folder anything you want. For example, htdocs, mywebsites, wpdev, etc. For the sake of this article, we will call it allwebsites.

Click OK to save your changes.

Installing WordPress on Mac

Now that you have set up MAMP, let’s go ahead and install WordPress on your Mac computer.

First you need to visit the WordPress.org website to download a copy of WordPress. After downloading the file, you need to unzip it.

Next, copy the wordpress folder inside and paste it into your MAMP document root folder. You can rename this folder to anything you want (example: mysite, wpbeginner, etc).

WordPress needs a database to store all website data, so you will need to create a database before we install WordPress. Don’t worry, it’s not as hard as it sounds.

Simply click on the Open Web Start Page button in MAMP application window. A new browser window will open where you need to click on Tools » phpMyAdmin from the top menu bar.

Open phpMyAdmin in MAMP

phpMyAdmin is a web-based application used to manage MySQL databases. In phpMyAdmin, you need to click on Databases and then create a new database.

You can name this database anything you want, but please write it down because you’ll need the database name in the next step. For this tutorial, we will call it test_db.

Create database to install WordPress

Now that you have created the database, it is time to install WordPress.

Go to http://localhost/mysite in a new browser tab. If you re-named the wordpress folder to something else, then use that name here.

You’ll now see the first step of WordPress installation wizard asking you to select a language.

Select WordPress language

Select the language that you want to install WordPress and then click on the continue button.

On the next screen, WordPress will tell you about the information you will need to complete the installation. Click on the ‘Let’s go’ button to move forward.

Next, you will be asked to enter your WordPress database information. You already know the database name from the step earlier. For username and password, you need to use root. For the database host, you need to use localhost.

Enter your database information

Once you are done, click on the submit button to continue.

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 the installation’ 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. Go ahead and fill in the form and then click on Install WordPress button.

WordPress installation

WordPress will now run the installation, and you’ll see a success message once it’s done.

Installation finished

You can now go ahead and login to the WordPress site installed locally on your Mac computer.

WordPress dashboard

Trying WordPress Locally on Mac

The purpose of a local install is to help you test out WordPress or develop a website on your computer. Here are a few things you would want to try.

Moving Your Local WordPress Install to Live Website

Once you have played with WordPress locally, you’ll want to move it to a live website. This is the only way others will be able to see your website.

To do that you’ll need a domain name and web hosting account. A domain name is your website’s address on the internet, and web hosting is where your website files are stored.

We recommend using Bluehost. They are one of the biggest hosting companies in the world and an officially recommended WordPress hosting partner.

Luckily, they are offering WPBeginner users discount on hosting and a free domain name. Basically, you can get started for $2.75 per month.

→ Click Here to Claim This Exclusive Bluehost Offer ←

Once you have purchased hosting, see our article on how to make a website to install WordPress.

If you built a complete website already on your local host, then you can go ahead and follow our guide on how to move WordPress from local server to live site.

We hope this article helped you learn how to install WordPress locally on Mac using MAMP. You may also want to see types of websites you can create with WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

157 CommentsLeave a Reply

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

  2. Great instructions! I was able to set up a site, but I needed to delete it and start over. I trashed the SQL database and the previous site folder. But when WordPress goes to install itself now, I get a huge error log in the browser saying that a ton of files, info “already exist.” Do I need to get rid of some other previously installed files and, if so, which ones?

  3. When I type in http://localhost/wordpress (I name the wordpress folder under the root folder of MAMP wordpress), it shows “404 not found. The requested URL /wordpress was not found on this server”. Can anyone tell me what I did wrong?

  4. These instructions are the best and easiest to follow out there. I actually used them to help my instructor set up WordPress on her new mac and I used them to set it up on the mac I use in my internship. Thanks so much!!!

  5. These are the best and easiest to follow instructions out there. I actually used them to help my instructor install MAMP on her mac. I had already used them to do it for my internship that I am participating in. Great Job!!!

  6. 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!

  7. Thanks for this tutorial – quick question for you: I’m designing a site for a client that I will have to build offline using MAMP, however I see the note about only being able to view it on my computer. Is there a way that my client (located in another state) can review the progress without making it live on their site?

  8. Oh god, thank you wpbeginner team so much. First time I’ve ever used MAMP and nothing seemed to say ‘Hey, for all you dummys, here’s how you install WordPress’- it just assumed we would know. *forever grateful*

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

  10. 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!

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

  12. 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…..do 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!

  13. 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 :)

  14. 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!

  15. 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!

  16. 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!!

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

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

  19. 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?

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

    Help!

    Thanks.

  21. 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!

  22. PLEASE HELP! I CANNOT FIND AN ANSWER AND IM ON A DEADLINE!

    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

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

      Admin

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

  24. 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….?

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

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

  27. 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 !

  28. 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?

    Thanks,
    Bob

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

      Admin

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

        Bob

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

    Thanks,
    Bob

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

  31. 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!!

  32. 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 ( example.com 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.

  33. 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?

    Thanks,
    Bob

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.