Tip: Easy Export of Nucleus CMS Posts to import into WordPress

I recently had to migrate blog posts in a Nucleus CMS-based blog to a WordPress blog. Nothing against Nucleus which served a purpose for a long time and is still a really powerful piece of software. The migration is more to do with my experience working with Wordpres now than the quality of Nucleus. Anyway … I did a quick hunt for ways to migrate, which included some random code that referenced old versions of Nucleus and WP. I didn’t even bother with this. There is a much faster way.

The easy (and fast) solution proved to be modifying the Nucleus RSS feed so that it exports all the blog posts in full. These can then be imported into WordPress.

Steps in brief (this might be different depending on your Nucleus version):

  1. Edit the skin for xmlrss2 in Nucleus. Find this (or similar) <%blog(xmlrss2,10)%> and change it to <%blog(xmlrss2,1000)%> where the second number is larger than the number of posts in your blog.
  2. Edit the template for xmlrss2 in Nucleus. It will probably look something like this:
    <item><title><%syndicate_title%></title>
     <link><%blogurl%>index.php?itemid=<%itemid%></link>
    <description><%syndicate_description%></description>
     <category><%category%></category>
     <pubDate><%date(rfc822)%></pubDate>
    </item>

    Change it to:

    <item>
     <title><%syndicate_title%></title>
     <link><%blogurl%>index.php?itemid=<%itemid%></link>
    <content:encoded><![CDATA[<%body%>
    ]]></content:encoded>
     <category><%category%></category>
     <pubDate><%date(rfc822)%></pubDate>
    </item>
  3. Open the Nucleus RSS feed in a browser (it should be really long and include the content of all your blog posts). Save the source (nucleusexport.xml for example).
  4. Reset the changes to the Nucleus templates and skins above so your feed is back to normal.
  5. Import the RSS feed into your WordPress site (this used to be under the Manage tab, it is under Tools now).

Note: this won’t migrate comments and maybe other stuff that is important to you. This is purely the post content.

One Response to “Tip: Easy Export of Nucleus CMS Posts to import into WordPress”

  1. JAB_au says:

    Well that got me started, I was expecting it to miss the images and other content I have embedded. However it did miss posts that had ‘Read More’ links. But other wise it made life much easier, much better solution to all those obsolete scripts out there.

    Should have my site converted in the next few weeks once I’ve checked it all.

Leave a Reply