Drupal 6 to Drupal 7

I was recently asked to research upgrading a site for work from Drupal 6 to Drupal 7 and I have to be honest, I was ripping out my hair and I'm bald! I was doing everything manually which involved downloading the latest version of Drupal 7 and then trying to find all of the modules we use and finding their 7.x versions. I had to start over several times because somehow there were errors in modules that would suddenly crash the entire site. It isn't very fun let me tell you.

After a day of bashing my head on a wall, I read about Drush. Drush is essentially a command line shell interface for Drupal. Now I'm just going to give really basic step by step guide of what to do.

The very first step is always to make a backup of your site. Files, database, code, everything needs to be backed up. Remember to always make and test changes on a development version of your site. Never experiment with your live site.

Make sure you have drush on your machine and ready to go. http://drupal.org/project/drush

Second step is creating an alias for your site. Just create a file called "aliases.drushrc.php" in your .drush file located in your shell home directory ( ~ or /home/username ). Then include the following code:

$aliases['d7upgrade'] = array(
  'root' => '/path/to/drupal7',
  'uri' => 'drupal7upgrade.mysite.com',

Now that path is for your new upgraded site. The path should lead to an empty directory right now.

After that you need to go to your current sites directory and then type "drush site-upgrade @d7upgrade".

Then you'll watch as your site is upgraded automatically. Drush will download and initiate all the modules that have available versions in Drupal 7. You'll have to do a couple other steps after this, but its mostly just following prompts. The entire process took maybe 15 minutes verses the ridiculous ammount of time and trouble I was having trying to do all of this manually.

Well I hope you find that information as useful as I did.