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 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. Hello,
    I tried to follow this tutorial but got stuck when I had to go to the localhost
    I changed to root in MAMP… my browser returns an empty white page
    I don’t understand what the localhost stands for (is it the root on my MacBook or is it the root that I set during the setup of MAMP ?

    • It is the URL that MAMP sets up to go to the folder on your site and properly load your site. If you changed the address for MAMP then you would need to go to that updated address.


  2. I pop the URL Desktop/Wp_docs/vh_website into a new browser tab and ‘This site can’t be reached’. Can you please help?

  3. Thank you for this tutorial! I have successfully installed MAMP and have WordPress running locally. I’ve played around with it but would like to delete it now because I won’t be using WordPress anymore. What is the best way to do this?

    • You could uninstall MAMP and delete the folder with your site information.


  4. If localhost/mysite didnt work for you, check that you MAMP is running then click Webstart > My Webiste > Language and so on.

    Thank you for the post,

  5. Having set up on my desktop (thank you so much!) and begun to build, I was trying to transfer everything to my laptop by copying the MAMP folder and the Mysite folder with all the WordPress files to the exact same places as my desktop. But I am unable to get it to work after a good few hours trying to figure a way through.

  6. Nope, doesn’t work if you don’t understand computer science. This bit here – Go to localhost/mysite in a new browser tab. If you re-named the wordpress folder to something else, then use that name here – requires more explanation. I have no idea what to type in the browser.

    • If you did not name the folder where you placed the WordPress files ‘mysite’ then you would replace the mysite in the URL with the name of the folder you decided to use.


  7. I am running into an issue with the WordPress Installation Wizard on my browser, nothing is loading its just a blank screen, there are no errors displayed. Any advice?

    • You would open the MAMP program and if it gives the option to turn off your server then MAMP is running.


  8. wow, after 3 days messing around with other instructions I followed these and bingo I have wordpress running on de mac. Thank you.

  9. Success! Thank you for these instructions. It took a little trial and error a few times, but I ultimately figured it out. One thing that tripped me up for a while was that apparently I needed to click on “start servers” in MAMP before the “Open web start page” would allow me to click on it. I didn’t see that anywhere in the instructions, so maybe that will help someone else. Thanks again! Onward with playing around with WordPress :)

  10. The wordpress page was not opening on my Mac… then i changed localhost port setting back to 8888… and then it worked

  11. Thank you for the very helpful article! Other articles were not up to date and the links to other articles at the end are useful :)

  12. I managed to install wordpress finally and logged in, but once everything is closed and I want to get back to my local wordpress site, how do I access it? I feel like a total ditz right now…lol

    • You would visit the localhost address you visited before and ensure MAMP is running before you try to visit the address :)


  13. How do you fix this issue? I see this when trying to access wordpress admin area

    This page isn’t workinglocalhost is currently unable to handle this request.
    HTTP ERROR 500

    • You would want to ensure MAMP is running for the most common reason for that issue.


  14. Thanks for the tutorial. Just one thing I’d like to mention… changing the default location of htdocs to one in my documents folder meant MAMP didn’t work. Changed it back to applications > MAMP > htdocs and it worked.

  15. When I put localhost/mysite in browser, I changed the folder´s name to wordpress_beginner so I put
    localhost/wordpress_beginner in browser, but get error can´t find it??

    • You may want to start by trying localhost and if that is not displaying correctly then you would want to ensure MAMP is running and does not have any errors.


  16. I copy the worpress folder to mamp folder and rename that folder with mysites name. When I try to run localhost:8888/mysites it gives

    The requested URL /mysites/index.php was not found on this server.

    Please help me

    • Just in case, you would want to ensure MAMP is running when you try to visit the local installation


  17. I get to the point of “Simply click on the Open Web Start Page button in MAMP application window”, but this option is greyed out and unclickable.. any thoughts on why this might be?

    • One of the services may not be running correctly, in the tip right of the MAMP window there should be icons for each service with a green dot, if one of those isn’t green then that service could be the root of the issue.


  18. I followed all the steps up until the installment, but I can’t open my http:localhost page, it just says error or unable to open on my screen. I’m not sure where I’m going wrong here, please let me know what else I should try!

    • If you’ve come back after restarting your computer you would want to ensure MAMP is running so the local install can be found


  19. Hey there, I have downloaded WordPress and created a database, but when I type localhost/mysite into the address bar it gives me a 404 not found error.
    I just kept /Applications/MAMP/htdocs/ as my root folder, and I renamed the wordpress file to mysite. right now the wordpress folder is in htdocs, is that where it’s supposed to be?

    • That all looks correct, are you certain MAMP is running before you tried to visit that address?


  20. How do I restart WP on my mac to continue working on my site, I can’t find any info on how to do that.


    • You would need to run MAMP again for the site to be findable at the address if that is what you mean.


  21. Wow. SUPER COOL and kind of you to take the time to post. This website is fantastic. THANK THANK THANK YOU!

  22. I got to the point where you instructed to copy the WordPress to the MAMP Document root folder, AND you gave not a clue as to just where that might be found on my mac mini.

    I dug through the MAMP files and folders (post install) and can find nothing like you reference. My opinion is your instructions are, without this small piece of info, useless.

    • Some users may have changed where it is installed but normally you should see your MAMP folder in your Applications folder.


  23. Oops! Looks like MAMP isn’t free anymore. I get as far as “Open WebStart Page” only to be directed to the website to purchase.

    • From taking a look, they bundled the pro and free versions together. You should still be able to run MAMP for free :)


  24. Hi, thanks for the great post! I have MAMP installed since a WordPress training I took suggested it. Does having MAMP serve as a localhost for testing my site serve the same purpose as using a subdomain as a staging site? I’ve read your articles on the latter, and am trying to understand. I guess one difference would be that if I used the MAMP method, I would always have to use my Mac; if I used a subdomain and just made it private, I could test from any computer. Am I thinking of this correctly? Basically, I am a beginner planning to start a blog, and want to make sure I have a testing environment. Thanks!

    • Hi Andrea,

      Yes, using MAMP you can create websites on localhost. These websites will only be accessible only on your computer. A staging website is on a live server that can be accessed using any computer.


  25. Be aware that with MAMP 4.1.1 and PHP 7.1.1, you will see phpMyAdmin grayed out. The solution is to go into MAMP click the PHP tab and change PHP to 7.0.15. Presto !

    By default MAMP shows only two versions of PHP , so if you don’t see 7.0.15 on list then rename folders with PHP versions you don’t want to use in the Applications/MAMP/bin/php folder.

  26. I have changed the database charset in creating database tables, now I can not view my wepage or even in wp-admin. How do you find the database names from MAMP on a mac to change the database name back? Thanks

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

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

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


  30. 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?? :)

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

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

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

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

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

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

    • 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’);

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

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

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

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

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.