ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Migrate from Drupal to EE

July 08, 2008 12:03pm

Subscribe [4]
  • #1 / Jul 08, 2008 12:03pm

    alix

    4 posts

    I have a Drupal site with over 400 blog entries (some with embedded photos) that I need to export in MT import format, in preparation to import into EE.

    Has anyone done this recently? Did you find any helpful tools?

    The migrate to EE page doesn’t mention Drupal. Regrettably, I am not handy enough with scripts to crank out my own. I’m dreading doing this as a cut and paste operation, but I suppose I will if I have to!

    Thank you for any guidance you can provide.

    Alix

  • #2 / Jul 08, 2008 12:30pm

    elwed

    151 posts

    I’ve done this before, but not recently. I’ve also done the reverse, but that’s another topic 😊

    Way back when, I customized an MT export script I found on drupal.org and ended with one script instance for each node type that I used (posts, forum entries, blog entries, quotes, book pages, and probably a few more). I don’t have the time right this minute to see if I still have the scripts; PM me if you’re interested and I’ll see what I can find.

  • #3 / Jul 08, 2008 12:40pm

    gridonic

    231 posts

    If you find something, please post it here as there might be others besides me interested in this as well.

  • #4 / Jul 08, 2008 7:35pm

    elwed

    151 posts

    I found the scripts in an old backup; I’ll try to make them distributable and post an update here.

  • #5 / Jul 08, 2008 8:40pm

    alix

    4 posts

    Thanks, Markus. I’ll look forward to seeing whatever ya got!

  • #6 / Jul 09, 2008 11:02am

    elwed

    151 posts

    Here’s what I have.

    Please note:

    0) I’d be happy to answers questions related to this code, but be aware that it’s been almost two years since I used it myself and I haven’t looked at a Drupal database since.

    1) The script is based on code I found on drupal.org. I haven’t kept a bookmark to the source nor do I remember exactly how I modified it (or why).

    2) The script is Drupal 4.x vintage. I do not know if it will run with more recent versions and if not, how much effort it would take to adapt it.

    3) The script was pulled from a working directory and wasn’t meant to be distributed. Proceed at your own risk.

    4) There are two include files that map category and user names. My recollection is that I hand-crafted these files. If your Drupal database has a huge number of categories (free tagging) or a large user base, you can probably craft a query that generates the content of these includes or gets you into striking distance of a decent editor.

    5) I used one script per node type and the original Drupal site was a multi-author blog that used forum posts as a default node type, therefore the sample script provided targets forum posts. For other node types (page, story, book, blog, what have you), you’ll have to find and replace the hardcoded references to “forum”.

    6) I used ran the script from the command line on a Linux box, sort of like:

    php ./forum-to-mtexport.php > forum-posts.mt


    7) Pay really close attention to character coding issues and if necessary, run your favorite recoding utility on the output file obtained in 6).

    8) Another source of grief is the difference between bbcode (which the Drupal site used heavily) and pmCode. The .mt file might need some editing to address any such issues. In general, if the Drupal site used input filters, this will need to be addressed. Drupal’s HTML filter may also be configured to be more permissive than EE, which will also require some attention.

    9) You should use a test install of EE and create a DB backup before importing the MT file(s). Go through the EE site with a fine comb; if there are problems, it might be more expedient to fix them on the EE site or it might be best to roll back the EE site and modify the script(s) and/or MT files and repeat.

    10) Depending on the Drupal features used, porting the content might be the least of the problems of migrating to EE.

  • #7 / Jul 09, 2008 12:08pm

    alix

    4 posts

    Markus, thank you so much for taking the time to find your scripts. Your cautions are well-noted. I’ll see where this takes me!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases