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.
Post Revisions:
- 5 August, 2010 @ 4:51 [Current Revision] by dan philibin
- 18 February, 2008 @ 15:30 by Ryan Imel
Posted February 18, 2008
Joshua Goodwin said:
That link to the tutorial about setting up WAMP is broken.
on February 18, 2008 at 4:40 pm
Michael Castilla said:
@Joshua – Sorry about that. Link has been fixed.
on February 18, 2008 at 5:11 pm
Thássius V. said:
Instead of WAMP, I am using Easy PHP. It works fine for me.
on February 18, 2008 at 6:33 pm
skarld said:
I have found another link but have not used it. They call it a stack Bitnami and this site is all about stacks ohloh.
on February 19, 2008 at 9:57 am
Jermayn Parker said:
Thanks for that!
Simple but it sure would help next time i try and redesign my web blogs. ta
on February 20, 2008 at 1:00 am
Geek Mother said:
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
on February 20, 2008 at 8:57 am
CP said:
Great tut. Thanks. Using it now.
on February 23, 2008 at 2:11 pm
Tom said:
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
on February 23, 2008 at 3:06 pm
James said:
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?
on February 24, 2008 at 12:09 pm
zinni said:
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.
on April 3, 2008 at 8:27 pm
Joe said:
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.
on August 15, 2008 at 10:34 pm
Иришка said:
Мысль не новая, но изложено интересно. Я с Ваашего позволения процитирую у себя в блоге.
on January 31, 2009 at 5:20 pm
Ванек said:
Уж тоже Вам спасибо скажу
on February 10, 2009 at 12:40 am
Анастасия said:
А вот вопросик можно? У вас время после поста указано. Это московское? Заранее спасибо!
on February 15, 2009 at 2:18 am
Венера said:
Тоже процитирую Вашу статью у себя в блоге
on February 19, 2009 at 10:57 pm
Сергей said:
Спасибо, очень интересная заметка.
on February 23, 2009 at 4:58 am
Валерий said:
Развейте тему дальше. Интересно узнать подробности!!!
on February 26, 2009 at 5:28 am
Masha said:
А как бы мне подписаться на Вашу RSS? Не могу найти ссылку
. Напишите на 54632два1 в ICQ или masha_golovanova в skype. В крайнем случае – используйте почту. Заранее спасибо всем неравнодушным.
on March 11, 2009 at 2:11 am
Nehemoth said:
What about seeing up a mirror locally of your blog?,
the migration part is what I need.
Thank you
on March 21, 2009 at 11:29 pm