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).
When I go to /wp-admin/install.php, all I get is a blank page. For some reason it’s not prompting me to install. Can anyone help me fix this issue please?
Thank you very much for this helpful tutorial.
Ashley, are you by any chance running on a 64 bit Operating system? I am, and I just discovered recently that XAMPP still hasn’t released a 64-bit version… but there are workarounds… if you are interested (an running on 64-bit)
Great tutorial! For those of you on a mac and still struggling with MAMP here is another great video tutorial on setting MAMP up on your mac http://www.freemacblog.com/mac-server-series-install-wordpress-on-your-mac-using-mamp/
HI – can someone help please
I Get to the very last page and it reads
The requested URL /mysite/wp-admin/install.php was not found on this server.
Apache/2.0.59 (Unix) PHP/5.2.6 DAV/2 Server at localhost Port 8888
Ive tried this 3 times with no joy, can anyone recommend what i might be doing wrong?
Thanks
PAUL
Hey, Great tutorial.
This is for Paul and anyone else having probs installing WordPress, I think there is a typo where it says “http://localhost:8888/mysite/wp-admin/install.php” I think it should be 8889. Worked for me! Hope it helps.
Oooopppps, not a typo, scratch my previous comment. I just forgot to put my WordPress dos in the htdocs folder within MAMP. Now it’s working.
Hello everybody,
I thought I had done everything right, but I was wrong. For some odd reason when I click the instal file dreamweaver launches and no install takes place.
Following the instructions on the tutorial this is what I did:
1 Created datebase
2 Downloaded wp files, placed them inside a folder named mysite, and subsequently I placed the mysite folder inside the htdocs of mamp.
3) I removed “sample” to rename the wp-config.php
4) I launched dreamweaver and I entered the info inside wp-config.php file (database name, user, password)
5) I went to http://localhost:8889/mysite/wp-admin/install.php and downloaded the instal to my desktop.
6) I click the instal file. Dreamweaver launches showing the istal file, and no instal takes place.
I’m stuck here. I don’t know what to do. What did I do wrong? Can somebody help, please?
Thank you in advance.
For some odd reason, after I download from “http://localhost:8889/mysite/wp-admin/install.php”
Wonderful! My dilema: Running IIS and Apache on the same PC. I didn’t want to disable IIS. After a bit of struggling I managed to install WAMPServer on my PC. Now I have both servers IIS and Apache running on the same machine. I just changed “Listen 80″ to “Listen 777″ and “ServerName localhost:80″ to “ServerName localhost:777″ on httpd.conf – After the change I had to “Restart All Services”. From now on when I want to access Apache server I just have to change the URL to http://localhost:777/YourSite – Great article! Thx!
Im trying to install the wordpress on a rails application.
+ Can wordpress be installed on rails application?
nice, really nice!
I’ve just bought a copy of “WordPress theme design”, cost me nearly £25.00.
Pity I didn’t find this article first!!
Question – for windows vista, which is best XAMPP or WAMP?
Thanks for the articles.
Keith D
I am using wamp for a pc. I am having trouble with installing wordpress when I type in http://localhost/mysite/wp-admin/install.php I get this error message:
URL /mysite/wp-admin/install.php was not found on this server.
I can get to localhost/mysite and I can see the wordpress folder but cannot access it. I get the error message above.
I put my SQL hostname as “localhost could this be my problem.
If anyone can help me I would appreciate you emailing me at bonny@amigo.net.
Thanks
First of all, thanks for yet another great tutorial. I love this site!
I’m running on Windows Vista. I personally couldn’t get XAMPP to work at all, but after some trial and error here’s what worked for me:
1. Download WAMP (http://www.wampserver.com/en/)
2. Follow the tutorial at the following site to get the server and wordpress up and running — http://wordpressgarage.com/good-blogging-practice/how-to-set-up-wordpress-on-a-wampserver/
Hope this helps.
computerclinic-banglamedia.blogspot.com
Since leopard comes with PHP and apache preinstalled I just wanted to install mysql instead of installing mamp, also because I can use the mac as a webserver If i chose and from what i understand this would be impossible to do with mamp, it can only be used for testing locally and could not be viewed by anyone else. I understand the security issues but I would like the ability to do so. My question is how can I install wordpress using the apache php and mysql installed on the computer and not through mamp?
I followed the tut.through each step, but developed a problem when trying to run ‘install’. I copied “http://localhost:8888/mysite/wp-admin/install.php” into my browser, but it comes up an blank white page,nothing happened.
when I change the address to “http://localhost:8889/mysite/wp-admin/install.php”,it asked me to save the install file. I did, but when open it,Adobe GoLive launched with these random codes “4???
5.0.41?)???@uQsmJjU?,¢??????????????Nc,L{J=1{=\7???ÿBad handshake”….I’m stuck….
I did put wordpress docs in the right folder(htdocs).
Please help me,thanks.
Hi,
All I could express after seeing your wordpress blog’s design and beauty was this ” Oh my God, I have never seen such a beautiful design and blog”.
Well Anyway I do know Photoshop and Fireworks but I do not know how these flowers are made and even if these are made in these two or something else, I wish I could create design or flowers like this page has. Wow what is it did you develop yourself I write and preview is showing up of text I am typewriting that’s very new for me.
Any hint will be appreciated.
Oh yeah actually so far I only add entries for short tutorials or hints in my blog for technical programming or gadget or software related.
Thank you for reading my comments.
hi… i’m confused. i bought a host plan and installed my wordpress on it. does this mean installing it on my computer is much more better?
Could someone give me some advice?
So I downloaded wordpress and installed in sucessfully on localserver –does this mean that the blog is only visible from my computer? I don’t have a web host. can I make one myself? if that is possible I’d like to try and figure it out. thanks!