I know there are several threads on multi-site install, but I still don't get it with v5rc1. I'm a bit confused because this version has automated the setup and none of the previous posts seem to be completely relevant when it comes to initializing new tables, etc.

The setup I have/want is one Drupal database with tables for each site that use different table name prefixes. I point my domains to the Drupal dir and it should use the settings.php file in a directory under sites, named for the domain.

I have two sites set up now like that but I did it by accident, I think. When I did the original new install, everything worked like it should.. I entered the database name, etc. and where it asked for a database prefix I thought it was asking for what I wanted as a prefix for the SECOND site. When I found out that it used the prefix in the settings.php for the default site, I created a dir under sites in the name of the second site and copied the default settings file there. Then I renamed the prefix in the default site file, and I have two sites (like I want) using the same db but the tables have different prefixes (again, like I want).

The problem is adding additional sites. I've created the directory for a third site under sites and put a settings.php file in it with a new table prefix, but the browser comes back with multiple 'table doesn't exist' errors, so obviously I need to create the tables. Since the scripts automatically created the new tables when I changed the default settings file, I assumed (I know, I know) that it would also do it with a new table prefix in the additional site directory settings file, but obviously not.

Before I try changing the prefix in the default dir & swapping files all around like before, I thought I'd ask if I'm missing something! I'm an absolute noob (obviously) and I've managed to get a decent grasp so far, I think. But I totally don't know php and CMS's so I don't want to muck about TOO much.

Thanks in advance, & Happy New Year!!

Comments

jd4x4’s picture

I forgot to note that my Drupal dir isn't directly under the root, but under a dir called CMS which is in the root. I don't know if this makes a difference, but it didn't seem to be a problem with the initial install.

jd4x4’s picture

Problem solved.

It was one of those 'so easy that I totally overlooked it' things. Although, it was easy enough that I think it should be a step-by-step note in the v5 readme.

1. Create a folder under Drupal/sites named new.site.name .
2. Edit a settings file to define a new database table prefix and put it in the new sites/new.site.name folder.
3. Point your domain name to the Drupal folder.
4. Point your browser to new.site.name/install.php (Note that it is NOT necessary to put install.php in the new.site.name folder!! .. in fact, doing this will NOT work!!!)

ehowland’s picture

I knew it had to be easy but after adding my new directory under site. I did not realize it would automagically find the install.php file.