Combining two existing Drupal installs into a multisite setup

Events happening in the community are now at Drupal community events on www.drupal.org.
cdd23's picture

I'm trying to figure out how to move from my current configuration to a Drupal multisite configuration and would love any help or suggestions. I have done some searching in documentation but haven't found anything to address this issue.

Here's what I've got now:

mainsite.org
non-Drupal site that has ~30 html/php files, combined with simple PHP/MySQL managed content, i.e. calendar, announcements, upcoming events, links.
mainsite.org/drupal1-registrations
a Drupal installation with different layout and branding than the main site. Used for registering for classes for an annual event.
-Drupal 6.19 (will update to 6.20)
-Ubercart 6.x-2.4
-CCK, Views, etc.
mainsite.org/drupal2-event
a second Drupal installation with same layout and branding as main site, duplicated in Drupal (Zen). Provides info and maps for a different annual event.
-Drupal 6.19 (will update to 6.20)
-GMap 6.x-2.4
-Get Directions 6.x-2.0
-Location 6.x-3.1
-CCK, Views, etc.

What I'd like to do:

mainsite.org
do a Drupal installation at the top level that includes all content currently at this level.
mainsite.org/registrations
keep this Drupal installation intact but integrate it with mainsite.org, so that users signed up at mainsite.org can access content in this section based on roles (including admins, etc.)
mainsite.org/event
keep this Drupal installation as it is but also connect it to the mainsite.org.

Is there a way to do these two things? Both move content from a non-Drupal site into Drupal while at the same time incorporating two current, separate Drupal installs into a multi site set up?

Or do I need to start from scratch? (I really hope not because both of the subsites were challenging to set up but are running stable now.)

Thank you for your time and help.

Comments

What do you mean by "do a

davidhernandez's picture

What do you mean by "do a Drupal installation at the top level that includes all content currently at this level." ?

Are you moving the content and functionality into Drupal, or do you want to leave the HTML and PHP files as is?

moving it all to Drupal

cdd23's picture

I want to have a site that is totally Drupal, so moving the content and functionality to Drupal.

The main section would be it's own Drupal install with the current two Drupal subsites as part of that full Drupal mulitsite. Does that make sense to do it that way?

A little more info:
I am looking to implement a membership through Ubercart, where users who become paying members through an Ubercart product, will automatically have the "member" role and can thereby access members only sections of the site(s).

As I've been thinking about this, one option I've considered is just leaving the two Drupal subsites alone and doing a separate Drupal install for the top level. The drawback is the users table not being shared between the 3 Drupal installs, So people would need to loginto each section of the site separately.

There would also be the unnecessary overhead of 3 separate Drupal installs on a single domain. I'm just not sure how to integrate the two existing Drupal sites with the main site when they are already distinct sites.

Moving content from the

Garrett Albright's picture

Moving content from the non-Drupal site to a Drupal one is another issue I shall ignore for now. I know there's a module floating around out there which purports to import content from static HTML pages into a Drupal site, but I can't recall what its name was, nor do I know how well it works.

But to merge one Drupal installation into another, here's how to go about it:

  1. Back up everything.
  2. Make a redundant copy of all data.
  3. Archive all information contained on your site.
  4. Repeat steps 1, 2 and 3. Also, test all this on a cloned copy of your live site before doing it on the live site itself.
  5. Upgrade both core and all contrib modules and themes to their latest versions on both sites.
  6. Make a note of all non-core modules on both sites, then disable them. Do not uninstall them (don't use the "Uninstall" tab on the module listing page); this will cause you to lose data. Just disable them. Also switch both sites to using a core theme (like Garland) and disable all non-core themes. Note that this is necessary because Drupal does not like it if you change the locations of modules while they're enabled. Speaking of which…
  7. Move (or leave) all contrib modules and other modules which will be shared among all sites into the "sites/all/modules" directory of the soon-to-be-parent Drupal installation. Likewise with themes ("sites/all/themes").
  8. Create directories under the "sites" directory of the parent installation for both sites (like "example.org" and "example.net"), create "modules" and "themes" subdirectories for both if appropriate, and move each site's unique modules and themes into those directories.
  9. Copy the default.settings.php file into both directories, rename it to settings.php, and edit it to point to each site's respective database.
  10. Now access each site in the browser. It should still work and show all the previous content, albeit using the core theme you selected before and with no contrib modules enabled.
  11. Log into each site and re-enable all of the non-core modules and themes you need.

Hope this helps.

Thank You!

cdd23's picture

Thank you Garrett. This is extremely helpful and exactly what I was looking for. (I especially like steps 1-4. :-)) I just really didn't know where to start or if it was even possible. It sounds like it should be a pretty straightforward conversion, which is a relief.

I had a meeting yesterday with the organization for which I'm doing this project, and this upgrade has been temporarily put on hold (for a month or so) so I won't have feedback for a while.

And as far as converting the main site to Drupal, you are probably referring to Import HTML as the module to do such an import. The current HTML/PHP/MySQL content is in a state where I don't think it can be easily imported into Drupal, though that module does look pretty cool. I've been anticipating having to do a manual transfer, which is fine since a lot of content will be changed/updated at that point anyway. But thanks for the reminder that Import HTML exists because it may be worth a try.

Thanks again,
Christopher

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: