This is the first chapter of the Complete WordPress Theme Guide series. In this chapter, you will learn how to install WordPress on a local computer. By doing so, it will save you time from updating and previewing files (so, you don't have to frequently upload files on every change). You can also use the local version to test new plugins, themes, and upgrades. This tutorial is intended for beginners who want to learn how to run WordPress locally.
Quick Summary
If you have some technical background, you can skip the detailed steps in this tutorial. Here are the simplified steps on how to install WordPress on a local computer:
-
Create a new database.
-
Download WordPress from wordpress.org and extract the files to a new folder under the htdocs folder.
-
Rename the wp-config-sample.php file to wp-config.php and update the database details according to your local server.
-
Run wp-admin/install.php and follow the instructions to install WordPress.
-
Done!
Let's Begin...
Before you start, let's look at the requirements to run WordPress:
- PHP 4.3+
- MySQL 4+ Database Server
1. Install a Local Server

In order to run any PHP/database application on a local computer, you need a local host (ie. Apache + MySQL). For Mac, use MAMP. For PC, use XAMPP or WAMP.
I'm using Mac here, so I'm going to install MAMP. Go to mamp.info, download and install MAMP.
2. Create a New Database
After you've installed MAMP, run it and it should take you to the start page. Now click on phpMyAdmin. In the phpMyAdmin page, create a new database (eg. wordpress).

3. Download WordPress
Go to wordpress.org and download the latest build of WordPress. Go to the htdocs folder (where you installed the MAMP), extract the wordpress.zip to a new folder (eg. mysite).

4. Update wp-config.php File
In the folder, rename the wp-config-sample.php to wp-config.php. Open wp-config.php and update the database details (db_name, user, password, host) according to your local server.

5. Run install.php
With your browser, go to http://localhost:8888/mysite/wp-admin/install.php and follow the instructions to install WordPress.

What's Next...
In the next chapter, I'm going to show you how to create a custom WordPress theme in designer way (no PHP skill is required).
Thanks for a great post. Really came at a critical time. Looking forward to some more frequent entries. Amazed at how progressive your features on the blog are getting. Great stuff, keep up the great work..
Cheers
very usefull, but nothing special. you have gained 5 days simply posting the summary eheheh
I’ve been working with XAMPP for a few years now but the MAPP knowledge will be useful if I ever need to setup a testing server on a Mac.
Nice one, should be useful to me at some point! Bookmarked.
Am I the only idiot who found XAMPP impossible to install? I don’t really need a solution, I’ll just get someone more technologically inclined to handle that part. Any “here, here’s” would make me feel better though.
Mamp rocks!
I use this process myself and definitely could not have written it better.
Great job as usual.
Extremely helpful!
Thank you.
Love this Nick, you are a true guru. This is particulrly helpfull since I´m starting work on a new site with wordpress as the backend.
Great stuff. Looking forwards to reading the complete tutorial. (Especially as I am struggling with my own at the moment)
very cool. I’ve been updating my site and then checking it live. This is so much easier. Thanks! Definitely looking forward to the rest of the tutorial.
Thanks very much for the tutorial! Looking forward to the remaining two. Your clear instructions are great, I’ve been meaning to give WordPress a try for a while now.
A simple yet useful and excellent tutorial, your article always make me feel impressed!
Looking forward to part 2!!
Hey Nick, thank you so much for the tutorial. I’ve been wanting to install WP locally so that testing WP won’t be eating my all the bandwidth of my hosting plan. I’ve tried combing through online tutorials but some of them are horribly overcomplicated and makes it sound very cumbersome to get WP installed.
Thank God your tutorial came at the right time! Now I can test WP2.7 beta locally without messing with the online and active version of my WP ;)
However, I’d prefer to use WAMP because it uses phpmyadmin. Very handy and simple. Oh, and I can’t wait for the next part to be released!
Thanks Nick, can’t wait for the actual meat.
WE ARE WATING YOU :)
buenisimooooooooooooo!!
Curious – on this tutorial, you show your wp-config file and at the localhost part – you have ‘localhost:8889′ — why is it 8889 instead of 8888 ? (which is what MAMP sets it up as). I admit, I’m new to this, so maybe there’s a perfectly good explanation for this, I just thought I’d ask. Does it make a difference?
@Tim
I’ve got it set up and working with localhost:8888, I’m not sure if that’s just a typo or if there’s a better explanation, but I wouldn’t worry about it… :-)
Yes, yes, yes! Super-handy mate.
This will save me a lot of time methinks.