Upgrading to Drupal 7.x

This week I decided it was time to update, upgrade and generally do something with my website. Usually when people ask about my website, I trot out the old saying "The cobbler's children have no shoes." I'm so busy working on other websites that I never have time to work on my own.

And then there's the issue of not really knowing what to do with this site, other than posting my resume and links to some of my work. So I recently came to the conclusion that since hardly anyone ever visits my site (as evidenced by my Google analytics reports), I would use it to post notes to myself. Because I do so many different tasks, there are many times where I spend a chunk of time working out how to do something, then move on to the next task, only to have to spend time figuring it out again months later when a similar task comes up. And generally these aren't programming tasks that can be documented in code for future reference. So now I'm going to do a little bit of documentation whenever I solve some tricky problem so that I can replicate the process next time.

And the first item I'll document is the process of upgrading this site from Drupal 6.x to Drupal 7.x.

For this site (being so small and uncomplicated), it actually wasn't a tricky process, but I'll document it just to have it written down. I primarily relied on the upgrade instructions on the Drupal website. Advance preparation is the key. This involved updating the core and the modules to the most current versions. Additionally, there were a bunch of modules that I wasn't using, so I deleted and uninstalled those. Then I backed up my /sites/default directory, the .htaccess file and my database and saved copies of those files on my local computer. I hadn't modified any core or module files so those didn't need backing up. My theme is backed up, but as part of the upgrade I also did a facelift, so it's just there for future reference. I also reviewed the modules I was using and compared them to what was available as a 7.x module and decided that those that didn't have upgrades were not needed anymore. Now I was ready to proceed with the actual upgrade.

I downloaded and unpacked the 7.x core, the 7.x versions of the modules I was still going to need, and the new theme. I picked this theme because it's very clean and flexible. I'll modify and personalize it a bit eventually. I put the site into maintenance mode and changed to the Garland (core) theme. Then comes the scary part where you just go and delete all the old core and module files. Particularly scary since I was doing this directly on the production version of my site, because I don't have a dev version and didn't feel it necessary to build one just for this. And I figured worst case I'd just rebuild it from scratch if things went horribly wrong since there is so little on my site.

So I loaded the new core files then ran the update script and it went 99.9% correct. Apparently something wonkey was going on with the statistics module update. But I can work around that until I can fix it. Then I loaded the new modules and ran the update script again. I had to change the admin theme since Garland was not displaying the admin pages correctly. The new core Seven theme works great for this. Lastly I loaded the new themes and activated everything. The trickiest bit was getting the CKEditor module working correctly - I eventually remembered to add an administrative role and then assign it to myself and to a CKEditor profile to get the wysiwyg editor to show up.

While I'm having to figure just where everything is now (like how to set the size of the teaser (structure->content types->type->manage display->teaser), the Drupal 7.x upgrade was a fairly painless process for this website.  And it looks to be a change for the better.