Nov 13
Installing WordPress Locally
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).
Complete WordPress Theme Guide Building Custom WordPress Theme
Comments
Pages: 11 10 9 8 7 6 5 4 3 2 1 » Show All
There are 108 comments (+Add)
Pages: 11 10 9 8 7 6 5 4 3 2 1 » Show All











108 Georgina
January 6th, 2009 at 5:04 am
Brilliant, thank you!
What a great idea for working on your design without constant ftping.
107 steve b
January 5th, 2009 at 10:16 pm
I’d like to thank Okeif who posted the life-saving tips (comment 101) that are needed to get the install working on a PC. Moved the whole thing from super-frustrating to super-satisfying. Whew…
106 Emily La Porte http://none
December 30th, 2008 at 6:48 pm
Hello,
I am pretty new to all of this, but eager to learn how to set up my own blog. What is the advantage of installing WordPress locally?
105 asramnath
December 29th, 2008 at 11:44 am
Excellent. works well. Thankyou!
104 probablepossible http://probablepossible.com
December 24th, 2008 at 3:15 pm
Wow, what a difference this makes!
103 Tom http://www.tkenny.co.uk
December 22nd, 2008 at 5:32 am
I’ve finally got a local WordPress install setup on my Mac thanks to your tutorial. Great for testing new versions and making changes to existing sites without editing live content. Thanks.
102 Redd Seider
December 20th, 2008 at 10:35 am
Okeif,
Having endless problems with the install and have tried both Nicks and your directions. Using XAMPP. No luck on either front, as constant “The requested URL was not found on this server” errors.
Have tried all combos:
http://localhost/xampp/www/wordpress/wp-admin-install.php.
http://localhost/wordpress/wp-admin-install.php.
http://localhost:8889/wordpress/wp-admin-install.php. (get “IE cannot display this webpage” error on this one. wp-config localhost changed)
http://localhost:8888/wordpress/wp-admin-install.php. (get “IE cannot display this webpage” error on this one. wp-config localhost changed)
Some questions about your post:
1. In “Step 3″, you say ” Go to wamp / www”… This directory does not exist. Do you have to create it?
2. In “Step 4″, you say “…… the username is root, enter nothing between the ‘..’, and host……” What is the “enter nothing between the ‘…’ referring to? The password?
3. In “Step 5″, you say “With your browser go to http://localhost/mysite/wp-admin-install.php”
Should this be:http://localhost/wamp/www/mysite/wp-admin-install.php?
Thanks so much for your assistance!
101 Okeif_Obd http://www.okeifbydesign.com
December 15th, 2008 at 11:14 am
For anyone using WAMP (and possibly XAMPP, have not tested) who has any issues related to Step 3-5, here is your solution:
With WAMP installed (or XAMPP) your Step 3, 4 and 5 will look different then, our gracious host has suggested, with a MAMP install.
Step 3.) Go to wamp / www, in whatever directory or location that wamp was installed. Extract latest (or any version) of wordpress-X.X.zip to a folder (mysite) with only the content of the wordpress folder dumped directly into (mysite). New file structure will be wamp / www / mysite / etc..
Step4.)Unless you’ve changed the db username, password or host name then the db_name is whatever you created in Step 2, the username is root, enter nothing between the ‘..’, and host is localhost.
Step5.)With your browser go to http://localhost/mysite/wp-admin-install.php.
Hope that helps!
Thanks again, Nick!
PS. If you’re having a problem getting your WAMP or XAMPP server online, that’s a whole ‘nother issue, but check to make sure you’re not using IIS; infact disable IIS if possible.
100 Outlet http://outletyvcr.cz/
December 12th, 2008 at 4:30 pm
Super list. Thank you very much
99 steve
December 12th, 2008 at 2:36 pm
MAMP saves me soooo much time. Amazed it’s free.