How To Install Wordpress Locally On Your Computer

Ranked #19,026 in Hobbies, Games & Toys, #330,954 overall

Ever Wanted To Make Your Own Wordpress Themes?

Wordpress users often find that the templates and themes available on the Internet are not what they would choose to style their websites. I know that I've been there too and felt quite frustrated that I had ideas about color, font, graphic and layout changes that I wanted for my sites but I didn't know how to implement them. So after much research the answer to my problems was that I installed Wordpress locally on my computer and since then I've been tweaking, modifying and creating Wordpress themes to my hearts content.

While I know that it might seem like you have to be some sort of coding expert, egghead, or web tech to install Wordpress locally and start playing with templates and themes, nothing could be further from the truth. Well, okay maybe you do have to be an egghead to want to do this in the first place but seriously, getting everything installed is not only quick but all you really need to get started is a little bit of time to get the install done, a bit of patience in case you run into a few snags, and a willingness to be brave enough to attempt installing Wordpress locally on your computer in the first place.

What Do You Need To Install Wordpress Locally?

Ensure That You Have These Programs Downloaded Before Proceeding

Photobucket

To install Wordpress locally on your computer you will need the following: a computer with an Internet connection, a progam called XAMPP, the latest version of Wordpress, and the text editor of your choice (I highly recommend Notepad ++)...and don't worry about the cost of any of these programs they are licensed as open source and that means they are free for you to download and use.

One thing to note: When downloading Notepad++ choose the binary download and when you are redirected to Source Forge choose to download the installer.exe version of Notepad ++

Check Out Amazon's Comprehensive Wordpress Tutorial Library

If you are new to blogging and Wordpress but would like to learn how to get started, these invaluable guides will walk you through Wordpress installation and set-up, dealing with content, tweaking your blog with themes, plug-ins and much more. They contain all of the information you need to start using Wordpress to become a successful blogger.
There was an error loading the Clearspring module (Unable to load Clearspring widget from Uri: http://widgets.clearspring.com/cscallback/urlexchange/499822142c3a0713/squidoo.xml?x=LioNDAANCwcIAQtWClQJAggGFAEADAEHCwNYAgpRCQIBBVwYDQwADQsHCAELVgpUCQIIBg). Please try again later.

Now It's Time For The Step By Step Instructions

Make Sure You Have Time To Do This Before You Start!

All of the programs you've just downloaded will be in archived zip files (with the exception of Notepad++) and my suggestion to those who are following this guide is to make a folder on your desktop, name it local install and copy each of your archived program files into this folder just so everything is together in one place and it will make it easier to follow the rest of the instructions in this lens. Once you've made your local install folder, it's officially time to get started so on to the next section of this guide...

Notepad++

Let's Install It...

Alright let's start by double-cllicking on Notepad++ and let it run through the installation. Any settings Notepad++ offers are correct so there's no need to change anything so keep clicking through until Notepad++ is successfully installed on your computer. The last screen will ask you if you want to start using Notepad++ but you can safely uncheck that option and close the install window as we will not need to use this program just yet. If you have a look at your desktop now, you will see that you now have a shortcut for Notepad++ there for easy program access.

XAMPP

Let's Install It...

Our next step is to unpack XAMPP and we can do this by right clicking on the XAMPP archive and choosing "Extract Here" from the list of available options. Once XAMPP has been unpacked we will need to put it in the C:\ drive of your computer. So right click on the XAMPP folder and select copy, click on your Windows start button, and select Computer, locate and open your C:\ drive and right click and paste the XAMPP folder in there.

Hold on a second...By this point you might be asking yourself just what the heck is XAMPP anyways and why do I need it? Good questions both and the short answer is that normally, every online website needs some sort of engine to run it, which is usually Apache and that is provided by your web host. XAMPP is you Apache engine and it will run your local Wordpress installation. Also, every online installation of Wordpress requires a MySql database to be set up in order to run, and XAMPP comes with MySql inside it as well. Let's just say you can't run your local Wordpress installation without it. No ifs, no ands, no buts. Okay, where were we? Oh yes, we had copied and pasted XAMPP into our C:\ drive. Now we need to get XAMPP up and running so open up the XAMPP folder and look for an orange icon marked xampp_start. After you double-click the icon a black command window will open and if we were successful you should see "Please do not close this window while running" and Apache MySql is starting now...success!

Uh...Oh...Problems Have Arisen

Here are a few XAMPP errors you might have received...

What's that you say? You received some sort of error? Alright, don't panic and take a deep breath, it's going to be okay. Because everyone's computer is different, it is possible to run into problems setting up XAMPP and here are a few of the most common problems and how to fix them:

You've received an error message advising you that your port is already occupied. Do you have Skype installed? It's a known issue that if Skype was installed before XAMPP it will occupy port 80 which is the port that XAMPP needs to communicate with your Internet connection. There's an easy fix for this problem. Open up Skype and go to Tools and select Options. From the list that appears select Advanced and then Connection. There will probably be a checkmark inside where it says "Use port 80 and 443 as alternatives for incoming connections" just uncheck that box and save your changes. Skype will still function normally and now XAMPP will be able to use port 80 to run. If you need more help with this error check out the XAMPP support documents here

Another common error is this one: Warning: file_get_contents(lang.tmp) [function.file-get-contents]: failed to open stream: No such file or directory all this means is you need to create a lang.tmp file and add it to your XAMPP folder. So open up Notepad++ and you will already have a new blank file open. Go to File and do a Save As name your file lang.tmp and save it to C:\XAMPP\htdocs\xampp\ If you need more help with this error check out the XAMPP support documents here

MySQL Database

Now It's Time To Setup a MySQL Database For Wordpress

Now open up your browser (it doesn't matter which one, IE, Firefox, or Flock) and type this in your address bar: http://localhost/ and press enter. Welcome to the XAMPP index screen. Now we have to create your MySQL database that Wordpress requires in order to be able to run.

So have a look at the listings on the left, you should see phpMyAdmin in the list so click on it. The next screen might look intimidating, but the only place you need to concern yourself with is the section marked MySQL Localhost. Where it says Create New Database enter wordpress in lowercase in the field. Now you need to click in the field marked Collation and scroll all the way down to the bottom of the drop-down menu. Select utf8_unicode_ci from the list. One last field to change is MySQL Connection Collation, again click in the field and scroll down to the bottom of the list and select utf8_unicode_ci and then click the Create button.

Wordpress

Let's Install It...

Congratulations! You have now created your Wordpress database and we're in the home stretch. All we have left to do is set up Wordpress. So here we go. Let's go back to your local install folder on your desktop. Locate the Wordpress zipped archive and right click on it. Select Extract Here from the listed options and let Wordpress extract itself. Once Wordpress is done extracting, right click on the Wordpress folder and copy it. Now let's head back to your XAMPP folder in your C:\ drive.

Once you've opened up the XAMPP folder, locate the folder marked htdocs and open it. Now right click and paste the Wordpress folder here. Once Wordpress has finished pasting, go ahead and open up the Wordpress folder. Have a look through the files listed and you should see one marked wp-config-sample.php so right click on it and choose Edit in Notepad ++ from the options listed.

Now the wp-config-sample.php file should be open in Notepad++ and we need to make a few changes to it.

You should see this somewhere in that file:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'putyourdbnamehere');

You must change putyourdbnamehere to wordpress like this:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');

Next piece of information you need to change is:

/** MySQL database username */
define('DB_USER', 'usernamehere');

You must change usernamehere to root like this:

/** MySQL database username */
define('DB_USER', 'root');

Last piece of information you need to change is:

/** MySQL database password */
define('DB_PASSWORD', 'yourpasswordhere');

You must remove yourpasswordhere like this:

/** MySQL database password */
define('DB_PASSWORD', '');

Now go to File and choose to Save As and save the file as wp-config.php and make sure to save it to C:\\XAMPP\htdocs\wordpress\

Success!

Wordpress Is Now Installed Locally On Your Computer!

That's it...we're done...now copy and paste this line into your browser:

http://localhost/wp-admin/install.php

Follow the install instructions and you've got Wordpress installed locally on your computer and you can play with themes to your hearts content!

Congratulations on your success...you've earned it!

Check Out My Blog It Helps New Bloggers Get Started The Right Way

Within my site you will find Wordpress how to's, blogging tips, Wordpress tutorials, new blogger help and much, much more. I plan to cover topics like the basics of blogging starting right from building a new blog through to advanced blogging tips and techniques once you've mastered the basics.
Loading Fetching RSS feed... please stand by

Install Wordpress Locally YouTube Videos

In Case You Need Some Visuals To Go Along With This Guide

Loading

So What Do You Think Of My Lens?

Your opinion helps me to create better lenses so speak up and don't be shy!

submit
  • Reply
    iceman Jan 8, 2012 @ 2:34 am | delete
    Thank you very much. This site is very helpful.... very very helpful for a newbie like me.... by the way, do you have facebook page where I can like it or post some comments? i would like to follow your blogs post or news on "how to's" from this first step of installing wordpress until putting up to the selected web hosting servers.....

    oh, and thanks to David Bryant who made the comments. I was lost with the link given above. thanks bro.... happy new year to all
  • Reply
    Kash Mar 27, 2011 @ 2:56 pm | delete
    hey...ok i will follow these steps.. now can anyone tell, once i designed my site with all the contents on my computer using WP, how can i upload it to server at godaddy?
  • Reply
    David Bryant May 18, 2010 @ 2:43 am | delete
    I think that your lens was very professionally written, and extremely helpful. I would like to point out one thing to you:

    I tried to copy/paste this line as you instructed, "http://localhost/wp-admin/install.php" and I received an error message. Although, I quickly saw the mistake and made the correction. A newbie might have a hard time with this, so I would suggest that you change the address above to: "http://localhost/wordpress/wp-admin/install.php"

    Good luck with your next lens!
  • Reply
    ArtSiren May 7, 2009 @ 11:53 am | delete
    A great summary of using XAMPP and local WP installation. Would you suggest new users/bloggers build up their blogs (including theme design and several posts) locally before going live? I've pondered this route, rather than getting my brand new blog uploaded with just one or two blogposts.
  • Reply
    aj2008 Mar 8, 2009 @ 12:12 pm | delete
    Well I am definitely bookmarking this so I can find it again! Thank you for sharing.
  • Load More

by

jadebydesign

Welcome fellow Squids and visitors of my lens. My name is Jade and I absolutely love web design, blogging and playing around with Wordpress and its templates... more »

Feeling creative? Create a Lens!