I have a setup now where I run two different sites using WordPress (separate domains) sharing the same MySQL database. One uses a xx_ tag in front of all of its tables, and it works fairly well.

I want to move both of those over to Drupal, and I'm a little concerned because I don't have much in the way of admin rights to the MySQL configuration -- all I have are rights to my database.

So I was thinking -- given that Drupal 5 has an auto install routine, could I continue to use my one MySQL database to set up the Drupal sites by specifying specific prefixes?

I.e., if I'm currently using (database) and xx_(database) with MySQL now, could I use the install routine to access that database and creat yy_(database) and zz_(database) tables without touching any of the information already in there?

This would allow me to set up both sites while the original sites remain operational, and theoretically it would be easy to switch over -- I'd just load the Drupal site and point it to the database that already has all my data in it. Then at some point I'd have to scrub all the old WordPress tables... but that's all right.

Is this doable?

Comments

vm’s picture

could I continue to use my one MySQL database to set up the Drupal sites by specifying specific prefixes?

yes.

keep in mind however, that the more you add to one database the larger that database becomes. the busier those sites become the more risk you run for some undesirable behavior for you and/or your host.

ubersoft’s picture

Unfortunately, one database is all they're giving me at the moment.

Since the only person who would be accessing the drupal sites (until I push them live) would be me, I can't imagine it would create too much of a load. And afterwards, only the "new" areas on the database would be used, and I'd prune away at all the old tables.

So in theory it wouldn't cause too much strain -- unless you mean that the size of the database would cause the live sites trouble as they tried to retrieve their information, rather than the equivalent of four sites trying access one database instead of two...

ktiedt’s picture

I just finished importing one of my WP blog sites into Drupal 5 by modifying wp2drupal (for 4.7x). Here is the entire module directory after I was done modifying it.

http://dojotoolkit.org/~ktiedt/wp2drupal5.tar.gz

Just untar into your /modules/ dir and you are ready to go.

note: there appears to be a bug in migrate.php that doesnt associate the vocabulary terms with the vocabulary id, however you can easily go in with phpMyAdmin and do an UPDATE `table_name` set vid=X where vid=0 to fix this

-Karl

aren cambre’s picture

This module doesn't work with Drupal 5 RC1. See http://drupal.org/node/69706#comment-187008.

ktiedt’s picture

Interesting... it worked fine for me on 5.0 and 5.1... I'll check my files and re-tarball it when I get home.

-Karl