Moving from Expression Engine 1 to WordPress

Moving from Expression Engine 1 to WordPress


Earlier this year I moved my blog from the content management system Expression Engine (the older 1.x, not the newer 2.x version) to WordPress. I had been planning to do the same for Melanie’s blog this summer but didn’t get around to it until forced by circumstances.

Now that I’ve done it twice, I wanted to post my notes on the process for anyone who might follow in my footsteps, especially if they encounter the same problems I did and go searching for answers. Perhaps I might save someone the days of pounding my head against the wall.[1]

Much of the hard work involved here was done by the blogger at CodeGeek, but as English is not his first language and there were some steps that could use some clarification, I will reiterate here. Plus I will include a few additional steps that made life easier.

First, download the entirety of your original Expression Engine database from your website host. (I won’t go into details as the exact steps will vary, but it’s likely you will be accessing a webpage through your host in a program call phpmyadmin.) You won’t be using this file to do the transfer. It’s just so you have a good backup of your site at the moment of conversion.

Second, if you’re moving from one webhost to another, download your images folder for later uploading to the new site.

Third, create the “export” template group as described by Musa at CodeGeek, including the two xml files, “data.xml” and “comments.xml”.

This is the content of data.xml:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
    <pubDate>{current_time format="{DATE_RSS}"}</pubDate>

{exp:weblog:categories style="linear" weblog="default_site"}



{exp:weblog:entries weblog="default_site" orderby="date" sort="desc" limit="200" offset="0" rdf="off"}
        <pubDate>{entry_date format="{DATE_RSS}"}</pubDate>

                <category domain="category" nicename="{category_url_title}"><![CDATA[{category_name}]]></category>

        <guid isPermaLink="false">YOUR_BLOG_URL_WITH_TRAILING_SLASH?p={entry_id}</guid>
        <wp:post_date>{entry_date format="%Y-%m-%d %H:%i:%s"}</wp:post_date>
        <wp:post_date_gmt>{gmt_entry_date format="%Y-%m-%d %H:%i:%s"}</wp:post_date_gmt>


        {embed="export/comments.xml" the_entry_id="{entry_id}"}         



This is comments.xml:


global $IN;
$IN->QSTR = '{embed:the_entry_id}';


{exp:comment:entries weblog="default_site" sort="asc"}

<wp:comment_date>{comment_date format="%Y-%m-%d %h:%i:%s"}</wp:comment_date>
<wp:comment_date_gmt>{gmt_comment_date format="%Y-%m-%d %h:%i:%s"}</wp:comment_date_gmt>


This is very important! After you create comments.xml, you must enable PHP parsing in the template or you will never be able to export comments.



You’ll need to edit a few places in the files:

  • Where it says SITE_DESCRIPTION_HERE put the tagline for your site
  • Where you see YOUR_BLOG_URL_WITH_TRAILING_SLASH, put the URL to where your WordPress install will go. For example, it might
  • Where it says weblog=“default_site”, replace default_site with the actual weblog shortname you have for your blog.

Now open up your website at the data.xml site. For example, in your web browser, go to

This will bring up the most recent 200 entries on your blog, along with their comments. Save this file to your hard drive with a unique name ending in 1.xml. For example, blogexport1.xml.

Go back into the data.xml template, look for this line:

{exp:weblog:entries weblog="weblog1" orderby="date" sort="desc" limit="200" offset="0" rdf="off"}

Change the offset to “200” and then reload the page It will now show the next 200 entries with their comments. Save this with the same name as before incremented by 1. For example, blogexport2.xml.

Keep doing this in 200 entry increments, i.e. offset=“400”, offset=“600”, and so on, until you have downloaded all of your entries.

Why not just download everything in one fell swoop? Because your server will likely timeout and/or choke on the data. This is an intensive process so you have to take it in smaller chunks. I’ve tried with increments of 400, but if there are a lot of comments on a post or some very long posts, it will fail.

Potential pitfalls

For some reason the xml files can be malformed as they generate. Occasionally they encounter some data in your blog that causes it to choke and the file will end abruptly. You’ll know this happened if the file you’re saving doesn’t end properly with


You’ll have to track down the offending post and edit it until the process runs smoothly,

Another potential problem is that comments get attached to the wrong post. This happened with both my and Melanie’s blogs in that for some of our older posts the comments ended up attached to the post before or after the one they’re supposed to. I don’t know why and I couldn’t figure out a fix. If you can’t either, you’ll just have to live with it, I guess.


After all the entries have been exported from Expression Engine, set up your new WordPress site.[2] If you’re moving your domain to a new webhost, go through that process. Make sure your images/uploads folder from your old site is in the same directory structure in the new site and move all the images over so your blog posts won’t have broken image links. (E.g. /

Then in WordPress itself, go to “Tools>Import” and click on “WordPress” (It will probably need to install the importer) and select the first export file. Go through the process, assign the authors to the proper user on the new WordPress site and once it’s done, verify that everything came over properly. If not, you can use the WordPress plugin Bulk Delete to delete everything you just imported so you can fix whatever went wrong and start again.

Now if you’ve been blogging a while, you have a lot of Google-fu built up to your old Expression Engine permalinks, not to mention all those links from your fellow bloggers to your old content. At this point, that’s all broken, but we can save it with a little editing of the .htaccess file at the root of your site installation.[3]

Add the following to your .htaccess:

RewriteEngine on
RewriteRule ^[a-zA-Z0-9_-]+)$ YOUR_SITE/weblog/comments/$1 [R=301,NC,L]

Replace with your domain name and make sure that the default template group on your EE blog was /weblog/comments, otherwise you’ll need to change that to reflect it.

Finally, you won’t want to orphan all those people who followed your site via RSS so you’ll need to let them know that it’s changed. Create a new file at the root of your site called rss.xml. Put the following in it, editing it of course to include your details:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">

    <description>My Blog</description>
            <title> has moved</title>
            <description>My blog host has changed and thus the feed required to subscribe to these posts has changed. Please visit to subscribe to the new feed. Thank you. </description>


Then in .htaccess add the following line:

Redirect 301 /index.php/weblog/rss_2.0/ /rss.xml

This will now show one final entry in your old RSS feed that will hopefully lead to people coming to your site and re-subscribing with the new feed that WordPress includes (or the one provided by a third-party service like FeedBurner, if that’s what you choose to use.)

All told, it’s a relatively straightforward process, once all the steps are known and mapped out. It’s just a bit time-consuming if you’re blog’s been around as long as ours have–Melanie had about 2,800 entries spanning 7 years, my blog had many more spanning about 12 years–but even so I did the switch in a weekend, including setting up the new WordPress theme.

If you have any further tips or encounter any unforeseen problems, please leave me a comment or drop a note.

  1. Unfortunately, the makers of Expression Engine no longer support the 1.x version of their software, having moved to 2.x several years ago. As the software had evolved into a more robust commercial website product rather than the more focused blogging system it had been, I hadn’t wanted to spend the money to upgrade. Unfortunately, the process outlined here to move to WordPress hadn’t been developed at the time so I was stuck in a limbo until I discovered this.  ↩
  2. This includes creating or installing the new theme, which you won’t be able to just import from Expression Engine. That’s a whole other discussion.  ↩
  3. Explaining what .htaccess is goes beyond this little tutorial. Be aware that if you mess up this file, you can make your site completely inaccessible. On the other hand, if you’re careful, it’s very useful. You’ll generally need to edit the file after accessing your site using an FTP program.  ↩

Image Credit

  • NewTheWineDarkSea-3: Own photo