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.