I'm new to the Drupal community, so hopefully I didn't reinvent the wheel, despite looking around for what we needed to do.

Please try out my new module:
http://code.google.com/p/drupal-multisite-manager/

This enables a new content-type called 'Drupal Site' which creates a new Drupal instance from within the main drupal site. It allows for creation of a new instance either in the same database with a different table prefix or a neighboring database, while the Drupal site creator (i.e. the user) doesn't need access to the database's passwords, etc.

This should complement nicely with some of the OG work which allows multiple sites to have various levels of integration.

Our particular use-case was to give various clients complete sandboxes, and a one-click option similar to what can be done in products like MovableType or Wordpress-mu.

Please send feedback, bugs, etc. I've tested this in various ways with MySQL (both table-prefix change and creating new databases). Postgres support is still untested.

Design-wise, this does the exact same thing as install.php, so it should be pretty clean.

Comments

pamphile’s picture

nice

each new site gets a new domain or subdomain ?

schuyler1d’s picture

it can. Our use case is that the new sites default to something like:
www.example.com/site/{site_shortname}

Once people get their site going, we may reassign it to a subdomain. However, if all subdomain traffic routes to your single server, then you could do it. In that case, the documented details of what you would put in the ./sites/example.com.sites/settings.php would need to be merged into your ./sites/example.com/settings.php where the conditional would changed based on the subdomain rather than the second path variable.

Let me know if you need help with this. I'll probably document this use-case, since it would seem to come up often enough.

mlhess’s picture

Since your module is under GPL, why not sign up for a CVS account and add it on the drupal pages, people will have a better change to benefit from it.

schuyler1d’s picture

I did a week or two ago. I still haven't heard back from them. Maybe this is my noob status showing. If there's another way, besides filling out the black-box form, let me know.

schuyler1d’s picture

ok, it's where it should be now:
http://drupal.org/project/multisite_manager