Now that we have db_prefix and we have that {tablename} syntax, how about an admin option to "clone your drupal" that will take a few parameters and from that, generate a working drupal instance on the specified db_prefix?

Here's what it would need to do:

  1. Show a form requesting

    • the new Drupal site name, message and slogan

    • the db_prefix

    • the base_url for the new site

  2. load the current RDBMS script inserting $db_prefix for all tables.

  3. copy the current admin login account information.

  4. also clone the current theme, blocks, roles, caching and other essential config items.

  5. create a template include/$db_prefix.php -- you probably can't install this due to permission problems, so just offer it in a textarea for cut and paste

  6. offer to login to the new site's admin area, launched in a new window.

For my own use, items 2, 3 and 4 have to be done manually, and #2 is the most trouble -- if all our tables were named in a drupal namespace like drupal_node (which has been suggested elsewhere) then I could use a simple sed script to generate the new database.mysql script, but as it is I have to hand edit the file.

Comments

moshe weitzman’s picture

I can't think of any reason why a general admin might use this. seems like a highly specialized request.

marking as postponed until the usefulness of this better described.

killes@www.drop.org’s picture

I think that this would best be done with an external clone-drupal.php script.

beginner’s picture

Status: Postponed » Closed (won't fix)

The usefulness of the feature request has not been demonstrated.