Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
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 WordPress.org. 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 »

Comments

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

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

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

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

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

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

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

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

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

  10. 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 wordpress.com.
    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.