Migrating from BlogEngine.NET to WordPress

M

WordPress FTW! After too much pain with both BlogEngine.NET and GoDaddy hosting I moved this site over to WordPress (on DreamHost) last week.

I’ve been using WordPress and DreamHost for years on my other sites, so it was only a matter of time before my personal blog finally made the move. Recent issues with BlogEngine.NET – including Search and Comments not working after a recent update – were the final straw.

I’d been dreading the work involved to make the move, but it turned out to be pretty easy. I basically followed the steps Merill outlined, with a few tiny additions that I’ll outline below. The process even includes a CSV with the required redirects to add to your .htaccess file, so you won’t lose any hard earned Google juice.

Note that the import only imports posts (ie no pages) from BlogEngine.NET – so make a manual backup of the pages from your site (eg copy the source HTML).

Update: See also Colin Nicholls’ notes on how he made the transition.

Here’s a summary of the steps:

  1. I’ll assume you have a blank WordPress site set up. Make sure you’ve set the Permalink structure you’d like before you do the import – the import will honour those settings.
  2. Export from BlogEngine.NET to a BlogML.xml file.
  3. Copy all the images from your old blog up to the new blog (eg into the /wp-content/uploads/ directory)
  4. Make some replacements in the BlogML.xml file (eg the images paths – BlogEngine uses image.axd?picture= re-directs that you can replace with the direct path name you used in point 3)
  5. Edit the categories in the BlogML.xml file (you’ll need to replace the GUID-like IDs with the actual category names – both at the top and throughout the file)
  6. Download the wonderful BlogML import script for WordPress by Aaron Lerch (get it here) and FTP it up to your /wp-admin/import/ directory.
  7. You may need to make some changes to the settings if you have a large file. Add these to the start of the BlogML import script just after the require_once(‘XPath.class.php’);
    ini_set(“memory_limit”,”146M”);
    ini_set(“max_execution_time”, “300”);
    ini_set(“max_input_time”, “300”);
    These set the memory used to 146M* (up from a default of 8MB) and the timeouts to 300 seconds (up from a default of 30). If you import has errors you may need to up these values even more. My import had 913 posts and took roughly 4 mins (ie 240 seconds). Yours may be more if you have a big site to move.
  8. Import the file in WordPress (from Tools -> Import -> BlogML)
  9. You may discover after the import that some things aren’t quite right (eg image paths), and need to import again after fixing (it took me about 5 imports until I got it all right). Before doing so, you’ll want to delete all the imported posts. You can easily do a bulk delete using the Bulk Delete WordPress plug-in.
  10. Download the CSV file of redirects. Open your .htaccess file and add them in. You’ll need to manually add any category re-directs.
  11. You can then do all the usual blog stuff (updating your FeedBurner feed source, submitting your sitemap.xml to Google Webmaster tools, etc)

Hope that helps. If you’d like any further details, leave a comment/question and I’ll update the post.

* Note: I have a Virtual Private Server on DreamHost, so I can increase my memory to 146MB no trouble – depending on your hosting package, you may limits less than this.

34 comments

By Craig Bailey

Archives