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.

1 (Custom)

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!

2 (Custom)

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!)

3 (Custom)

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.

4 (Custom)

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!

4_2 (Custom)

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.

4 (Custom)

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.

4_3 (Custom)

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.

5 (Custom)

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

6 (Custom)

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.

7 (Custom)

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.

8 (Custom)

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

9 (Custom)

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

10 (Custom)

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”.

11 (Custom)

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”

12 (Custom)

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.

13 (Custom)

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.

14 (Custom)

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.

15 (Custom)

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

16 (Custom)

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.

17 (Custom)

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!).

18 (Custom)

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

19 (Custom)

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.

20 (Custom)

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”

21 (Custom)

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”.

22 (Custom)

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.

23 (Custom)

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”.

24 (Custom)

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

25 (Custom)

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

26 (Custom)

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.

27 (Custom)

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.

28 (Custom)

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!

Enjoy this post? You should follow me on Twitter!