In 2004 I started blogging on my own domain using discountasp.net as they offered a competitive hosting package based on Microsoft technology. Fast forward nearly a decade and I haven’t used Microsoft technology for nearly 5 years and maintaining my Blogengine.NET blog had become an increasing challenge. Upgrades have become very difficult and I find myself stuck on a tweaked version that can’t be upgraded easily. Recently, Google added support for PHP to Google Appengine and posted steps to get WordPress running. I applied for early access and I’ve been slowing migrating all of my content.
I’m writing this post prior to completing the migration as the number of steps involved has been growing and I figured it might be helpful to track what was required so I don’t forget and to share what I found. The list here is not exhaustive by any stretch and it’s really written in such a way for me to remember at least some of the details.
Once I got a basic install working I spent several days getting reacquainted with WordPress which I’d used many years go. Needless, to say it’s come a long way and with an iOS client on both the iPhone and iPad it looks really promising.
- Memcached plugin (and no this doesn’t activate!)
- BlogML pluggin
- Redirection plugin
- Creative Commons
- Google Analytics for WordPress
- Adsense Explosion
- Pushover Notifications
Importing My Blog Content
This process involved researching tools to import BlogEngine.NET’s BlogML format for which I found a plugin. The plugin wasn’t just drop in and go as I ran into issues with it processing my BlogML.xml file that required manually editing the XML as well as finding and patching XPath.class.php to v1.148 as it was outdated.
I also had to patch function parse_blogml in blogml-importer.php to read my BlogML.xml file from my WordPress dedicated Google Cloud Storage bucket like this (and yes, figuring out this URL took a fair bit of Googling):
$sXml = file_get_contents('gs://wpsdt-blog-files/BlogML.xml');
Next I found my BlogML.xml file was too large so I had to chunk it down into several different smaller files in order for the import to proceed. This took a long time as AppEngine repeatedly timed out importing the .xml file though eventually it did finally work. Oh yes, it took quite a bit of trial and error to figure out the various file permissions that had to be granted to get access from a WordPress plugin to Google Cloud Storage. This included the fact that I found myself cursing Google’s new Cloud Console with buttons to change permissions that only appear once you check the bucket you want to change. Would have been awful nice if they were just disabled so you knew those options existed.
Setting up Redirects
Export BlogEngine.NET to BlogML.xml and extract all entry URL’s to build a CSV mapping for import into the redirection plugin as WordPress and BlogEngine.NET don’t have compatible slugs. (I’m still manually correcting the dash “-” placement in over 600 slugs as no simple pattern would have worked).
Setup redirect for BlogEngine.NET dynamic image serving /blog/image.asx?picture=(.*) -> /AppData/files/\1
Setup redirect for blog archives /blog/Archives.aspx -> /blog/2013 (close enough)
Redirect BlogEngine.NET syndication link /blog/SyndicationService.asmx/GetRss -> /blog/feed
Fix up FeedBurner RSS source link /blog/feed
Set Site Address (URL) to /blog so I could continue to use appspot.com’s support for SSL for site administration without paying for an SSL cert on www.stevetrefethen.com and saving myself the cost of the cert and what looks like $9/month for SSL support on AppEngine.
Of course, I learned a hard lesson along the way by changing both the WordPress Address and Site Address URL’s in such a way that created an infinite redirect loop. To fix this I had to install Google’s CLI tools for accessing MySQL on Google Cloud SQL and manually update the wp_options table to correct my mistake.
School Blog Content
While I was working on the the Scotts Valley Parcel Tax effort I setup a secondary BlogEngine.NET install (before it supported multiple blogs) and all of that content had to be exported, imported, and redirected as well so repeat many of the above steps.
I was a fan of ScrewTurn wiki and had been running a few installs of that as well so I moved a number of those pages here manually largely but cut/paste as there is/was not export/import available.
Handling Static Image Files
Over the years I’ve had various image files scattered around my site thus I had to copy these paths from my old site into the new WordPress install which included:
Upload various media files to my WordPress Google Cloud Storage bucket.
Domain Name Transfer
I’d not done a domain name transfer before so this was my first such experience and while it all went smoothly the only problem was a very poorly written email from OpenSRS (whose website looks like it’s from the early 90′s) that mislead me thinking the transfer would occur after 7 days. The email read (emphasis mine):
If you wish to cancel the transfer, please contact us before Tue Nov 12 04:13:22 2013 by going to our website, <link removed>
Needless, to say I didn’t click the link until after the deadline passed only then to realize the link had a checkbox I needed to click and submit.
Years ago I’d gotten a Google Apps for Domains account for my Gmail hosted personal email address so once the domain was transferred I just needed to edit the zone file and get it pointed to my WordPress AppEngine project.
After running into a few problems I found his issue with app.yaml
# missing handler
- url: /wp-(.+).php
- url: /(.+)?/?
All in all I’d say this was a pretty damn painful process with a lot of trial an error that took me a few months of late evenings to get going. I’ve been blogging since June 2004 and accumulated an awful lot of cruft over the years that I simply didn’t remember which didn’t help.
The site has now been running for a few days and I’m in the process of trying to reduce the cost of running it on AppEngine as it’s currently over $2/day whereas discountASP.NET I was running about $20/month with SQL support. Just applied a few changes based on this post.
Found this post which I totally agree with.