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

How to Install WordPress Locally on Mac (2 Easy Ways)

Do you want to install WordPress locally on Mac?

Installing WordPress on your computer gives you the chance to try out WordPress before starting your blog or website. It’s also a great way to experiment with themes and plugins before publishing your site online.

In this article, we will show you two ways to install easily WordPress locally on Mac.

Installing WordPress locally on your Mac computer

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

Why Install WordPress Locally on Mac?

Normally, you need a web hosting account and a domain name to make a WordPress website.

However, the core WordPress software is free to download and can be run locally on your computer.

This local WordPress site is not generally available on the internet, and it can only be viewed on your computer.

The advantage of this approach is that you can privately practice using WordPress, try it out, and see what type of websites you can make.

You can also use this local installation to test different WordPress themes and plugins before installing them on your live website.

What Do You Need to Install WordPress Locally on Mac?

WordPress is written mainly in PHP, which is a server side programming language. To run PHP, you’ll need a web server software. You’ll also need MySQL database management system installed for your web server software.

Now, installing all these software independently and making them work with each other sounds like a daunting task.

Luckily, there are free development tools that make it super easy to install them as one package even for non-techy users. We’ll show two of them in this article.

That being said, let’s take a look at how to easily install WordPress locally on Mac without any special server administration skills.

1. Install WordPress Locally on Mac using Local WP (Recommended)

Local WP is a WordPress development tool that allows you to easily set up local server on your Mac computer. You can also use Local on Windows and Linux as well for setting up WordPress.

First, you need to visit the Local website and click on the Download button at the top right corner of the screen.

Local by Flywheel

This will bring up a popup where you need to choose Mac as your platform.

Choose Mac as your platform

Local will now ask you to complete a short form.

After typing in your name, email address, and phone number, you can go ahead and click on the Get it Now button.

Download now

This will download the Local installation file to your computer. As soon as it’s finished downloading, you can double-click to open the downloaded file.

This will launch a setup wizard, which will guide you through the process of installing Local on your computer.

Mac users simply need to drag the Local app into their Applications folder.

Install Local on Mac

Once the installation is finished, you’ll be able to launch the Local app from the Applications folder.

Upon first launch, you may be asked a few questions and create a free Local account. These steps are optional, and you can skip them if you want.

Creating a WordPress Website in Local

Local makes it very easy to quickly create a local website and install WordPress.

Simply click on the Create site button to continue.

Create new site

On the next screen, you’ll need to enter Site name and click on the Continue button.

Enter sitename

Next, you’ll be asked to choose your platform. Local allows you to choose which version of PHP, Apache, and MySQL you want to use.

Choose platform

If you are unsure, then choose the Preferred settings and click on the continue button.

Finally, you will need to enter WordPress username and password, and then click on the Add Site button.

Local will now download and install WordPress to create your website. You may be prompted to enter your Mac username and password to make changes.

Once finished, you’ll see information about your newly created website with buttons to visit the WordPress admin area or view your local site.

Local site info

You can now visit your website or login to WordPress admin area.

Locally installed WordPress dashboard

After that, you can use your WordPress site just like you would manage a live website. You can install plugins and themes and design your website as you see fit.

2. Install WordPress Locally on Mac using MAMP

MAMP is a popular program that allows you to run WordPress on your Mac computer.

First, you need to visit the MAMP website. Here you should see the latest version of MAMP & MAMP Pro.

MAMP for Mac

MAMP has separate downloads for different versions of the macOS operating system.

Not sure which version of macOS is installed on your computer? To find out simply click on the Apple icon in your computer’s toolbar.

How to check your version of macOS

You can then click on About This Mac.

This will open a popup that shows lots of information about your computer. This includes your version of macOS.

The 'About This Mac' menu

You can now download the correct version of MAMP for your operating system.

Once your download is finished, double-click on the MAMP .pkg file. This will launch the MAMP installer.

The MAMP for Mac installer

Now simply follow the onscreen instructions to install MAMP.

After installing this program, you can go ahead and launch MAMP by opening your computer’s Applications folder.

Here you’ll find two versions of MAMP. MAMP Pro is the paid version, so make sure you select the free version.

The free version of MAMP for macOS

Inside this MAMP folder you’ll find various files, plus a MAMP application.

Double-click to launch the MAMP app.

How to run WordPress locally using the free MAMP app

Before you get started, we recommend configuring a few settings to make your MAMP experience better.

To make these changes, just click on ‘MAMP’ in your toolbar. You can then select ‘Preferences…’

MAMP's preference settings

In the popup, select the Ports tab.

You can now check which Apache Port MAMP is using. We recommend switching to Apache Port 8888 if MAMP isn’t already using this port.

The Apache Port settings

The next step is setting your document root folder. This is the folder where you will create and store all of your local WordPress websites.

By default MAMP uses the /Applications/MAMP/htdocs/ folder, but you can change this to any other location.

In the ‘Preferences…’ dialog box, click on the Server tab. You should now see your document root.

MAMP's document root

To store your sites in any other folder, click on the ‘Choose…’ button.

This will open a popup where you can choose a new location. You may also want to create a new folder where you’ll store all your WordPress websites.

Creating a new folder for local WordPress

You can name this folder anything you want.

For the sake of this article, we will be storing our websites in a folder called ‘allwebsites.’

Creating a new folder for local WordPress

Installing WordPress on MAMP

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

First you need to visit the WordPress.org website and download the latest version of WordPress core.

Download WordPress

NOTE: There are two versions of WordPress. For more details, see our comparison between WordPress.com vs WordPress.org.

After downloading the file from WordPress.org, you just need to unzip it. This will create an unzipped ‘wordpress’ folder.

Now simply copy this folder into your MAMP document root folder.

Since we changed the document root folder, we need to copy ‘wordpress’ into applications/MAMP/htdocs/allwebsites.

How to install WordPress locally on Mac

WordPress needs a database to store all of its content and data. You’ll need to create this database before you can create a local website.

Don’t worry, it’s not as hard as it sounds!

In the MAMP ‘Preferences…’ window, simply click on the OK button. This should launch the MAMP application in a new browser tab.

The MAMP welcome screen

Our next task is launching phpMyAdmin. This is a web-based application that you can use to manage your website’s MySQL database.

In the toolbar, click on Tools » phpMyAdmin.

How to launch WordPress' PhpMyAdmin

This will open phpMyAdmin in a new tab. In the phpMyAdmin dashboard, click on the Databases tab.

You can now type a name for your database into the ‘Database name’ field. You can name your database anything you want. Just be sure make a note of the name, as we’ll be using it in the next step.

For this tutorial, we will call our database test_db.

Creating a WordPress dashboard

After typing your database name, click on the Create button.

PhpMyAdmin will now go ahead and create your database.

Creating a WordPress database for your local website

Now it’s time to install WordPress.

In a new browser tab, simply go to http://localhost:8888/ If you’re using any port other than 8888, don’t forget to change this URL to mention your port.

You should now see a link to the ‘wordpress’ folder you copied into your root document folder.

You can now go ahead and click this link. This will open the WordPress installation wizard.

The WordPress setup wizard

The WordPress installation wizard starts by asking you to choose a language. Go ahead and make your choice, and then click on the Continue button.

On the next screen, WordPress lists all of the information it needs to complete the installation.

After reading this screen, click on the ‘Let’s go’ button to move forward.

Installing WordPress locally

The setup wizard will now ask for your WordPress database information. For database name, simply type the name you created in the previous step.

For Username and Password, type ‘root.’ You can then type ‘localhost’ into the ‘Database Host’ field.

The MySQL database information

Localhost just means that the database and website are hosted on the same server. In this case, the server is your Mac computer.

After typing all this information, just click on the Submit button.

WordPress will now connect to your database and create a configuration file for you. Once it’s finished, you’ll see a success message.

To move onto the next step, click on the ‘Run the installation’ button.

Running the WordPress installation

On the next screen, WordPress will ask you to add a site title. Most WordPress themes show this title at the very top of your website. For example, you might use your business name.

You can also change the title in your WordPress dashboard at any point.

Site information

You’ll also need to create a username and password. This is the login information you’ll use to access your WordPress dashboard.

You can also type your email address into the Your Email field. This is the address where WordPress will send all of its admin emails.

After completing this form, click on the Install WordPress button.

Install WordPress

WordPress will now run the installation.

After a few moments, you should see a ‘Success!’ message.

Installation complete

To jump straight to your WordPress login screen, click on the ‘Log In’ button.

You can also log into your local WordPress website using the following URL: http://localhost:8888/wordpress/wp-login.php

NOTE: If you’re using a different Apache Port, you’ll need to change the ‘8888’ part of this URL.

You can now go ahead and log into your WordPress site by entering the username and password you created in the previous step.

This will take you to the WordPress dashboard.

The WordPress dashboard

Trying WordPress Locally on Mac

A local install is perfect for testing out WordPress or developing websites on your computer. Now you have WordPress running locally on your Mac, here are a few things you may want to try.

Moving Your Local WordPress Install to Live Website

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

To do that you’ll need to buy a domain name and web hosting. A domain name is your website’s address on the internet, and web hosting is where your website files are stored. You can think of web hosting as your website’s home on the internet.

For web hosting we recommend using Bluehost. They are one of the biggest hosting companies in the world. They’re also officially recommended by WordPress.org.

Luckily, Bluehost is offering WPBeginner users a discount on hosting, free SSL certificate, and a free domain name. Basically, you can turn your local WordPress installation into a live website for $2.75 per month.

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

Have you already built a complete website on your local computer? Then you may want to check out guide on how to move WordPress from a local server to a live website.

We hope this article helped you learn how to install WordPress locally on Mac. You may also want to see our guide on how to customize your WordPress header, or see our comparison of the best managed WordPress hosting companies.

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

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

      Admin

  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.

      Admin

  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.

      Admin

  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.

      Admin

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

      Admin

  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.

      Admin

  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.

      Admin

  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

      Admin

  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.

      Admin

  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

      Admin

  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?

      Admin

  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.

    Thanks,
    Dan

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

      Admin

  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.

      Admin

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

      Admin

  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.

      Admin

  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.

    Help!

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

    • 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 wordpress.com.
    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 to BP Cancel 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.