You are here

Upgrading from Drupal 6 to Drupal 7

Submitted by Will on June 4, 2012 - 12:34pm

First things first: this blog post is not a how-to.

Drupal, as has been mentioned before, is probably the most popular content management system out there. It's open source which means that there's an overabundance of documentation out there on nearly everything Drupal which includes upgrading from 6 to 7. So this blog post is simply a quick review of the upgrade process itself. A process I undertook following the instructions found here.

I didn't want to go bandying about upgrading our existing sites all willy nilly because who knows what could happen. I could break something or accidentally blow up Utah or who knows what else. So the first thing I did was create a brand new Drupal 6 site. I followed the most basic instructions to install it via FTP and ended up with the most basic of Drupal sites with no additional themes or modules or even Clean URLs, but it would serve my purposes. I created a couple of nodes and a block just to have something to upgrade, and then I backed everything up and put the site in maintenance mode to prep it for the upgrade. I didn't have to disable any extra modules or themes because I didn't install any, but if I did I would have here.

The upgrade process is surprisingly simple. Basically install Drupal 7 while keeping all of your old content using the following steps:

  1. In the webroot folder, delete the default.settings.php file (because it'll get in the way.)
  2. Delete everything else in your webroot but the sites folder.
  3. Download and unpack the Drupal 7 tarball into your root (except for the sites folder).
  4. Run update.php which will bring your database up to speed. At first I got a 500 error which kind freaked me out because I had followed the instructions to the letter and it was the most basic upgrade imaginable. But I found out that sometimes you have to set your settings.php to allow you to use the update script, and luckily that's a simple process explained in the upgrade.txt file (linked above.)
  5. Check out the settings.php file to make sure it had reverted to not allowing any old person to run the upgrade script.
  6. Went into my new Drupal 7 site and took it out of maintenance mode.

And that was the end for me. I had a brand spanking new Drupal 7 site with the nodes and block I had created before sitting pretty right where they were supposed to be. Again, if I had installed any themes or modules I would go from here to upgrade all of those to their Drupal 7 versions. That can get kind of tricky, but with more and more modules supporting Drupal 7 it's getting easier every day.

And that's it. Yet another example of how powerful, yet simple Drupal can be.