AlistairL Blog migration from SubText to WordPress

In the spirit of the web I thought I would share a little more detail on how I migrated the content from my existing platform to new. This blog started in 2004 on a platform called subtext and with my dev skills fading in to the background and the original platform not being maintained anymore I was looking for something easier to run with (and a more current platform).

In the end the migration only took a couple of hours given preparation of a development machine which I was doing for a home lab and for ongoing study for Microsoft exams. The development machine is a vm hosted in Hyper-V Server, the machine is Windows 10 with a bunch of tools for Azure ARM Template development; in this case Visual Studio 2017 was the important one.

I took inspiration from the great prototype code produced by Ricci Gian Maria from their blog post Move blog post from subtext to WordPress with Metaweblog API – I had to gather the key dependencies and I was lucky that they are still readily available on the web. A recent project at work reinforced that I needed to move quickly before the material dropped off the web and versions moved on.

I found the main Metaweblog API Joe Blogs project by Alex Brown had moved to GitHub so cloned that repo to my machine. The key XMLRPC dependency of that was easy to find on NuGet.

The BlogMigrator is very simple, taking login details and endpoints for the source and destination blogs and I had the user information to hand for the source hosting and a site that I had created on wordpress.com (this one!) many years ago. In fact it was the XMLRPC endpoints that took some time for me to work out. For reference (substitute the base urls) the endpoints were:

  • SubText – <base url>/services/MetaBlogAPI.aspx
  • WordPress – <base url>/xmlrpc.php

Given the download I fired up the Blog Migrator and hit an issue with the parameters on the main call to recent posts – SubText was expecting a string whereas the wrapper was passing an integer. Easy fixed, I added the project to the Blog Migrator solution and changed the parameter – recompiled and things started working.

The main limitation is that the SubText API didn’t cover comments but otherwise the code did the job.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s