Migrating from SingeUserBlog (SUB) to WordPress
January 14, 2008 8:18 pm Personal, ReadifyLast weekend I’ve decided to move from Single User Blog to WordPress. There were several reasons for this including the fact that I’ve changed hosting companies and decided to try something new. However this process was not simple & smooth one someone would expect for such a process.
So if you plan to migrate here are the issues I’ve encountered and the way I’ve fixed them:
- Configured my host using Plesk to support PHP. However whenever I was trying to hit a PHP page I was getting an authorization error:
After two hours with support on chat and email we were finally about to stop the migration and the support was about to reinstall PHP on the server when mostly by mistake reopened the config file and checked the box to run PHP as an ISAPI extension. Did a quick refresh and it worked. I just lost 2 hours of my life and the support guy because of a simple check box:
- SUB did not want to export my posts. I was receiving a bunch of errors from XML serialization errors to file permissions that all of them took a good time to fix.
- WordPress does not have native support for the BlogML format. After a bit of googling around I found this implementation of an import module for WordPress and installed.
- There seem to be some “misunderstanding” in the description of the BlogML as SUB was saving all the data in the blog in between CDATA sections like this:

which was not very welcomed by the WordPress BlogML importer.
For this I had to modify the WordPress blogml importer and started to drop the CDATA sections from the file.
Here is the very first PHP Code I’ve ever wrote in my life:
function unhtmlentities($string) { // From php.net for < 4.3 compat $string = substr(str_replace('<![CDATA[','',trim($string)), 0, -2); - Some posts were not correctly imported however by the time I noticed this I was too tired and sick to try to fix the importer and I simply edited the posts manually and copy/pasted the problem posts between the two systems. It looked like the importer didn’t like entries that had an encoded in them but I could not understand why.
- Installed and configured Ewal.UrlMapper component to map from old URL’s to the new ones:
Configuration section:<configSections> <section name="Ewal.UrlMapper" type="Ewal.UrlMapper.UrlMapperSectionHandler, Ewal.UrlMapper" /> </configSections>Mapping configuration:
<Ewal.UrlMapper> <entries> <entry pattern="/2006/1/17/Hawkeye\+119\+\+X64\+Build\+Alpha.aspx" target="/blog/?p=63" type="redirect" /> <entry pattern="/2006/9/22/Add\+Google\+Australia\+to\+your\+IE7\+Search\+Providers.aspx" target="/blog/?p=64" type="redirect" /> <entry pattern="/2006/10/12/Gregs\+Vista\+amp%3b\+Office\+Photos.aspx" target="/blog/?p=65" type="redirect" /> - The importer does a great job in creating a mapping file wp-admin\permalinkmap.csv with all the old and the new URL. All you have to do is to wrap those entries and make them look like a config file and you are done. Also make sure you replace all your “+” in the config with “\+” to avoid RegEx errors while trying to match the pattern.
So two days nights later here I am running WP on my blog. There might still be some bit missing here but I’m generally happy about they way this works. Now, back to blogging as there is lots of stuff to write.