I'm no technical expert and I'm sure many people will understand much more on this topic than I do, but I thought that some of the less technical readers would benefit from understanding something of what I've just done (with help from my dad) to upgrade my blog. I'm hoping that because I’m not that technical myself, my notes will be more easily understood by others like me. You may still need professional help, but at least this may help you understand the basics. This note is a bit long, but I hope nobody will mind. Clarifications and additions from those more expert would be most welcome.
Like many of us, I made quite a few changes to my template during the months since I started blogging. When Blogger Beta/New Blogger came along I was keen to migrate, but when it came to it I realized that the only way to keep all my changes intact was to select the "classical template" option and paste in my existing template html.
This was fine in terms of migrating to the new service, but I soon realized the drawbacks. Had I started under New Blogger, I would have used a new style template with all the advantages of the page element display and widgets. By keeping the old template, this was lost to me.
Essentially, everything that belongs to your site under Blogger lives in one of two places – in your template or in your postings. The postings are saved separately, so if you changed your template the posts were still there. A problem if you changed column widths or something that meant old displays no longer laid out the same as before, but otherwise OK. But when you changed your template you lost all the hacks and mods you'd made. These might be colours, fonts, code for recent comments, Google Analytics, etc, etc.
Worse still, mucking about with your template could introduce errors that weren't noticed when you made the changes. You could add some code that generated expanded summaries, for instance, only to find much later that your main background colour changed on linking through an external search because some <div> or similar had disappeared or an extra one appeared and this only had an effect under this one particular circumstance, so you never spotted the problem.
Perhaps worst of all is the incompatibility between browsers. I used to check everything in Firefox and IE, but at some point I had to introduce "conditional code" to check for the browser type – a certain path to eventual disaster. And it was ages before Haalo kindly pointed out to me that my site did not render properly in Safari.
The long and the short of it is that standard templates are properly checked against all main browsers (well, that's the theory anyway), whereas we don't have time to run comprehensive checks. So ideally you want a standard template, but you also want your own code.
New Blogger offers the opportunity to come close to this. Headers, footers, sidebar contents, etc. are all coded into "widgets". Now you have three components to your blog – a template, widgets and posts. In theory you could use a standard template and make your personalisations in widgets that are automatically saved (keeping copies in case they screw up!). In practice you probably still need to make some changes to your template, but they are relatively small, compared with under old Blogger. And the new template is much neater, with variables extracted as labels and put in one place. You can even make minor mods in-between widget code sections to segment your sidebar, for instance. In other words, you interfere with your template less and in a more controlled manner.
There are many advantages to this. The fewer changes the more likely your blog is to render at all, to render identically under different browsers and to work properly when stressed through hyperlinking, etc. It also makes it easier to note your changes and re-implement them after changing to a different template. It's easier to debug anything that does go wrong. And you can use widgets!
It was this last point that drove me to change to the new template structure. Finding hacks for the old template will get harder and harder, whereas there are loads of ready-made hacks for widgets. There are even sites out there such as Beautiful Beta which have facilities allowing you to add a hack to your blog in widget form with a single click. So all those features like flickr displays, clocks, calendars, comments, archive drawers, etc. can be added so easily.
So, how did I manage the migration?
Firstly, I set up a new account on my PC as a development testbed. The idea was to recreate my blog and make all the changes without touching my live blog until everything was working properly on the testbed.
So I recreated by blogs (I've got five interlinked blogs carrying my main page, my archives and three specialist areas) in the new directory under boring names such as "mn67e4testmainpage" and, most importantly, changed the settings so they did not index on Blogger, did not generate xml feeds, were not visible to anyone except me, etc. You just go through the settings and make the testbed as invisible as possible.
The way I created my test pages was to start from scratch each time and create a new blog with a new template. The default contains widgets for the header, sidebar and footer. I then took a copy of my current template and split out all of the changes I had made. I put everything I could into widgets, adding new ones as necessary. There were some changes I had to make to the new template - for colours, column widths, navbar hiding, meta coding for site verification by Google Webmaster Tools, etc – but these were relatively small changes and I recorded them as I went. Almost all of the other changes I had made to my old template were either removed as no longer necessary or put into widgets. I took advantage of adding some new widgets at the same time.
Eventually my blogs all looked as I wanted them and I tested the hyperlinks between them by making temporary changes (these must be changed back of course to link to the right urls when upgrading the real blog). It would be easy, of course, to create new blogs under new urls but this would mean losing external and internal links, rankings, etc. So each blog was upgraded under its existing url.
Now I'd done the hard work of creating a parallel set of blogs that all looked the way I wanted, I waited for a quiet time to perform the upgrade. The first action was to save all my templates carefully. Then I posted a note on my main page saying upgrade was in progress.
Working on my subsidiary blogs first and finishing with the main blog, I selected the "Customise Design" option and clicked on "Upgrade Your Template". You get a stern warning about all template changes being lost, but of course this didn't matter because I'd already used all my changes in the testbed design and in any event had a fallback option to the classical templates. I chose the same basic template so the structure was the same. Working quickly but carefully, I added the template changes first – widening the columns, changing colours, and feeding in the other bits of code. Then I worked on the widgets. By and large the 'widgetable' code appeared in widgets automatically, but some were in the wrong place and needed to be drag-and-dropped into place. Then I simply transferred the widget code from my testbed to the live blog, bit by bit, until my blog was fully migrated.
Whereas I spent about a week on and off building the testbed – because there are some significant differences between the old and new templates that you have to master - the actual migration took only about 2 hours and was smooth as clockwork. I've had no complaints yet and was delighted to receive an email from the ever-helpful Haalo telling me that I was now rendering properly on the Macintosh. I now have blogs that are all in the new format, have relatively few changes to their templates and are ready for whatever new code is made available for me to implement as widgets.
I'm sure I've missed some things here and confused some others, but I'd be happy to answer any questions and correct errors. The point of all this is to encourage anyone who is using the classical template under New Blogger to go the extra step and upgrade the way I did. As long as you are careful and methodical, I'm sure you won't regret it.
This Post was written by Trig from Aidan Brooks: Trainee Chef