
Wordpress is arguably the most popular and the best blogging platform out there. You might have installed Wordpress on your site, but you might be scared to experiment with Wordpress worrying that you could break your site and Wordpress.
Experimenting is one of the best way to learn new things and if you break your site, you probably might not want your visitors to see the fault as it might leave a bad impression. So, it is necessary to have the ability to learn WordPress and try new themes, plugins and other items without putting it online where people can see.
So, the best solution is to install WordPress locally on your computer. It will save you quite a bit of time since you can just put your files inside your WordPress folder without having to upload it to FTP. You can do anything you want with WordPress without a worry which surrounds you when you put it online. The possibilities are endless. Here is a step-by-step instruction on how to install WordPress in localhost using XAMPP. I hope it will become a great use to you.
1. Go to the official XAMPP website. We are going to use XAMPP as it is one of the best Apache distribution containing MySQL, PHP and Perl. It is very easy to install and use.

2. Select your operating system and which format you want to download. You can either choose a zip or a exe format. I would recommend the .exe file. There are also portable version such as XAMPP lite, but using XAMPP is just fine for what we need. There are also add-ons available such as Tomcat, but it but they’re not necessary for our use, may be something you want to experiment with at a later date though!

3. Open the installation file and you will be presented with a window. In, the destination folder, choose your destination. “C:\” is recommended. Click install to start the installation (Won’t take more than a minute or two!)

4. When the installation is almost done, an MS-DOS window opens, You might think you have to type a bunch of codes, but that’s not the case. This window just helps you set your preferences. The answers are just yes and no.
First question it will ask you is whether you should add a desktop shortcut. Type “y” for yes and “n” for no.
5. The second question it will ask you is whether you want to locate the XAMPP paths correctly. Type “y” for yes. I would recommend saying yes because XAMPP usually locates the paths correctly for you, much easier!
6. The third and last question it will ask you is whether you want to make XAMPP portable or not. You can choose which ever one you want, but i would recommend saying no if you aren’t going to be making use of the portable functionality (We won’t be in this tutorial) because it makes it easy for us to see the path such as C:\ and easier in the browser.

7. After this is done, XAMPP starts configuring and you will see this appear in the window. Press Enter and XAMPP will have been correctly installed in your computer.
8. Go the the destination folder you gave (such as C:\) and look for “xampp-control” and open it. Now that XAMPP installation is complete, it is time for us to start using it.

9. You should see this open up. This helps us specify which services we want to start.

10. Click start on “Apache” and MySQL. They are services required for running WordPress. XAMPP uses port 80 as a default port, so if you have any issues, try making sure no other programs are using the port (Skype occasionally tries it). It will say “Running” next to the modules if they are started. The others don’t need to be started.

11. To check if XAMPP is working, open your browser and type “http://localhost/” and you should see this. Yes! we are good so far. Choose your language for the list.

12. After that, you should see a page saying that you have successfully installed XAMPP on your system. Hoora!

13. Now that we have successfully installed XAMPP, it is time to get WordPress. Go to wordpress.org and download WordPress. Extract the folder.

14. Now, the steps get critical. Make sure that you do these steps carefully or the installation of WordPress probably won’t work. Go back to XAMPP folder (C:\xampp) and go inside a folder called “htdocs”.

15. This is where we are going to put the WordPress folder. Copy the wordpress folder that you extracted and put it inside the “htdocs” folder. Note: Make sure that when you copy the WordPress folder, not the folder above it such as “wordpress-2.9.1″

16. We need a database for WordPress so that we can install it in our computer. Go to your browser and go to localhost (http://localhost/) and click on phpMyAdmin and you should see a page like this.

17. We need to create a new database for WordPress. Look for the “MySQL localhost” section and you should see some boxes, and on top it says “Create new database”. That is what we need.

18. On the box on the left, your will enter a database name. You can name it whatever you want. I will call it “wordpress_test”. Then, on the next box, your will see a list of options. Scroll to the end and select “utf8_unicode_ci”. We are going to use this option because it supports expansions and ligatures. Click Create.

19. You will be notified that the database “wordpress_test” has been created.

20. Now, go inside xampp/htdocs/wordpress (for example C:\xampp\htdocs\wordpress) . Then, we need to setup up wp-config. This is to configure wordpress to fit our database, username etc. Many people are familiar with this step.

22. Rename the “wp-config-sample.php” to “wp-config.php” so WordPress will recognize your config file (Depending on how you’ve set up Windows, the .php may or may not be displayed. If wp-config-sample doesn’t show it visibly, don’t add it on to the wp-config when you rename it). Open the file you have just renamed (wp-config) with your favorite text editor (e.g. Notepad, not Microsoft Word!).

23. Now you will need to change these parts of the wp-config.

24. So, inside the DB_NAME to the right you will see ‘putyourdbnamehere’. That is where we will put our database name. Delete the putyournamehere (without deleting the apostrophe) and put “wordpress_test” (remember that is what we called our database in phpMyAdmin).
In the same way, put “root” in the DB_USER part. Then on the next part (database password), leave it blank, since we haven’t set a root password for our MySQL.
We will also not change any part of the DB_HOST because localhost is what we want and it is already localhost. This is just a test site, so no other configuration is needed here. Now, we are done with the configuring. It will be easier to understand what I am saying by the illustration below.

25. Save and close the file (wp-config.php). Next, open your browser and go to “http://localhost/wordpress/”. Hooray! It worked. You will see this screen and once again, many people are pretty familiar with this process. Put your blog title and email and click “Install WordPress”

26. Success! You will be notified that WordPress has been installed. You will get your username and random password. Copy the password and click “Log in”.

27. You are now in the login page. The username is admin and paste the password. Don’t worry about memorizing the password as we will change it.

28. Success again! We are in the wordpress dashboard. The very first thing you might want to do is change the password. On the red bar, click on the “Yes, Take me to my profile page”.

29. Scroll down and change your password, then update profile.

30. Yes, now you are all set. When you go to http://localhost/wordpress. You should see your blog with the default theme Kubrik.

31. You are done. There are a few other things I would like to remind you. In the XAMPP Control Panel , Apache and MySQL have to be running. You don’t need FTP to change stuff in wordpress. Just go inside xampp\htdocs\wordpress and change everything there. For example, if you want to add themes, just go inside wordpress\wp-content\themes and put your themes there.

32. There you go. That wasn’t too hard. You can now master WordPress without worrying about breaking your website and you will also save some valuable time. Go celebrate!
Then, come back and you are free to experiment with WordPress any way you like. Try out new posts, themes, plugins and explore the wonderful world of WordPress.

If you have any problems or want to ask a question, feel free to comment below. I will try my best to answer your questions.
I would also appreciate it if you commented what you are going to use WordPress in localhost for. I hope you enjoyed this post!



Custom Search
Epic (3 comments)8 February 10
i recently decided to start my own blog, i haven’t gotten it very far off the ground yet, but when i saw the default them i almost wanted to vomit. So i currently have installed wordpress on my localhost so that i can experiment with creating my own themes without affecting the live site. i must say the first time i installed wordpress locally it was a bitch, i tried a few different ways, I by far like xampp the best as it is easiest to do, however it was the first one i tried and i had problems after a point in the instructions. I must say your instructions are much clearer and easier to understand that previous ones used. I’d recommend this tutorial.
Michael Martin (1319 comments)8 February 10
Glad you enjoyed the post. The default theme really isn’t very nice. They creating a new one this year that looks much better, but to be honest, it’s still going to be a default theme. Worth experimenting with something better anyway.
jtoth (2 comments)8 February 10
I use MoWeS Portable and i find it very useful, powerfull and very simple to use. For my needs better and faster as XAMPP, sure only a personal view.
Here is the link to MoWeS: http://www.chsoftware.net/en/mowes/mowesportable/
Michael Martin (1319 comments)8 February 10
I hadn’t heard of MoWeS before, but the description on their homepage sounds cool. Thanks for sharing!
Melvin José (2 comments)8 February 10
Just set everything up using your tutorial. If you didn’t post this I wouldn’t have done it.
Thanks a million!
Michael Martin (1319 comments)11 February 10
That’s great Melvin, it’s always good to hear when someone has actually worked through a post! Hope it comes in handy!
Greg London (3 comments)8 February 10
Nice, thanks for that refresh on manually installing wordpress. It’s not as hard as the documentation makes it out to be.
Michael Martin (1319 comments)11 February 10
It’s fairly straightforward, but it can seem daunting. The screenshots above cover literally every step, no room for anyone to get lost!
Codesquid (14 comments)9 February 10
I have been using WAMP to develop in Wordpress for a while now! I couldn’t live without it! Testing and developing on your live site is risky at best, you could end up taking down your entire site and causing yourself a major embarrassment. I always test any changes to php files or plugins on my own server first. I also use it for testing htaccess rewrite rules. It may have been useful to mention how to set up mod-rewrite in apache too!
Michael Martin (1319 comments)11 February 10
I’m the same (WAMP is the same one I use as well to be honest). Plugins and .htaccess are one thing I’d definitely test there. Anything that can break your site needs to be tested.
Josh Stauffer (10 comments)11 February 10
I tried XAMPP several years ago but I’ve been using WAMP ever since. I love WAMP and use it all the time for development and various pet projects. Plus it keeps the clutter out of my hosting server.
Rodrigo (1 comments)9 February 10
Man! This post is excelent.
It is the better tuto that I say.
Congratulations!
Sogeking (21 comments)9 February 10
Thanks guys! I feel happy that you like my post.
MissEm (1 comments)9 February 10
Thanks for the post. I’ve recently moved into a web development role with the company I work for. I got it with only having a small amount of coding experience. But it’s all good because I get taught everything I need to know along the way – PHP, MYSQL, Javascript, JQuery, Ajax – all of it. It’s a really great opportunity. So as I start learning I want to be able to practice at home and then really start kitting out my wordpress website!
I also want to be able to create plugins eventually.
Ah, miles of coding ahead of me. Love it! Really!
Tino (3 comments)10 February 10
Hello I was wondering once you create a website you are going to be proud of. Is there a way to transfer the website you make with xampp to a real host via ftp is there a tutorial on that or is it simpler than think any help would be appreciated
Mitko (20 comments)10 February 10
I am currently having XAMPP and few prototypes of some of my blogs there.
I know wordpress.org says how to move a blog to a live server or different one, but it would be great if it can be included here or in another tutorial related to this one
.
I like that Xampp gives me the opportunity to test stuff, since I am really picky about theme look fonts and etc, and making all of those changes on a live site sometimes gives the user a bad experience.
街舞 (1 comments)10 February 10
Thanks guys!
Omer Greenwald (3 comments)10 February 10
It’s great to have a test environment for you blog.
Besides performing a fresh WordPress installation, I think that everyone who already has a live blog, should perform a backup of it and install it locally as well.
The possibilities are endless as you say, and after cloning your own blog you are able to test everything and see the how it works for you, before doing the changes in your live blog.
Man and a Van London (13 comments)11 February 10
Thanks for this post I have learned a lot from it. Is xumpp just like cpanel?
Michael Martin (1319 comments)11 February 10
Cpanel is a webhosting tool that lets you manage some common settings (Like creating email addresses). xamp will set up the basic webserver for you, but it won’t have some of the cpanel features unless you add them (like monitoring how much space you’ve used, setting up emails, cron jobs etc.)
For setting up WordPress though, you won’t need anything other than what we’ve talked about above!
Tony (6 comments)11 February 10
Is installing wordpress on your own pc safer?
Michael Martin (1319 comments)11 February 10
It’s safer in the sense that you can test everything locally before you test it online. Aside from that, it won’t influence your server one way or the other.
Keith Davis (60 comments)11 February 10
Hi sogeking
I have a local install of my live site on my PC and it is brilliant!
The local install uses XAMPP for all the Mysql, PHP etc.
I write all my posts on the local site and then just cut and paste into my live site.
I also experiment with plugins to make sure that they work OK and I know how to configure them.
And best of all… I can mess about with my theme’s stylesheet and see what it looks like.
Lots of saving on bandwidth when you do all this on your local site.
The way you have laid out your tutorial is fantastic… must have taken you ages – thanks.
sogeking (21 comments)20 February 10
Thanks for liking my article!
zico (7 comments)14 February 10
Hey man! Thanks for this tutorial. This will be very helpful for new.
flash (1 comments)14 February 10
thank you so much for this tutorial // this is something i’v been thinking about doing for a long time, but thought it might be too complicated // you broke it down in nice easy chunks && did a great job documenting the whole process step-by-step. // THANK YOU !!
Aira Pratama (2 comments)19 February 10
I often use WAMP rather than XAMPP for local web server.
I think you should post how to install WordPress MU because a lot of people still confusing how to install WP MU.
Thanks for this great information
hery (5 comments)19 February 10
Yes, It’s better doing experiment in your computer than on your site. It may effect your SERP …
littleREDelf (2 comments)19 February 10
well, i feel like a big dummy . . . i got as far as creating the database (even named it the same thing), changed the wp-config.php file and i get ye olde db error “Error establishing a database connection.”
any other information i can give you to help me troubleshoot?
littleREDelf (2 comments)19 February 10
ahhh . . . big dummy forgot to blank out the PASSWORD area! thanks! i figured it out all on my own!
Charlie (5 comments)19 February 10
Is setting this up any easier on Mac? Is the process similar?
Driver198 (1 comments)20 February 10
I have just begun to realize the power and potential behind working in WordPress vs. creating everything from scratch as I have in the past.
As a newbie to WP, I wanted to be able to experiment locally before posting; with the security of knowing I could muck-about, make backups along the way, and finesse to my heart’s content.
sogeking, my heartfelt thanks for one of the best step-by-step tutorials I have ever followed. Everything worked at each step; and the image-guides added that extra ounce of clarity and verification.
Had I tried to accomplish this on my own; I would have been scared stiff and bailed round about the time the MS-DOS panel started asking questions.
Thank you.
Fez Jilani (5 comments)23 February 10
This is all well and good guys but why not use this?
http://www.microsoft.com/Web/
James (10 comments)23 February 10
An easier way to get a running local test version of Wordpress is Bitnami
http://bitnami.org
You have the choice between local install or virtual machines (I prefer the VM’s) Support for miltiple Operating Systems (Linux, Windows, Mac)
Newport RI (1 comments)23 February 10
this is really swell thanks for posting just finished installing everything
hanif IM (3 comments)26 February 10
I was read and applied this tutorials for my laptop. This help for me if I want to changes themes and before use for my real blog online.
Aboubaker Nour (2 comments)26 February 10
Thank’s for this tut…
It’s really nice
Mukundan (2 comments)1 March 10
The link in first point is not working. Fix it . Nice article very helpful.
PA-10 (3 comments)8 March 10
The XAMPP is a very very good tool for localhost.
John M (1 comments)8 March 10
Nice. Of course I go with the traditional WAMP (Windows Apache MySQL PHP) setup, but this is still a good idea for a lot of people.
melodyof1974 (1 comments)12 March 10
As part of a reading requirement in a ‘Graphics for Web’ class I am currently taking, your story of ‘40 Creative Navigation Menus’ led me to you the Wordpress link.
I think your explanation was very clear and easy to follow, even for me, loading it onto a Mac.
I haven’t tried out Wordpress but, this give me an opportunity do to so and get a little creative with it.
Thanks for the post.