How to setup WordPress locally on your Mac
If you work with WordPress on a regular basis you really need to setup Apache, MySQL, PHP, and WordPress on your machine - it makes developing themes, plug ins, and new blogs much simpler and (almost) all of your mistakes can be fixed before you go live.

Before you can install WordPress you need to install Apache, MySQL, and PHP. If you’re used to working with Linux you know the acronym LAMP - well, for a Mac we’re going to install MAMP. It’s a one click install that makes everything “just work” with a minimal amount of configuration. Unless you are very picky about your development environment MAMP should do the job.
Simple, right? We’re already halfway done.
The next thing we need to do is install WordPress. If you’ve done this on your server before then you know what’s up. The only “administration” we have to do is create a database using PHPMyAdmin. It’s easy, I swear:
1. Load up the MAMP application, start Apache and MySQL.
2. Point your browser to: http://localhost:8888/MAMP/ and you’ll find yourself at the MAMP homepage. It’s a simple control panel that lets you edit anything important fairly easily. Click the PHPMyAdmin link.
3. Create a database. I called my “wordpress” because I am only installing it once. If you’d like to use more than one WordPress install I’d suggest naming the databases by site, although it doesn’t really matter.
4. Unpack your WordPress download to to ../mamp/htdocs/wordpress/. The /htdocs/ folder is your “live” folder - if you want to create a new site, simple create a new folder. For example, when I was working on the new Bleikamp.com I created ../mamp/bleikamp/2. Inside …/2/ I had index.html, styles.css, etc. It works just like any web server.
5. Load wp-config-sample.php into your favorite text editor. You’re going to need to edit the values so that WordPress can access MySQL on your machine. The default username for MySQL is “root.” The default password is also “root.” If you are planning on using MAMP on a live server, change those values. The host is “localhost:8888.” The database name is whatever you called your database in Step 3. Save it as wp-config.php in your ../mamp/htdocs/wordpress/ folder.
6. Run the idiot-proof WordPress 5 minute install (it should take about 30 seconds). Point your browser to: http://localhost:8888/wordpress/wp-admin/install.php.
After that, WordPress will be up and running and ready for you to play with. I use my single install of WordPress and simply change the theme over when I’m working on a new project. I rarely work on more than one project at once, so it’s not a problem. It would be very simple to add a second install at /wordpress2/ to work on two projects at once if I needed to.
70 responses so far ↓
16 Nov 2006 at 12:46 am
I’ve known about this testing environment for months, but stupidly, I’ve never used it.
I’m definitely going to be all over this like white on rice. I mean, you almost have to come up with a good reason not to use the MAMP setup at this point.
16 Nov 2006 at 12:50 am
[…] Design Nov 16 at 2:53 am by Ben Bleikamp -I wrote an article at my personal blog that explains how I setup WordPress on my MacBook. I design everything in my local test environment because I hate logging into web servers and uploading things constantly - I’m the type of designer that has to see a change the moment I make it. […]
16 Nov 2006 at 1:28 am
Excellent, Ben. Are you sure you’re a designer and not a tech?
16 Nov 2006 at 2:02 am
Even a designer can figure this stuff out
16 Nov 2006 at 11:40 am
[…] Ben Bleikamp has put up a how-to guide on setting WordPress up locally on your Mac OS X machine using a one-click install package called MAMP, or Mac + Apache + mySQL, and PHP. […]
16 Nov 2006 at 10:28 pm
[…] Ben Bleikamp writes about how to setup WordPress locally on your Mac […]
16 Nov 2006 at 10:47 pm
Thanks for this Ben. I was thinking of spending the whole afternoon trying to install WP on Mac. I’m finished in 3 minutes and I’m bored now
Oh, I may as well play a little with WordPress.
Cheers, Mike.
16 Nov 2006 at 10:53 pm
Glad it was so easy Mike. Can anyone beat 3 minutes?
16 Nov 2006 at 11:42 pm
Yes, MAMP indeed makes it so easy to run WebDev on the Mac.
17 Nov 2006 at 8:41 pm
Wow.
That actually, was very, very easy.
Thanks
18 Nov 2006 at 2:33 am
[…] how to setup WordPress locally on your Mac By Ben Bleikamp. […]
18 Nov 2006 at 4:18 pm
[…] How to setup WordPress locally on your Mac - Bleikamp.com by Ben Bleikamp - blogger, student, web guy extraordinaire Create a test bed. (tags: wordpress mamp os x) Bookmark it:These icons link to social bookmarking sites where readers can share and discover new web pages. […]
26 Nov 2006 at 4:00 pm
Hey Ben This is Demetrius again down in sunny Orlando, Florida. I like the new look of your site. I did install mamp with wordpress. I love it. I did need some help though but I got someone from apple pro care to configure my system. That’s why I bought apple pro care!
*Learning web design one http at a time***
4 Dec 2006 at 9:13 pm
OK, I got it all up and running on my own computer - thanks for the great directions! Would you be willing to give some pointers on the next step: how to move the files I’m testing on my machine up to a server? and vice versa? That would complete the lesson for me!
Thanks!
12 Dec 2006 at 1:47 am
Very useful information for Mac users. Keep up the good work.
22 Dec 2006 at 12:30 pm
Hey, I’m glad I found your post on this. I just got a MacBook and am slowly looking into the alternatives to do things I used to do with my Windows PC. Spring semester is coming up and I was thinking a good way to blow time between some awkward scheduling would be if I could figure out how to run WordPress locally on my MacBook. Now I can spend all that time picking away at code or graphics and working on my blog for fun. At least, that’s the plan. Thanks for the easy information!
24 Dec 2006 at 1:50 pm
I have been using a dev environment for my web development for some time, but never knew about MAMP and your walkthrough was great…keep up the good work.
27 Dec 2006 at 11:58 pm
this is a set up ive scoured over and over for. simple awesome THANK YOU
26 Jan 2007 at 1:58 pm
Question of laws but particularly of common sense , it must find a motorbike
to 34 cattles.
Then immediately gateways close :
finish dreams him of the sporting last surpuissante!
But do not forget that you come to have your licence and that it must habituate
to roll on a motorbike, and that if your first is too heavy, or powerful excess
you will become of a true danger rolling.
Then the fact that some motorbikes would be and other no reduces the list.
You can to flavour with garlic to find on a list principal motorbikes :
Motorbikes to 34 cattles
31 Jan 2007 at 8:08 am
I have not problems with a new installation/wordpress but I can’t connect correctly my pre-existing db/blog
“Error establishing a database connection”
have you a trick for me?
17 Mar 2007 at 1:21 pm
Hey Ben, thanks for the tipp how to setup it on apple. Good information. Thanks! Jürgen
19 Mar 2007 at 11:45 am
Great post - now I can test everything before going online!
22 Mar 2007 at 3:22 am
[…] Sources: Michael Doig et Ben Bleikamp […]
31 Mar 2007 at 3:19 pm
[…] WP for the Mac Filed under: Administrivia, OSX — 0ddn1x @ 2007-03-31 22:19:22 +0000 http://www.bleikamp.com/2006/11/16/wordpress-on-a-mac/ […]
6 Apr 2007 at 4:10 pm
dad fucking boy son
10 Apr 2007 at 1:05 am
cool hair styles styles brides hair
11 Apr 2007 at 10:42 am
Great post it’s been a big help, far more clear than the other tutorials I’ve found online. I’m having a little trouble reconnecting to wordpress after I close the tab that it’s running under. I’me not familiar with this whole process. thanks
20 Apr 2007 at 2:07 pm
[…] Set up WordPress to work inside MAMP […]
27 Apr 2007 at 9:55 am
[…] it might be useful, which led me to Ben Bleikamp’s ridiculously easy to follow tutorial on how to setup WordPress locally on a Mac. Five minutes, […]
29 Apr 2007 at 6:40 pm
Wanted to compliment on your site, it looks really good .
Hank
17 May 2007 at 8:11 am
[…] is the solution I found via Ben Bleikamp, one of my colleagues at the Blog Herald. He also gives a nice little tutorial on how to install it and get it running on your […]
11 Aug 2007 at 9:56 pm
[…] let’s Mac users in on an easy way to set up a testing server, Charles counters with XAMPP for Mac, Windows, Linux and […]
12 Aug 2007 at 8:50 am
Busty Blonde Gets Dped & Swallowing Jizz
ladies belts
12 Aug 2007 at 4:03 pm
Remind me to give you a round of beers (or other prefered liquids) if we ever meet. I knew about this but never thought about setting it up myself. Absolutely brilliant. Superfast and no wifi needed. And the textmate trick is priceless.
Thanks!
15 Aug 2007 at 12:53 am
One question though: If I use full URLs when linking between posts on my test site, I guess all these links will be broken when I move the site online.
Is there some way to put the URLs so that they are correct when online too?
Example: Right now one URL is:
localhost:8888/htdocs/testsite/wordpress/kvm/
KVM is the name of the article (I use a permalink structure where dates are omitted from posts).
How would I link to this post from another post? I tried to just put “/kvm” as a URL, but then wordpress tried to access
localhost:8888/htdocs/testsite/wordpress/name-of-article-linked-from/kvm/
which of course is wrong.
15 Aug 2007 at 5:43 am
Hi there, I just created a wordpress blog, and remembered seeing this somewhere before. Forgive my ignorance, I’m a long-time blogger who likes to be a bit creative, but this is beyond me!
Can you tell me why I would want to do this? Is it just about changing the look and feel of a wordpress blog offline? Or is it for writing posts offline?
Thanks!
11 Sep 2007 at 6:01 pm
wow this was quick and painless!
Thanks for the tutorial.
19 Sep 2007 at 2:53 pm
How can I test the pages before going live please?
29 Sep 2007 at 4:20 pm
Nice Site!
1 Oct 2007 at 5:47 pm
Sklep komputerowy z tanimi czesciami komputerowymi:
sklep komputerowy
29 Oct 2007 at 7:31 am
[…] of installation. A couple clicks and you’re done. Once I had MAMP installed, I referenced the How to Set Up WordPress Locally on your Mac post at Ben Bleikamp’s blog. In less that ten minutes, I was running the latest version of […]
30 Oct 2007 at 12:06 am
daipex phentermine
daipex phentermine
8 Nov 2007 at 4:35 pm
Many thanks for your tutorial. I am yet another Windows-to-Mac refugee who found that the Mac version of XAMPP doesn’t work so well. MAMP works perfectly, and your instructions on how to install it are a model of lucidity.
15 Nov 2007 at 5:21 pm
aero rental car bellevue
aero rental car bellevue
21 Nov 2007 at 11:07 am
thanks for the GREAT post! Very useful…
29 Nov 2007 at 2:26 pm
It should go without saying that in order to tell whether or not you are consuming fewer calories than you are expending, you will need to track the exact amount of food that you are eating, as well as the exact amount of physical activity that you’re performing on a daily basis.
2 Dec 2007 at 7:36 pm
Hi, the blog is very informative and useful for all..
3 Dec 2007 at 4:29 pm
prescription phentermine membership no prescription phentermine delivery no
5 Dec 2007 at 12:21 pm
[…] found a great instructional post on it at Ben Bleikamp’s blog - so I’ll be tackling it tonight. Hey, there’s no good TV on with the writer’s […]
6 Dec 2007 at 2:09 pm
i
i
6 Dec 2007 at 10:20 pm
rrt4548
rrt4548
7 Dec 2007 at 5:15 pm
260free hydrocodone online prescription 260free hydrocodone online prescription
21 Dec 2007 at 2:12 pm
[…] http://www.bleikamp.com/2006/11/16/wordpress-on-a-mac/ […]
28 Dec 2007 at 1:02 am
Thanks for this… just what I needed…
3 Jan 2008 at 10:45 am
Thx for the infomation ^^
27 Jan 2008 at 5:09 pm
Good site
http://www.google.com - xamasapa
5 Feb 2008 at 2:23 am
Thanks, this is very helpful. I’m downloading MAMP now.
I suppose MAMP was created to run self-hosted servers, right?
31 Mar 2008 at 7:26 am
Thanks for the great tip. On my setup tho, I needed to change step five to read “localhost:8889” instead of “localhost:8888.”
3 Apr 2008 at 6:54 am
Even a designer can figure this stuff out
3 Apr 2008 at 6:54 am
very good
3 Apr 2008 at 6:54 am
Very good
3 Apr 2008 at 6:55 am
http://www.rzeczoznawca.torun.pl
3 Apr 2008 at 6:56 am
very nice good
10 Apr 2008 at 3:58 am
I just can’t download MAMP…please advise
17 Apr 2008 at 9:17 am
Wow.
Thanks for this easy walk-through!
17 Apr 2008 at 11:31 pm
very good
17 Apr 2008 at 11:32 pm
Lipa ta strona
21 Apr 2008 at 8:33 am
Nice reading!!! Keep posting.
30 Apr 2008 at 9:10 am
phentermine
phentermine
2 May 2008 at 10:03 am
Hi,
Thanks for your help. Just what I was looking for.
Leave a Comment