Friday, December 18, 2009

Drupal multisite

I needed to create a new website with Drupal.  I have existing basic hosting with drupal set up on the main site.  To extend it to add another website, I did the following:

  • register a new domain and point it to the existing site
  • Create a new mysql database for the new site
  • Create a website@ or info@ email for the site and set it to forward to my address
  • Create a new directory in the sites directory for (replace that with the actual name, of course)
  • copy in the default.settings.php into settings.php
  • go to the new domain in the browser (when it becomes available, which was, unexpectedly, within minutes using opendns) and fill in the database and admin user info to set up.  [Note: I always create a separate admin user with a unique name for each site--like site123admin--with a keypass generated password to help avoid dictionary attacks]
  • set up modules, security, etc.
  • Pick a theme, make a logo and favicon
Done in a few hours.  Completely new site with no connection to the other one (except for ip address, if anyone cares about that).  And there is only 1 Drupal installation to apply updates to (a new one came out yesterday).  I now have 4 sites running on this basic hosting, and my provider will let me have another 21 databases before I have to upgrade for more (and even then I could use table prefixes to avoid upgrading).

For someone who remembers hand coding HTML using notepad back in the early nineties, being able to make a completely modern and professional website this easily is amazing.  Of course I also think that automatically flushing toilets are amazing, so you can choose to weigh my amazement accordingly.

No comments:

Post a Comment