Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Tata Cheng
8,787 PointsInstalling wordpress for every new site on localhost?
I've Googled and looked on a few forums, but I'm still a little confused. Hope someone can clear this up for me.
Do I have to install Wordpress on localhost every time I want to start a new site? I know I have to create a new folder in htdoc. Or can I use the Wordpress previously installed but just create a new database for it?
2 Answers

Matt Campbell
9,767 PointsYou'll need to copy the wordpress files into each new directory. Each directory you create in your local htdocs needs to be treated as if it was on a completely separate server. You can use one database for all the different installs though. You'll need to prefix the tables with a different prefix, handled in the installation of WordPress, but I don't recommend doing that as you should be mirroring what will be loaded to your server so, separate database for each install. Then prefix can stay as default wp_ and moving and installing stays simple.

Leslie Hui
3,330 Pointsif you don't want to have multiple installation of Wordpress, you can try Wordpress Multisite. You can follow the installation here

Tata Cheng
8,787 PointsUnfortunately I'm working on a pc using xampp... so I guess I can't install that one :/ Thanks though, I'll keep that in mind if I change over to mac

Leslie Hui
3,330 PointsIf you are using windows, it's still possible. Follow the guide here. :)

Tata Cheng
8,787 PointsThanks so much Leslie!! :D
Tata Cheng
8,787 PointsTata Cheng
8,787 PointsAlrighty thanks for helping out, I'll do separate databases for each install :)