ExpressionEngine to WordPress

I recently migrated this blog from ExpressionEngine to WordPress. This was rather a daunting proposition due to the none existence of tools for doing this. The best I could really hope for was publishing all my content as a large RSS feed and then importing this feed. Doing this would have meant I would have lost all my comments, trackbacks and probably categories and a lot more other information.

Fortunately I had already written some code to export the content from ExpressionEngine. All I needed to do was write some more code to import the data into WordPress.

I am posting this code online and briefly describing it so that others in similar situations might be able to transfer their content.

“ExpressionEngineExport.py” uses Sqlobject to talk directly to the EE database (in my case via a SSH tunnel because this code was running on my local machine, talking to a firewalled MySQL server). I model as much of EE as I needed with Sqlobject classes then I “simply” walk through the sql tables sucking out data, formatting it and fixing it where possible and then writing it to an XML file.

“WordPressImporter.py” takes the XML file and via Sqlobject imports it directly into WordPress’s database.

The code works pretty reliably for me (I had a test server set up and tested the code quite thoroughly before importing the data into my “production” server), however I make absolutely no guarantees that it will work for you. I am posting the code “as-is” in the hopes that it will be useful but I do not plan on supporting this code in any way.

The code can be found within my subversion directory.

This entry was posted in Default and tagged , , , , . Bookmark the permalink.
  • Pingback: Toxic Software Weblog » WordPressTool

  • http://www.photocritique.us Tamar Weinberg

    Hi, this is really nice (thank you), but is it possible to write a README on how to use this and your other tools? They look pretty useful, though I have no idea what kind of arguments these applications require.

    Here’s an example -

    ./ExpressionEngineExport.py

    Traceback (most recent call last): File “./ExpressionEngineExport.py”, line 4, in ? from sqlobject import * ImportError: No module named sqlobject

    I don’t know how to proceed. :(

    I know you say you don’t plan to support the code, and I’m not expecting anything ongoing in terms of support, but a readme would be helpful. I’m not an absolute newbie but even I am confused how to go about this.

  • http://www.photocritique.us Tamar Weinberg

    Hi, this is really nice (thank you), but is it possible to write a README on how to use this and your other tools? They look pretty useful, though I have no idea what kind of arguments these applications require.

    Here's an example –
    # ./ExpressionEngineExport.py
    Traceback (most recent call last):
    File “./ExpressionEngineExport.py”, line 4, in ?
    from sqlobject import *
    ImportError: No module named sqlobject

    I don't know how to proceed. :(

    I know you say you don't plan to support the code, and I'm not expecting anything ongoing in terms of support, but a readme would be helpful. I'm not an absolute newbie but even I am confused how to go about this.

  • http://toxicsoftware.com/ schwa

    Hi Tamar,

    You need to install the Python module ‘sqlobject’ first. I’d suggest using easy_install to do that (google for it).

    But I’m really sorry I can’t support these scripts. Good luck!

  • http://toxicsoftware.com/ schwa

    Hi Tamar,

    You need to install the Python module 'sqlobject' first. I'd suggest using easy_install to do that (google for it).

    But I'm really sorry I can't support these scripts. Good luck!

  • sven

    This is a “old” blogpost, but your code for transfer from Expressionengine to WordPress could be useful to me. Is there any way for you to update your links?

    Thanks :-)

  • sven

    This is a “old” blogpost, but your code for transfer from Expressionengine to WordPress could be useful to me. Is there any way for you to update your links?

    Thanks :-)

  • http://toxicsoftware.com/ schwa

    sven: sorry for taking so long to reply – all my code is now on google:

    http://code.google.com/p/toxic-public/

  • http://toxicsoftware.com/ schwa

    sven: sorry for taking so long to reply – all my code is now on google:

    http://code.google.com/p/toxic-public/

  • http://neeart.com Nora

    I love it :-)
    really thank you this is a very helpful

  • http://idratherbewriting.com/ Tom Johnson

    I'm interested in migrating an EE site to WordPress, but I'm not as tech savvy as you. Do you ever do freelance jobs?

  • http://idratherbewriting.com/ Tom Johnson

    I'm interested in migrating an EE site to WordPress, but I'm not as tech savvy as you. Do you ever do freelance jobs?

  • http://toxicsoftware.com/ schwa

    Hey Tom, It’s been way too long since I converted. Sorry.