How to Setup WordPress Locally on Windows

When designing WordPress themes, it’s nice to be able to store them locally to test them instead of uploading files to a web server. In this tutorial, you’ll learn how to set up WordPress locally on your PC and then manage multiple blogs with their own themes.

The first thing you’ll need to do is make sure you have WAMP installed and running on your PC. If you don’t, follow this tutorial first, and come back here when you’re done.

Next, you’ll need to have the latest version of WordPress.

After WAMP is up and running, drop that latest version of WordPress into the folder that your sites are stored in. This would be the ‘localhost’ folder that your sites are kept in.

Next, we need to create a database for WordPress. Single-click the semicircle WAMP icon on the toolbar. Select ‘phpMyAdmin’ from the menu that pops up.

Now you should see the phpMyAdmin interface in your browser. Under ‘Create a new database’, which is near the middle of the page, type what you want to call your database. If you plan on running multiple blogs, you may want to name it something other than ‘wordpress’. Leave the drop-down box alone, and click ‘Create’.

You can now leave the phpMyAdmin interface.

Next, find the ‘wp-config-sample’ file in the root WordPress folder. Open it up in Notepad (recommended), and change the following values:

define('DB_NAME', 'wordpress'); // new database name
define('DB_USER', 'root'); // MySQL username (root is default)
define('DB_PASSWORD', ''); // no password assigned by default
define('DB_HOST', 'localhost);

Save the file as ‘wp-config.php’ in the same folder. You should now be able to open up ‘http://localhost/WordPress root/wp-admin/install.php’ (substitute ‘WordPress root’ for the location of your WordPress folder). Proceed with a normal WordPress installation.

If you want to run multiple blogs with their own themes, all you have to do is repeat this process, and give each database a new name. You can use the same database if you like - some people prefer to have certain sample posts to test things.

21 Responses to “How to Setup WordPress Locally on Windows”

Joshua Goodwin
Posted on February 18th, 2008 at 4:40 PM

That link to the tutorial about setting up WAMP is broken.

Michael Castilla
Posted on February 18th, 2008 at 5:11 PM

@Joshua - Sorry about that. Link has been fixed.

Thássius V.
Posted on February 18th, 2008 at 6:33 PM

Instead of WAMP, I am using Easy PHP. It works fine for me.

skarld
Posted on February 19th, 2008 at 9:57 AM

I have found another link but have not used it. They call it a stack Bitnami and this site is all about stacks ohloh.

Jermayn Parker
Posted on February 20th, 2008 at 1:00 AM

Thanks for that!
Simple but it sure would help next time i try and redesign my web blogs. ta

Geek Mother
Posted on February 20th, 2008 at 8:57 AM

Being new to Wordpress and wanting to have a dabble at design then I found this guide to me very useful indeed.

I must read some more of your posts if they are as good as this one.

Thanks,

Paul

CP
Posted on February 23rd, 2008 at 2:11 PM

Great tut. Thanks. Using it now.

Tom
Posted on February 23rd, 2008 at 3:06 PM

i also found some time to write about the xamp installement locally. if you like you can read it here http://tomlovesyou.com/archives/144
maybe you find this entry useful and im very glad i could help

James
Posted on February 24th, 2008 at 12:09 PM

WOW! It really seems like we’re all writing about this at the same time.

Could it be WordPress 2.5 inspiring everyone to test it out?

:-)

zinni
Posted on April 3rd, 2008 at 8:27 PM

Thanks for the article I just added is to my del.icio.us

This is also a great to minimize downtime when redesigning a wordpress blog as you can test everything out locally before you do anything on your server. Thanks for the great tutorial.

Joe
Posted on August 15th, 2008 at 10:34 PM

WAMP is great, I was having some trouble with a previous release and had to give up on it, it just would not run. Their latest version runs great and I have had no trouble at all.

Иришка
Posted on January 31st, 2009 at 5:20 PM

Мысль не новая, но изложено интересно. Я с Ваашего позволения процитирую у себя в блоге.

Ванек
Posted on February 10th, 2009 at 12:40 AM

Уж тоже Вам спасибо скажу

Анастасия
Posted on February 15th, 2009 at 2:18 AM

А вот вопросик можно? У вас время после поста указано. Это московское? Заранее спасибо!

Венера
Posted on February 19th, 2009 at 10:57 PM

Тоже процитирую Вашу статью у себя в блоге

Сергей
Posted on February 23rd, 2009 at 4:58 AM

Спасибо, очень интересная заметка.

Валерий
Posted on February 26th, 2009 at 5:28 AM

Развейте тему дальше. Интересно узнать подробности!!!

Masha
Posted on March 11th, 2009 at 2:11 AM

А как бы мне подписаться на Вашу RSS? Не могу найти ссылку :(. Напишите на 54632два1 в ICQ или masha_golovanova в skype. В крайнем случае - используйте почту. Заранее спасибо всем неравнодушным.

Nehemoth
Posted on March 21st, 2009 at 11:29 PM

What about seeing up a mirror locally of your blog?,
the migration part is what I need.

Thank you

Trackbacks
Leave a Reply