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.
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.
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.
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.
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.
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.
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 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.
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 will now run the installation, and you’ll see a success message once it’s done.
You can now go ahead and login to the WordPress site installed locally on your Mac computer.
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.
- Finding perfect WordPress themes and giving them a try.
- Test essential WordPress plugins locally.
- Learn WordPress programming by creating your own plugins and themes.
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.
Robin says
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 ?
WPBeginner Support says
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
Henry Barnett says
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?
WPBeginner Support says
You would want to try reaching it using http://localhost
Admin
Sop says
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?
WPBeginner Support says
You could uninstall MAMP and delete the folder with your site information.
Admin
Lola says
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,
WPBeginner Support says
Thank you for sharing what helped you ensure the site was active
Admin
Russell says
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.
WPBeginner Support says
For transferring your local installation, you would want to follow the steps in our guide below for properly transferring your content:
https://www.wpbeginner.com/wp-tutorials/how-to-move-live-wordpress-site-to-local-server/
Admin
Simon Miles says
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.
WPBeginner Support says
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
kpatterson says
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?
WPBeginner Support says
You would want to ensure MAMP is running and if it is to then use the debug option from our article below:
https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-wordpress-white-screen-of-death/
Admin
jeania says
I am having the same problem, how do you make sure that MAMP is running?
WPBeginner Support says
You would open the MAMP program and if it gives the option to turn off your server then MAMP is running.
Admin
Geoff says
wow, after 3 days messing around with other instructions I followed these and bingo I have wordpress running on de mac. Thank you.
WPBeginner Support says
Glad our guide was helpful
Admin
Jennifer says
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
WPBeginner Support says
Thanks for sharing what helped you
Admin
nandhini says
Thanks it helped me
Imran says
The wordpress page was not opening on my Mac… then i changed localhost port setting back to 8888… and then it worked
WPBeginner Support says
Glad you were able to find a solution that worked for you
Admin
Mel says
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
WPBeginner Support says
Glad our article was helpful
Admin
sumeet says
can we monetize the wordpress blog if we are hosting through MAMP
?
WPBeginner Support says
Normally no as MAMP is for creating a local installation
Admin
Wendy says
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
WPBeginner Support says
You would visit the localhost address you visited before and ensure MAMP is running before you try to visit the address
Admin
Elliott says
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
WPBeginner Support says
There are a few different reasons, you may want to start with following our guide below:
https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-internal-server-error-in-wordpress/
Admin
jane says
i got half way then when it said to type in http localhost/mywebsite it didnt work
WPBeginner Support says
You would want to ensure MAMP is running for the most common reason for that issue.
Admin
John says
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.
WPBeginner Support says
Thanks for sharing this in case others ran into this issue or this is a change to MAMP since the last update of this article
Admin
Marianne says
Thanks for sharing. I had the same problem.
Jen Harrigan says
Thanks for the help, you are a lifesaver!
WPBeginner Support says
You’re welcome, glad our guide could be helpful
Admin
Willy says
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??
WPBeginner Support says
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
Anjana says
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
WPBeginner Support says
Just in case, you would want to ensure MAMP is running when you try to visit the local installation
Admin
A says
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?
WPBeginner Support says
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
Joanna Ma says
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!
WPBeginner Support says
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
Eva Giddings says
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?
WPBeginner Support says
That all looks correct, are you certain MAMP is running before you tried to visit that address?
Admin
Dan says
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
WPBeginner Support says
You would need to run MAMP again for the site to be findable at the address if that is what you mean.
Admin
Andrew says
Wow. SUPER COOL and kind of you to take the time to post. This website is fantastic. THANK THANK THANK YOU!
WPBeginner Support says
Thank you, glad you like our guide
Admin
Rick Karlson says
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.
WPBeginner Support says
Some users may have changed where it is installed but normally you should see your MAMP folder in your Applications folder.
Admin
Joan Houston says
So the “MAMP Document root folder” refers to the MAMP folder that got installed in the Applications folder? I, too, am confused by this.
WPBeginner Support says
Correct
Peter Fritz Walter says
Thanks for this comprehensive tutorial, it was very useful to me.
Peter
WPBeginner Support says
Glad our guide could be helpful
Admin
Carrie says
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.
WPBeginner Support says
From taking a look, they bundled the pro and free versions together. You should still be able to run MAMP for free
Admin
Tabish Hyyat says
Hey! Kindly update the article….can’t work out which thing is which……
anurag says
thanks , it is really helpful
Oleg says
Thanks! Worked well.
Andrea says
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!
WPBeginner Support says
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
Stan says
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.
Tara says
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
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 ?
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.
BP says
From the MAMP webpage click “my website”, 2nd from the left on the menu.
That will take you to the localhost site.
lisa says
were you able to find a new tutorial?
Apoorv says
This is so helpful..!! Worked like a Charm.
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.
Help!
Charles Bewlay says
Many thanks guys, couldn’t have gone anywhere without you
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??
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…
WPBeginner Support says
We hope you have tried accessing your website’s admin area by visiting the URL:
http://localhost/wp-admin
This URL may differ depending on how you installed WordPress. Let’s suppose you installed it in a folder mysite, then your login URL would be.
http://localhost/mysite/wp-admin
Also check our guide on how to find your WordPress login URL.
Admin
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
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.
Admin
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.
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!!!
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
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’);
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.
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.
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.
Tay says
Did you guys change the port numbers?
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?