By anzwertree on
I'm working with Drupal. Just got it working, but I'm wondering what happens if you want to start a new website. Say I'm through working with one and want to work on another project.
I guess I'd have to create another database through phpmyadmin, but I don't see anything about working with more than one website or how to plug in another database. I already went through myadmin and created a database for another project. But localhost always take me to the project I started earlier? How do I change it over?
Comments
=-=
use subdirectories or subdomains
yes, you would set up a new database and install drupal as you did with the first install.
yeah you can use another
yeah you can use another directory (lets say site2), put drupal in it..
and go to http://localhost/site2 and install it
thanks
Try this approach
localhost is great but if you looking for managing multiple site you might want to consider this :
1. Create domain (pointing to 127.0.0.1 aka localhost)
2. Set special directory for each domain.
3. (optional) Add email server for receive and send email still in localhost.
I create this tutorial that implement the points above here :
http://www.hostingformula.info/step-by-step-install-drupal-on-wamp-add-d...
http://www.hostingformula.info/step-by-step-install-drupal-on-wampserver...
I'm running multiple test
I'm running multiple test sites on localhost using multi-sites. (multi-sites are documented in the settings.php file and also here)
What I do is create an entry on my hosts file.
On Windows, the hosts file is under C:\Windows\System 32\drivers\etc\
***You're gonna need Admin rights to edit it.***
Right click on it, and click Open with and select Notepad.
On the bottom create an entry like so
You're probably gonna want to run on the command prompt
ipconfig /flushdns
Or restart your computer so the changes are recognized.
Afterwards, you go to your browser and type http://site1/ http://site2/ http://site3/ and it'll take you to the correct path.
Here is an example of my hosts file:
On GNU/Linux the hosts file is under /etc