Update: I no longer use this method. InstantWP provides a much easier solution for installing WordPress on Windows.
——————-
You may have noticed I changed my blog’s design.
I’ve wanted to do this for a while, but I kept putting it off because I knew I needed the time to customize the design, images, add my logo, etc.
If you’re starting a blog for the first time, then there’s no need for a WordPress testing environment. You can test everything live because no one knows your blog address yet.
But what if you already have a WordPress blog and you’re ready to switch to another design? You find a template that you like but notice some things you want to change (logos, other images, layout etc.)
Sure WordPress makes it super easy to switch template themes, but almost everyone wants to customize them in some way. And it’s better to do those things offline in case you mess something up.
No sense in letting your visitors see the new logo you uploaded that pushed your layout out of alignment. đ
So I did some searching around and found out how to install WordPress on my PC. It wasn’t as hard as I thought it’d be and only took a few minutes to setup.
It’s real convenient to have WordPress on your machine because you can test things out before launch. This is also handy if you’re making big changes to your blog or installing a plug-in for the first time.
Installing WordPress on Windows
1. First download the .exe version of XAMPP.
2. Place the .exe file in a folder of your choice (I put mine in C:\).
3. Double click the .exe file you just downloaded. A box will pop up asking you where you want to install it. Type C:\ (If it’s not already populated) and hit Extract.
4. Navigate to the install folder (C:\) and double click the file named xampp-control.exe.
5. Start the MySQL and Apache servers in the control panel window (See below.)
6. Now you should be able to go to http://localhost/ in your web browser.
7. Click the phpMyAdmin link in the left-hand column.
8. In the Create New Database box enter the words wordpress
9. In the MySQL Connection Collation box below select utf8_unicode_ci
10. Click Create and your database is all setup.
11. If you haven’t downloaded WordPress, please do so.
12. Unzip the folder and install it into the htdocs folder of your new directory. If you installed Xampp on your c drive then you would place the unzipped WordPress folder in c:\xampplite\htdocs
13. Inside the htdocs folder, open the file named wp-config-sample.php in Notepad or an ASCII editor (Not Microsoft Word!).
14. Look for the code below. Change the values so your code matches what is below. Don’t copy and paste. Just enter the values because your file may have more data. You don’t want to accidentally overwrite anything.
define(‘DB_NAME’, ‘wordpress‘); // The name of the database
define(âDB_USERâ, ârootâ); // Your MySQL username
define(âDB_PASSWORDâ, â); // âŚand password (Leave empty!)
The only thing you should need to change is the word wordpress for the database name. There may be a few extra lines in your file. You shouldn’t need to bother with this data.
15. Rename the file to wp-config.php and save it.
Note: If you’re using Notepad be sure to change the drop-down to “All Files” in the “Save As” menu or it will save it as wp-config.php.txt.
16. Point your browser to…
http://localhost/wordpress/wp-admin/install.php to install WordPress on your PC.
17. To view your blog’s local homepage simply go to…
http://localhost/wordpress
18. Now go and find a new WordPress theme and test away. Congratulations! You now have a local WordPress platform to test new themes and layouts on your WordPress blog.
Ray says
Hey Lisa, I just discovered your site looking for something on google, the information you give in here is priceless and I thank you very much.
I have been in the IT field for over 20 years and have created many websites for the company I worked for both from scratch and using various tools. I just started using WordPress not too long ago and I wish I had found you when I first started using it, life would’ve been soooo much easier, the way you explain things is very clear and thorough, I think I’ll continue coming back to your site and watching your videos on youtube.
Thanks again for the great info and keep up the good work.
Ray
lisa says
Hey Ray
I so appreciate you stopping by! Thanks again. đ
Chandra says
Great tutorial
Thanks for posting
Momoh says
Hi Lisa,
I wanted host my site locally since it costless.I downloaded,installed and created my database on wamp server and everything was running perfect because I can log into my PHPMYADMIN at anytime.
Secondly,I downloaded the wordpress,extract it and configure the php sample of the wordpress.
The name of the database is wordpress;database’s username is root and database password was backspace.
After all this,I tried to log into my wp-admin with this url which is http://localhost/wp-admin/install.php but it always reply me that the requested url above was found(404 Not Found).Please how do I fix this?help.
lisa says
Why not just use http://www.instantwp.com It’s much easier. That’s why I updated this article.
John says
Hi Lisa đ
I know this thread is a little old, so I hope you still look at it now and then. Is there a way to transfer a wordpress installation from InstantWP to my webhost WITHOUT buying the books from the developer? Thanks!
lisa says
Absolutely. Just locate the theme folder on your computer that was created by InstantWP and login to your live version of WordPress. Go to Appearance/Themes and Install New Theme. Now upload that folder. Activate the theme and you’re ready to go!
ehmud says
I have tried much and at last came to know that it can’t b done without XAMPP. Now it works fine on local machine đ
Cheryl says
YUP! Listen to Lisa! InstantWP is the way to go! By the way, Happy New Year Lisa!!!
James Lehner says
Hi Lisa;
I tried your “wordpress on windows” but I get the following:
Apache started (port 80)
busy
my SQL started (port 3306)
Has been runing for more than 15 minutes and nothing happened. I did un-install and start allover but still the same thing. Any idea?
lisa says
Did you see my note up top? Try InstantWP instead. Much easier!
Eric says
Hi Lisa, I’ve watched your vids from time to time and I’m impressed to say the least. I’m new to all of this wordpress stuff. I had someone create mine for me but I want to put my hat in the ring and start creating sites for others, but I have no knowledge of html or css. Anyway, I downloaded xampp like you said and then typed http://localhost in my browser and nothing happens. I couldn’t finished with your instructions because I got stuck right there. What can I do now?
lisa says
Stay tuned to my Monday post. I’m going to go into developing better user-friendly WP sites. Don’t use XAMPP. Try InstantWP.com. I have a recent post on it and it’s MUCH easier to use! http://www.instantwp.com/
Genie says
Hi!
Above anything else kindly allow me to express my thoughts for you were really influential Lis. You almost let me know everything. Your post were strongly beneficial. I do hope that will a lot who writes the way you do.
Marty Shepard says
Fantastic, Lisa! Thank you so very much for this tutorial. This solves a huge problem for me!!! Oh My God!!!!!
Jason says
Lisa I Love you… Great voice and very clear explanation!! Thanks đ
Mr. Adjoy says
I must say a very big thank u for giving a very useful straight to the point tutorial here.
I’ve never tried to do that offline before now, but I’m gonna try it right away! Kudos
Cheryl says
UPDATE, in my search for the best Thesis skin. This is by far the best one I’ve come across in my 72 hour search for skin perfection.
Don’t hate me for (sidestepping the purpose of your article here—but I know you are with me on ‘if you can find an easier way to do stuff’), but it allows you to work on your live website because it has a ‘privately published’ feature! OR you can set a date for when you want the site published as you build pages! And you can still view them in your browser.
It’s called Thesis Blogskin Thesis Theme Skins. I hope you don’t mind the shameless affiliate plug. But I knew you’d mentioned that perhaps someone would be able to refer a skin that was not knee deep in code. And they’re my first affiliate EVER! đ
It builds in your ads, email marketing (you can choose Aweber, Constant Contact or two or three others), adds your social media, etc. I do mean, its just awesome. By the way, thanks to you, I’m also a new member of SBI.
Check it out! Thanks and have a great weekend!
Cheryl says
Let me preface what I’m going to post by saying that I LOVE what you do Lisa and I appreciated this post. I went through all of the steps. I was like, WOW, this is going so smoothly. THEN, I got to the wp-config file. What a trip!
So the error message I got after setting up the file was, “sorry, I can’t find your wp-config. php file”. Then some related text went on to say, “we can help”. Clicking there took me to more WordPress help. I spent about 6 hours trying to figure out what the heck I was doing wrong.
Oh and I also got the “error connecting to the dbase” error. Then I googled “how to install WordPress locally for test environment”. And I got this! http://www.instantwp.com
Going to that website is going to give you INSTANT local wordpress installation for those NOVICES wanting to create a local environment to test themes and build without the world seeing your work in progress.
It literally took about 2 minutes! And I was done. No configuring, file renaming, nothing! It installs that PHP thing, the MySql thingy and I think some component of Filezilla. Now Lisa, if you have some feedback on this free product, by all means, you’re my guru….I’ll listen.
So now I’ll reinstall my Thesis 1.82 and test it out here. OH, a question, can you recommend any skins for Thesis that are packaged as advertised? Meaning, when you buy it from a website it looks ONE way, when you upload it you’ve got to start from scratch to make it look that way.
As a solo entrepreneur in a non-web developer/designer profession, I’m truly not trying to spend the time to do web building, I want the EASY route. đ
Thanks again for posting this, because, I would never have thought of doing this.
lisa says
Cheryl, I’ve never heard of this so thanks for posting that solution!! Sounds much easier. Plus I wrote this a few years ago so who knows how things have changed with updates of XAMPP, etc. Check this site out for some skins http://thesisthemes.com/thesis-skins/ I don’t know of any free ones, but I bet there are some out there.
Cheryl says
Hee-hee! Funny you should suggest this site for themes. It was their theme that I purchased which didn’t come packaged as represented, IMO (too many adjustments for a novice). Though they promptly refunded my $60 bucks within hours of my request.
lisa says
Oh really! Wow, that’s the only one I had ever heard of. Yeah I’ve always just customized myself with helps from the Thesis forums. But i understand that you may not want to get knee deep in code. Wish I had better resources. Maybe someone else here will suggest a better site. Glad you got your refund!!
paul says
This is Paul again.just Move the URL and if you still want the Tutorial installing wp-config.Here’s the Link: http://bloggingvideotutorials.blogspot.com/2011/04/say-your-wordpress-wp-config-error.html
Ella says
Wow – the “root” username trick worked like magic! My original tutorial was quite different. And through some WP troubleshooting it seemed it didn’t matter what I put in there (when I got confused with 3 folders open and placed the config file in the wrong one, I went through the steps to create it and WP told me the username worked with any ol’ thing or even nothing). So anyway, thanks!
Ela says
Hi. I m the worst newbie you’ve ever seen:D
How do I preview the page I am working on?
This is the first time I am opening http://localhost/wordpress/wordpress/wp-admin/themes.php
Its a localhost theme đ
Thanks!
Paul says
If you Guys are having trouble on Installing and making xampp to work,just visit here: http://bloggerconclude.blogspot.com/2011/04/say-your-wordpress-wp-config-error.html
Bisola says
Hi Lisa,
Thank you so much for this…I have installed wordpress and I did not know what to do next. Then I found you on youtude (I love your videos by the way very easy to understand and honest) I just tried to go back to find the wordpress on my computer and I do not know where it was saved. Please can you suggest where to look as I logged out after the download completed thinking I would be able to return to it to start working on it.
Please help Lisa..
Bisola
Cathy says
Thank you so much for your tutorials, I have learned so much!
I had trouble getting wordpress installed locally, I kept hitting the ‘object not found’ error until I started poking around a little with the xampp control panel. Clicking on ‘explore’ took me to the file listing for my computer and I realized that xampp had been installed in the c:/ directory but I was trying to install it on the desktop! When I moved the wordpress folder to the correct xampp directory…it worked perfectly!
Now…to figure out how to get more themes and upload them to my blog.
Thanks again!
Cathy
Wasim says
It’s a shame, I really want to do this but when I take step 7, the link just leads to an error page.
CJ says
Thank you!
I currently have a wordpress blog (free version). I have now garnered a strong following and wish to bring in ads to the blog however wordpress free doesnt allow ads. Any suggestions? Is there an easy way to convert to a blog that allows ads?
Sherri @ Luv a Bargain says
Hi again Lisa,
I got it!! Yay!! I had to actually replace âusername_hereâ with ‘root’ and then âpassword_hereâ with just ”
Now I have another question. How do I get my thesis 18 file onto my new local version to customize?
lisa says
Oh great! It’s always difficult for me to troubleshoot this setup so glad you got it. Simply upload your Thesis folder to your local /xamplite/htdocs/wordpress/themes directory (I may have the folder order of the folders wrong but you get my drift) and you should now see it as one of the them options.
masri says
lisa…searching like hell in the net..cant find firm solution for this issue im getting..Error establishing a database connection..i check 100times in wp-config and myphp admin file…there is nothing wrong…(i guess)…im using win 7, xampp 1.7.4, wp 3.1.3. php.Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 …
help guys..eager to start installing wp in m localhost
Sherri @ Luv a Bargain says
Hi Lisa,
I have gotten to Step 14 just fine. But in my wp-config-sample.php (opened in Notepad) I get this. Different than you example. I tried replacing the ‘database_name_here” with ‘wordpress’ and then I get the error message “Error establishing a database connection” like other have reported.
// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘database_name_here’);
/** MySQL database username */
define(‘DB_USER’, ‘username_here’);
/** MySQL database password */
define(‘DB_PASSWORD’, ‘password_here’);
/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);
Could you please help clarify what I could be doing wrong?
Oh…and one more question. Once I get my Local version customized and looking pretty how do I make it go “live” over at my domain? You may explain this somewhere that I haven’t seen yet.
BTW…Love you tutorials!! I am having so much fun learning how to do this myself.
stacy says
Just starting to learn WordPress with dummies book. Sadly it didn’t teach me how to install wordpress locally ! thanx a ton !
Charles Hicks says
I enjoy your material and have learned much. Have you written about using WordPress for a website instead of a blog? I followed your instructions for loading WordPress on my PC with success. Thank you. I can access localhost with Chrome, but not Fox.
Nancy says
Hi when I press start on the MySQL and Apache servers in the control panel window only MySQL turns running. Do you know what I have to do?
Kimberly Wagner says
Thanks for this tutorial. I have a local server operational and have loaded the new theme I want to use. Using an FTP program, I downloaded my wp-content and wp-includes to my wordpress on my computer. The plugins have appeared but my content has not. I am trying to save myself the work of redoing every little element… Is it possible to get my blog entries and comments that people have made, etc. moved over without doing it manually?
lisa says
Yes, just login to your live blog and export your posts and comments under the “Tools” section in the WP admin. Then login to your local version and import them in.
Kimberly Wagner says
It worked perfectly! I just have to activate the plug-ins and adjust the settings. I am especially pleased that I didn’t loose the comment luv links. Thank you for these instructions.
Pat says
Lisa I have been following you for years now and you helped me immensely to get my self hosting up and running on my laptop using vista. For almost two years I have been terrified to go live but finally took the steps. I fowled up my service twice trying to migrate live. My question is How do I take my developed blog with a couple of posts from my laptop to my host. There must be an easy way I know you have the answer, as many have said you are the goddess of blogging information.
John Media says
I really appreciate the tutorial Its really great you clearly stated the steps on what to do next and how to proceed on the next thing and whats more great is that you’ve included some screen shots making it more understandable Thanks.
Josef says
Hi Lisa
I am following you now for a while and it’s about time I should thank you for all the help you have given me.I have followed your instructions and lo and behold…it works…
You are great!!!
thank you again
Josef
.-= Josef´s last blog … What is a good painterâs model? =-.
Kharim says
Yes i have it installed on my pc and it is really great to use and update your blog from there instead of online
.-= Kharim´s last blog … What Is Your Purpose For Blogging? =-.
Joshua Pitts says
Nice little guide for windows users, but for a linux user it’s not as simple. Providing a linux tutorial would be great as Im have failed to install LAMPP several times ( Linux Version of XAMPP )
.-= Joshua Pitts´s last blog … Which Web Hosting Platform Do You Prefer, Linux Or Windows? =-.