I thought I'd post this here just in case this helps someone. I also suspect some can add to this post and do things a little more neatly than I did.

Objective
To install latest drupal 6 ver on 1and1 shared hosting for two different domains off the same code base and the same database. I know some may be thinking this might be an odd thing to do from a performance or capacity point of view (1and1 limit dBs to 100 MB), but it may work very well for small-ish not so busy sites or super performing hosting providers.

  1. Install drupal as per normal instructions
    For 1and 1 make sure you are using php5 and you uncomment "# RewriteBase /" in .htaccess file to enable clean urls. An excellent guide on this and other drupal tricks can be found at http://www.sitetrick.com/

    Also, during the installation you can opt to give the table names a prefix (e.g. "domain1_"). This step makes it easier to identify tables or potential maintenance issues.

  2. Point your second domainname (say domainname2) to the dir where drupal is installed
    This is very easy with 1and1. Simply navigate to where your domains can be listed and modify the web space for the chosen domain. No symbolic links required.
  3. Copy sites/default folder to sites/domainname2
    Use the actual domainname2 - ie. www.domainname2.tld.
  4. Edit the sites/domainname2/settings.php file
    The **only** edit required here is to change the line
    $db_prefix = 'domain1_'; to $db_prefix = 'domain2_';
  5. Run install.php script on second site using www.domainname2.tld or http://domainname2.tld
    Both access methods worked for me. As we're using the same database with the username and PW in the settings.php file the installation zooms through.

Well that's it. You can install as many sites as you dare from the same code base and using the same database - so easy.

Comments

bwv’s picture

Outstanding, thank you for posting. Worked (in my case, with a 5.7 drupal installation) exactly like you have documented. And it took me about 4 minutes.

----------------------------------------------------------------------
http://www.bwv810.com/

I am a writer and researcher. In my spare time I build websites with Drupal.
Je peux communiquer en français. / Я могу общаться на русском языке.

tldavid’s picture

Hi
I'm looking for help with installing 6.2 on 1and1. I was following the instructions from the following discussion group posts
http://drupal.org/node/75041, and http://ftp.drupal.org/files/videocasts/Install-D6.mp4. Any tips would be great, I'm a newbie.
Thx
TL

bwv’s picture

I have installed it manually. Upload and extract the tar file, create your database, and run the install.php script. Sets up in a few minutes. Contact me separately if you need further assistance.
----------------------------------------------------------------------
http://www.bwv810.com/

I am a writer and researcher. In my spare time I build websites with Drupal.
Je peux communiquer en français. / Я могу общаться на русском языке.

kenathas’s picture

I think I did what you said but I am not sure how to get the install to go.

my main Drupal install is in /public_html/drupal

I create the add-on domain and have that pointing to /public_html/drupal/www.mydomain2.com (folder)

First, is that correct?

Then, my first install was via Fantastico, I assume I can use a downloaded version so as to point to the database I choose?????

Any help would be greatly appreciated,

Ken

hiflyer’s picture

kenathas - From what I've read in other threads I believe you should point all you domains to the main drupal installation folder, drupal will then utilize the proper sites/ sub-folder. Having said that I have yet to make this work so I could be wrong. ;-)

My current issue when trying to run the install.php under the sub-domain is a fatal error (that I'm not sure is related to being a multi-site but that's the only time I get it. Any ideas?

The error is:
Fatal error: Call to undefined function phptemplate_get_ie_styles() in /home/user/public_html/drupal/themes/garland/maintenance-page.tpl.php on line 23

odeno’s picture

Ken et all,

**Read** my steps above to answer your question....

davidkyte’s picture

Thanks for that post

Dave

CMS & SEO Coach and Video Developer
www.drkyte.com