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.

image

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

image

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

image

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:

  1. Video That Helps Install WP Locally
  2. How To Install WordPress In 5 Simple Steps
  3. Install WordPress Themes Automatically
  4. The Easiest Way To Install Wordpress
  5. Install Your WordPress Plugins Automatically

No Responses to “How to Install WordPress Locally on Your Hard Drive”

  1. dott-com on November 6th, 2007 6:19 am

    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.

  2. Monika Mundell on November 9th, 2007 4:49 am

    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

  3. David on November 15th, 2007 3:54 pm

    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

  4. Rudy on November 15th, 2007 4:12 pm

    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

  5. Fleur on November 16th, 2007 6:32 am

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

  6. Piseth on November 16th, 2007 7:05 am

    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.

  7. Monika Mundell on November 16th, 2007 11:31 am

    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.

  8. bakkouz on November 18th, 2007 10:49 am

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

  9. dblues on November 19th, 2007 2:29 am

    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?

  10. Pete White on November 20th, 2007 4:44 pm

    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.

  11. Jac on November 20th, 2007 7:31 pm

    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.

  12. Monika Mundell on November 22nd, 2007 3:53 am

    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.

  13. Video That Helps Install WP Locally | Wordpress Tutorials on January 30th, 2008 3:17 am

    [...] 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 [...]

  14. How to setup Wordpress locally within 30 minutes on April 9th, 2008 7:00 am

    [...] 2. How to install XAMPP for windows? Installation Guide [...]

  15. jessie on July 6th, 2008 3:14 am

    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!

  16. Shane on October 23rd, 2008 5:34 pm

    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

  17. Lower Blood Pressure - Install Wordpress Locally on Your Hard Drive. on November 6th, 2008 11:20 am

    [...] article that saved my blood pressure was written recently by Monika Mundell and I can really recommend [...]

Got something to say?





  • Join us On FaceBook