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).
Awesome. This taught me a lot! Thanks!
Hello,
I have found a wonderful guidance About step by step One Click Installation Of WordPress….
http://blog.iampirated.com/how-to-install-wordpress-one-click-installation/
I think you should also take a look
That’s Great! Thanks for the post!
Thank you!! Very helpful, great technique and great explanation. And looks beautiful!!
Cool but the problem I’m having is how to publish it online after building it on wamp how do I change the path how do I install the database on the server thanks
I am using XAMPP. I have downloaded & extracted WP. I changed the file name to wp-config.php as instructed, but when I try to open it, Windows tells me it cannot open it and needs to know what program created it. I am a beginner. Please help……..
Is it possible to have multi-site with a local install of wordpress?
I followed your instructions for Mac — no problems, thanks — but it means the URL for the local site is “localhost:8888″ etc… and if you try to create a wordpress network it throws the error:
Error: You cannot install a network of sites with your server address.
You cannot use port numbers such as :8888.
I don’t know enough about working with servers to know whether the port number can be dispensed with or not.
Thanks for an interesting set of posts.
same question here. I’ve tried masking the port from WP’s perspective by mapping to an external domain, but it seems to be a dead end. Someone must have gotten around this!
Awesome :)
I learned to run WordPress locally with this tutorial. I thought it will confuse me but, it’s easy to follow.
You got me addicted!!! More! More!! More!!!
I recommend this site to embed more than 10.000 Web radio at any site or blog http://www.findradio.net/findradio-widget
Thank you so much for installing wordpress tutorials. finally I could install wordpress
Another questionnaire, the participants’ problem identification and structuring, idea generation, problem elaboration and clarification, such as creativity, problem solving insertion sezkin idea which one’s preferred styles are evaluated. While participants preferred the style of non-disclosure and intellectual development of ADHD, with ADHD, participants chose to produce ideas.
Thnx I will try this to run my moms website locally and do some test befor putting it online. Just what I need.
hi, my wordpress blog is not proper working..i can’t upload any file images, audio & video..my some plugings is not working…check out http://www.wallpapersfuns.com smoothslider its not showing slideshow..i have try also deactivate smooth slider,,and then reactivate it but its not working proper…please help me so many problems in my wordpress blog.
I’m trying to install a local copy of WordPress on my personal computer so I can work offline and later upload my corrected site to my host server. I followed instructions from people who seem to know what they’re doing. This is what I did exactly:
1. I successfully installed MAMP on my local Mac hard drive (Local Server)
2. In the phpMyAdmin page, I create a new database with my site’s name.
3. I went to wordpress.org and downloaded the latest build of WordPress. Went to the htdocs folder (where I installed the MAMP), extracted the wordpress.zip files and moved them into my new site folder (located in ).
4. Inside my new site folder, I renamed the wp-config-sample.php to wp-config.php. Opened the wp-config.php file and updated the database details according to my localhost server (db_name = mysitename, user = root, host = localhost:8889) .
5. At this point, I went to my browser and typed in so I could install WordPress. Instead of the WordPress screen, I got the following message: “The requested URL /mysite/wp-admin/install.php was not found on this server.”
I’m stuck. Please help. How do I fix this?
Thank you.
Change your entry from 8889 to 8888
See #5 in instructions:
With your browser, go to http://localhost:8888/mysite/wp-admin/install.php and follow the instructions to install WordPress.
I am having the same problem.. I went through all of the steps and I can’t open any php files in my browser at all, let along install.php. I always get the message “Not found.”
The servers are on, I did check that. And I went in and changed wp-config they way you said (8888 and 8889) and it still didn’t work. I am starting to get really frustrated, I had this operation working on my PC in minutes, but it has taken me hours of work so far on my mac and I still can’t get it working…
This is my second time around installing wordpress locally and have going through a few (human error) mistakes.
1. Make sure MAMP preferences… is ” /Applications/MAMP/htdocs/ and that is where your folder is.
2. Double check “db_name = mysitename” with MAMP database name, and other file paths are correct. For example, are the wordpress files in a folder within mysite (/mysite/wordpress/wp-admin/install.php)?
p.s My localhost is set to 8889 and is working fine.
Anyways really came here to say thanks for the great tutorials.
Hi Guys, I am running MAMP with multiple wordpress sites and databases locally on my Mac which is great. If I want to get them onto my laptop so I can work on them out and about what to I need to do. Any help greatly appreciated.
Thanks.
Hi for some reason I’m having an error establishing a database connection?
do you know what might be wrong with my database or what I’m doing wrong? I followed your instructions perfectly
Thanx for this post. Thank you so much for installing wordpress tutorials. finally I could install wordpress.. please keep up to date with wordpress ……
Great concise instructions. I’m working on converting our hotel website into WordPress platform. I decided to do it locally, on my machine. But for some reason I constantly get an error while establishing database connection. I’m using WAMP. Should I switch to XAMPP? Is there any difference? – Thanks.
Nice post , i will try it ……
Thanks