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).
Wow, that’s Cool.
I didn’t thought of that. But they idea is brilliant. Now I can’t change the theme without worrying about the live status …
Great ThanX
Great! A tutorial with Mac and MAMP installed on it! I’m fated to found this place. Hahaha. Thanks man. Waiting for your next chapter.
Alright Nick. That took 5 minutes. On to the next step..lets go!!! Hurry up! :)
Nice Idea!!
Quite impressive and easy to setup.
Thanks
I just wanted to say that YOU RULE!!!
Nicely written tutorial!
In case someone is trying this on Windows, WAMP (http://www.wampserver.com/en/index.php) is a nice alternative to XAMPP. I personally like it better since it has straightforward menu’s.
Just a note, the latest beta of WordPress is pretty cool, I have it running and haven’t run into show stopping problems. But you’re probably correct to reference a stable release :) Good tutorial.
interesting! the next step is good to sea how make a designer a wordpress theme.
Good joob!!! I wait to the next chapters!
I’ve done this in the past, but I don’t do it any longer. For some reason, the local server programs I install are always prone to bugs, breaking down, etc.
Nevertheless, installing WordPress locally is beneficial as you can test your themes beforehand and keep a working copy of your website, replete with its posts.
Alternative of XAMPP is Denwer (now only russian)
The post is very useful for newbie. Anyway, thanks a lot !
Keep up the good work
Nice tutorial! Another alternative is EasyPHP (PHP – Apache – MySQL – PhpMyAdmin for Windows) in english or french. Very easy to install and an administration page with all your local web projects.
I can install two WordPress on a single database, for instance for a preview? If so, can I how do?
I realize that you asked this a few years ago, but, for anyone else who has the same question, you can install as many WordPress sites as you want by placing the files in different directories.
For each installation, edit the wp-config.php file. It must contain the database connection information and then, under the section “WordPress Database Table prefix”, make sure that each WordPress installation using the same database has a unique “$table_prefix” name.
anyone else having trouble running the XAMPP ? I’m getting libsql.dll errors running mad all over my screen when I start the admin tool….
I agree with Sam. WAMP is very nice. I haven’t tried XAMPP, but I would really recommend WAMP.
THANK YOU MAN !!!
clear explanation. I Hope the next chapter will be published as so on as possible. I really wait for that ..
Your tutorial on the subject will definitely tilt the scales in favour of WP.
I have been trying to decide between many CMSs for simple sites and what you have achieve with your site gives me the confidence that it can be themed away from the existing templates out there.
I am a designer so if the amount of PHP is kept to a minimum even better :)
Regards,
Petolo
great Guide!
very good, was expecting a practical guide so