On Moving from Blogger to WordPress
India Travel Blog was running on blogger platform till last week, and is now moved to wordpress. Though I had been contemplating on movement wordpress for a long time, I procrastinated due to the volume of work it might turn out to be. I was keen to keep all the existing pages and permalinks unchanged, and it seemed to be a difficult job. Thankfully a few scripts came into accelerate the job, and it turned out to be easier than expected. Nevertheless, there were many problems to solve and things kept breaking, which made the migration a week long process.
Rest of this post will be little techie; skip it if you are not tech savvy. I shall try to explain the steps involved in migration, all the trouble faced in the process, and how they were overcome.
The first activity was to install wordpress on local computer and redo the blogger template to work on wordpress. This is the task that took bulk of my time, and this crisp tutorial gave a quick dump on how to do it.
Next step was to migrate all the posts from blogger to wordpress. The good folks at wordpress have a automated system for importing data from a blogger blog, which takes care of bulk of the hard work. All that I had to do was to press a button and watch the posts slowly getting loaded on the wordpress blog. As a safer measure and to ensure that my new template was working well, I decided import the posts into the local installation and then export it to http://travel.paintedstork.com/blog. Here came the first obstacle: the import function refused to work and just hung, without doing its job. After several retries, a quick search revealed the solution in wordpress forums. While no one knew where the problem was, a workaround was in creating a blog at wordpress.com, importing the blogger posts into it and then exporting from wordpress.com. And once again to ensure that my template works well, I exported the posts from wordpress.com, first to localhost and then to paintedstork server. The PHP engine on paintedstork.com would allow an upload of only 2MBs at a time but my export file was nearly 4MB. This required splitting the export file into two.
The folks at devil’s workshop have a nifty script that helps keep the permalinks created by blogger. It turned out to be a lifesaver, automating the job of fixing every permalink one by one.
Finally, the job was done, and the posts were appearing on travel.paintedstork.com/blog, rendered from wordpress platform. A few minor issues with the template were resolved with little effort. But it turned out that the random images widget – the image banner on the top stopped working. The widget uses coppermine web gallery libraries, and calling one PHP program from the other using ‘include’ had resulted in some conflicts. After several attempts to work around this with iframes and server side includes, finally the solution came in the form of php ‘readfile’ function.
Next, I found that redirection of RSS feeds to feedburner had stopped working. Along with that, configuration changes I made on the web server to redirect blogger feeds to wordpress also did not work as intended. I raised a support ticket, and the folks at my hosting company struggled for a few hours to find the source of the problem, without much success. No complaints there – my hosting company has excellent support and quick turnaround time, and have rarely failed me. But this time, it came back to me and it was up to me to dig deeper into apache’s redirection mechanism. This article was great help in explaining the fundamentals, and apache’s mod_rewrite documentation eventually helped me solve the problem.
Finally, I had my fundamental goal met. The feeds and permalinks remained exactly as it was for blogger, and the my readers did not have to worry about changing their bookmarks or get stuck with old blogger feeds. At this moment, I moved blogger generated files and brought up wordpress to complete the migration.
Though I have tried to make the change transparent, some issues have remained. During migration from blogger, wordpress has corrupted a few img tags, and has stripped all the embed tags that displayed google maps and a few videos. I could not resolve the problem, and some old posts now have missing images or google maps. This, I hope to resolve over time, going through one post at a time. The comments section looks very amateur and needs some work in making it look better. Hopefully everything else is working just fine, and you will have to make no additional effort to continue reading India Travel Blog.
Epilogue: I guess I am still not used to being on wordpress. I scriblled the whole post on my blogger console, and realized that I am working on the old platform just before hitting the publish button!