How to Install WordPress Locally on Your Hard Drive
Instead of playing around with our WordPress blogs while they are already live, we have the option to test Plugins, Themes, Codes and everything else locally. This means we can download a fully functional database with WordPress that allows us to do everything whilst we are offline. We can even test our little trials by loading the browser and it shows us exactly what we would see live on the blogsite.
Go to http://www.apachefriends.org/en/xampp-windows.html#646
and you will see the below screen. Click on the .exe version and install the software in a chosen spot on your hard drive. It might be beneficial to use a separate partition as the file size will be quite large.
Once the file is saved to your hard drive you need to double click it. It might ask you to extract it and if it does, simply choose the path which is given.
A new folder will be created named xampplite. Double click this folder and click on the following two icons within.
- apache_start
- mysql_start
Minimize both windows that appear and open a new browser window.
Type in the following: http://localhost/ you will see the following window
In the “Create New Database” Field, enter “wordpress” (without quotes)(lowercase), and select utf8_unicode_ci in the drop down box in the next field. Click Create. XAMPP setup is now complete.
Next you need to download WordPress from http://wordpress.org/download
You can save the WordPress software where ever you want on your hard drive. Just remember where you did save it as next you will need to unzip the software into D:\xampplite\htdocs (D:\) is the hard drive partition I used. You need to use yours)
You should now see a WordPress folder in htdocs. Go to it, and open up wp-config-sample.php. (choose notepad when promted)
You will now see a list of default values. Change them to the recommendation below (do not copy and paste this, just find the required info and update the file):
when asked for the database name (define) ('DB_NAME', 'wordpress'); // The name of the database
when asked for the user (define) ('DB_USER', 'root'); // Your MySQL username
when asked for the password (define) ('DB_PASSWORD', ''); // ...and password (needs to be empty, just for local install)
Rename the file as wp-config.php and save it.
Go back to your browser and type:
http://localhost/wordpress/wp-admin/install.php
You will see the window below appear. Note that I have named my local WordPress site “Test Site”. You can name it whatever you want and don’t forget to input your email and then click on “install WordPress”.
Take note of your login details and login to change your password to a more easily remembered one.
That’s it. It took me all but 30 minutes to get the hang of this and now I can play around with any Themes, Plugins, code and whatever else I like without damaging my own blog that is live on the Internet. Once I’m happy I can transfer the new creation online without any downtime, funny code or other things that make our themes look skewered.
Good luck and enjoy
Monika
Related posts:
- Video That Helps Install WP Locally
- How To Install WordPress In 5 Simple Steps
- Install WordPress Themes Automatically
- The Easiest Way To Install Wordpress
- Install Your WordPress Plugins Automatically
No Responses to “How to Install WordPress Locally on Your Hard Drive”
Got something to say?

I already install this in my local machine. Actually this is the best method to try all the new theme, plugin and also do your own theme modification without interrupt the real wordpress blog.
I use this method to deal with my blog unnormal look in internet explorer. Nice tips actually.
Yes it is great, but so many blogger don’t even know it exists. I didn’t either until not so long ago and that’s why I blogged about it.
I believe these kind of knowledge pearls are only known by coders and those who understand all the tech stuff. Basic bloggers have no idea.
Thanks, glad you liked the tips
Monika
I agree Monika. I have thought briefly in the past that some simulator should be available like in other software enviroments but was so tied up with other things I never followed through on googling and trying to find a solution.
Thanks for educating the rest of us, this will be a great benefit.
David
I couldn’t get http://localhost/ to open. I received an error page. In addition, when I opened apache_start and mysql_start, I received a message they couldn’t be started.
Any ideas?
Rudy
This is an interesting post and will come in handy to test templates especially when there is no internet connection. I will be testing this and will keep you posted.
That’s great tool. Many times if i tried to test new theme it took me a lot of time to update.
Thank you for sharing the helpful tool.
David: Glad you like it too.
Rudy: it worked fine for me, so the only thing that might have gone wrong for you is a small hickup somewhere. You might have to go back and retrace your steps.
Fleur: please do. It is always good to get feedback from readers.
Piseth: you are welcome, I know exactly how you feel. It is a huge time saver and will help you to get updates and changes done quicker and easier.
I use netserver, it installes apache, mysql, ftp servr, and everything you need to run wordpress locally, its a breeze to install and configure, takes only about 2 minutes to get wordpress up and running
Isn’t XAMPP a server software?
The only concern I have about a server running on my machine is security. Will that be a problem?
Installing locally is so useful especially for development and testing as its nice and fast and you don’t have to upload a file every time you make a change.
Hi Rudy
Only open apache_start and minimize. Open new browser window and try http://localhost/ again. When XAMPP Lite window opens go to Tools: phpMyAdmin on the main menu and the “create database” function will open.
See if this works for you.
dblues: XAMPP is an open source software, which means there are always risks involved. But so many people are suing it without trouble. If you have anti virus and firewall protection you should be fine.
It’s your call to make.
[...] wrote a post last year on how to install WordPress locally on your hard drive. The benefit of this is that you can tamper with your theme and plugins until [...]
[...] 2. How to install XAMPP for windows? Installation Guide [...]
Hello Monika,
I just stumbled upon your post on Google because I was looking for a way to test the new WP 2.6… Thanks for the tutorial. I think it will really help me a lot in testing WP installations (plugins, themes, etc) from now on. Take care!
Please allow me to share this vidto tutorial on how to install WordPress Locally with your community.
http://www.youtube.com/watch?v=biQWyBcYSX4
Regards
Shane
[...] article that saved my blood pressure was written recently by Monika Mundell and I can really recommend [...]