Migrating from Expression Engine to Wordpress, step by step

I know some might ask why would I import from EE to WP. Actually, I like the flexibility of desinging in WP, I like the plugins and the ease with which I can dispatch spam. In particular, I relocated in January and in 2 days off line, got hit by a spammer with 1000 spam comments. I was furious. Since I only have Core EE (that is the free version), I had no good spam tools. And I wasn’t about to shell out over $100 for the paid version for my personal blog. So for me, WP was the way to go.

The downside? EE has no “export” function for anything but templates. This is something that was not obvious and not easy to find an answer to - at least not the last time I tried, which was more than a year ago. You can easily import your RSS feed from EE to WP, but you lose all comments. Now I’ve had my mom blog since 2002 and made a lot of friends. I didn’t want to lose their comments - that’s like slighting them - so I had to find a better solution.

Here is the solution step by step:

1. Of course, back up your EE blog - critical files, database, and key templates.

2. Make sure you are suing EE 1.4.2 or later, if not, upgrade. Yea, I know it’s a pain, but why are you using such an old version?

3. Read the wiki here: EE Exporting Entries. Follow it verbatim closely. IT’S CRITICAL THAT YOU REMOVE ALL WHITESPACE FROM THE CODE THAT EE HAS ON THEIR SUPPORT FORUMS. No blanks or spaces at all, just keep the line breaks as is. Replace “default_site” with name of your weblog. Go to the index page and select “view rendered template”. If you cannot view the index page, you’ve probably misnamed it. Make sure your comments are there completey written out. If it’s ok, then do view source, save as the default name (index.php). Note that you can export a max of 999 entries. If you have more you’ll have to go back and do this more than once and limit to older entries.

4. In Wordpress, go to Import and click Movable Type. Browse to your file. If your admin name doesn’t match you will be prompted on how you’d like to fix that. Select import. The wait can take while if you have a lot of imports.

Check your entries to see if it’s done properly. It should be, using this method. If not, go back and check things like the file name you selected, the white space on your code, the weblog name, etc.

One hiccup I got was that not all of my categories imported properly. Some did, so I don’t understand why there was a mixup. My posts were also reversed numbered (yuck), but that’s a database issue I assume.

I hope this helps!!

11 Comments so far

  1. Connie on May 19th, 2007

    I’ve tried to do this at least a dozen times. Every time, after importing to WP, the most recent comment in every entry in the EE blog would appear at the bottom of the entry in WP. Didn’t that happen to you?

  2. gb on May 19th, 2007

    Hi Connie, no, this is one problem I did NOT have. What DID happen however is that the last line reads “—” and is bumped into a “read more” link. Could you be possibly missing one of the dashed lines from the comment or index code that EE recomends? It sounds odd, but I think it’s required.

    When you view the index.php page you export the format (of commented posts) should look exactly like this:

    AUTHOR: gina b
    TITLE: Little Pangs
    STATUS: Publish
    ALLOW COMMENTS: 2
    CONVERT BREAKS: br

    DATE: 04/23/2007 03:01:00 PM
    —–
    BODY:

    Blog post blah blah blah

    —–
    EXTENDED BODY:

    —–
    COMMENT:
    AUTHOR: Kat
    URL: http://blogspot.com
    DATE: 04/25/2007 10:08:20 PM

    Comment1 blah blah

    —–
    COMMENT:
    AUTHOR: Jane
    URL: http://blogspot.com/
    DATE: 05/02/2007 10:03:34 PM

    Comment 2 blah blah

    —–

    ——–

  3. KF on June 2nd, 2007

    Thanks for posting this; I was about to tear my hair out trying to get my data out of EE. I had the same problem with the WP import that Connie did, however — the first comment appears at the bottom of the post rather than as a comment. The problem, I think, is that a blank line appears between the dashed line under EXTENDED BODY and the first COMMENT; I’m now trying to figure out where that line is being introduced…

  4. gb on June 2nd, 2007

    I know from some searching around the EE site that it’s CRITICAL to remove all whitespace from the code of the comment and index templates. If you copy the comments file as it is in the EE Wiki, there’s PLENTY of whitespace.

    My mistake, I should have been more clear. I’ll edit the blog. I’d appreciate it if you let me know if this works for you. Thanks!

    Thanks!

  5. Helen on June 10th, 2007

    Thanks for posting this - I’ve been looking for the same thing. I am having a problem that I can’t seem to get around. I think I’ve followed the instructions to the letter, but I can’t seem to get the post bodies to import. My site have thousands of posts and comments, so I’ve started by trying to just import a few posts with comments. Once I get that working, I’ll do all of the posts.

    The problem is that the title comes in, but it is attributed to the wrong author and there is no Body or even Extended. Below is a sample of a “test” import that I set up (removing all white space), and even it isn’t working:

    AUTHOR: Admin
    TITLE: Test post
    STATUS: Publish
    ALLOW COMMENTS: 2
    CONVERT BREAKS: br
    DATE: 06/10/2007 06:10:00 PM
    —–
    BODY:
    testing testing testing body.

    Still testing.

    —–
    EXTENDED BODY:
    Testing extended body here.

    Still testing

    —–
    COMMENT:
    AUTHOR: commenter
    URL: www.google.com
    DATE: 06/10/2006 06:11:46 PM
    Test comment here.

    More of a test comment.

    —–
    COMMENT:
    AUTHOR: commenter 2
    URL: http://google.com
    DATE: 06/10/2007 06:12:05 PM
    Test comment 2.

    —–
    ——–

  6. gb on June 11th, 2007

    Hi Helen. Is the problem that the posts are getting mixed up, for example, it’s attributing the post to the author of the next post, or is it attributing it in some other way?

    I’m wondering if this issue is on the EE end, or on the WP end, because WP asks you if you want to add an author if the variables don’t match up.

    By the way, things didn’t work out perfectly on my blog (www.mom-blog.com), about 80% of the categories were lost and some posts are oddly lined up at the bottom (the “more” part, which I never used when posting). Thinking on it, it’s possible that this had to do with what upgrade version of EE I posted on, because the later the post, the better it rendered.

  7. Helen on June 11th, 2007

    Thanks for replying, gb. It appears that the export is working - I’m getting the right author for the right post. But when I upload the post to WordPress, it just seems to always attribute all posts to one particular author (right now I only have two authors in WP, the admin plus one other).

    I am also having another odd problem where EE seems to export the entries starting with the same one, no matter how many I put in the “limit” attribute.

    I’ve started over with the EE templates and import file a few times now, just to make sure I don’t have any typos or anything. I’ve got the WP site all ready to go, I just need to import. Argh.

    Thanks for your help!

  8. gb on June 11th, 2007

    Helen, is the MT import asking you to associate the authors with a list of drop downs? If that’s not working right, I’d post over at WP and ask.

    The EE question - I’m trying to rack my brain, because I feel like I saw that asked somewhere and the answer was something like that you could not set which entry would be first, you could only mass delete what you already exported and then export again. I tried googling this issue, but couldn’t find it. I’m sorry!

  9. Helen on June 11th, 2007

    Okay, so I feel like an idiot. It turns out that I DID have an extra space after the 5 dashes. So that problem seems to be solved - now I’m getting all of the posts and the correct authors. I am getting that “…more” link problem, too, though.

    I am also getting another odd problem where the import seems to cut off mid-post on some random posts - I can’t quite figure that out yet.

  10. gb on June 12th, 2007

    Hi Helen, sorry to hear that about the import. I just noticed from my own blog that old posts WITH comments came in perfectly, and old posts without comments did funky things. Even still, I haven’t found more than 1 post I lost (thus far, have only done random checks).

    I think that this is an imperfect process. I know there is an unsupported process that someone out there wrote using Python, but I’m not a programmer, so I can’t help.

    Helen, post your link if you’d like when it’s ready.

  11. […] hopefully it should be pretty transparent.  I used this article with some modifications (email me for help anyone).  And after hours of using some old css code […]