During the last month I set up my first Drupal site using Drupal 6.1, and I was so impressed with how easy it was I then converted another couple of my sites to Drupal. I used Fantastico (yes. I know) but everything was fine. I'd just finished when along came Drupal 6.2!

Fantastico was still showing 6.1.

I'd read all the stuff I could find about upgrading, including upgrade.txt, drupal.org/upgrade, and various forum posts. Whilst I was worried about security issues, I was also worried about not upgrading properly and losing my sites!

Most of the advice about upgrading assumes that you’ve not installed via Fantastico, so I thought I’d explain exactly how I upgraded my site.

Because my site was so new, I was only using standard modules and themes.

1. Set my site to offline mode: (Administer > Site configuration > Site maintenance, set to Off-line and save configuration)

2. Backup my MySQL Database to my desktop (using cPanel, by clicking on ‘phpMyAdmin’, then ‘export’)

3. Backup my whole website to my desktop (using cPanel,by clicking on ‘Backup Wizard’, then ‘Home Directory’)

4. From the Drupal site (not via Fantastico) download Drupal 6.2 to my desktop.

5. Find the ‘sites’ folder on my desktop that had previously been saved from Drupal 6.1, and copy it to the Drupal 6.2 site, replacing the new ‘sites’ folder and files with my original ones.

6. Because my site was new I hadn’t uploaded any files so had no ‘files’ folder. If I had, I’d have also swapped the ‘files’ folder in the same way that I swapped the above ‘sites’ folder.

7. Check the old and new .htaccess and robots.txt files (They were identical. If they hadn’t been I’d have changed them)

8. FTP all the 6.2 files to replace the existing 6.1 files on my server. (I had a problem here. Whilst the 'sites' folder had a permission of 0755, some of the files inside the 'sites' folder had permissions of 0644, 0444, 0644, 0544 etc. I had to change the permissions of the server files to 0755 to allow the ‘sites’ files to ftp. After the ftp I had to change the permissions back to what they had previously been.).

9. Run update.php (www.example.com/update.php)

10. Return site to online mode (Administer > Site configuration > Site maintenance, set to On-line and save configuration)

Comments

strellman’s picture

Using the cpanel file manager has saved hours on uploading lots of files with ftp. For upgrading modules I just upload the tarbal for a module into the /sites/all/modules folder, then extract it there. Fast!

For your steps 5 and onward I would recommend leaving sites folder alone, uploading your Drupal-6.6.tar.gz or whatever into your root directory, then extracting it. It will become a new folder called drupal-6.6. Go into this and "move" every folder but sites, overwriting your existing drupal folders. This way you have a record of what didn't get updated from drupal-6.6, just in case. Sites is messy to copy because of all the permissions, and if you put your files there (which I don't recommend) it can be huge.

http://2tell.org

jamescarvin’s picture

the 6.14 version that came with Fantastico had only 74 lines with the identifier:

# $Id: .htaccess,v 1.90.2.3 2008/12/10 20:04:08 goba Exp $

the 6.15 version that comes with the drupal download has 116 lines and ends with the identifier:

# $Id: .htaccess,v 1.90.2.4 2009/12/07 12:00:40 goba Exp $

In as much as this was a security related upgrade it would concern me to "make sure they are identical." Do I change the 6.14 to what came with 6.15? Or do I change it the other way? And if I do, aren't I messing with the security issue that was fixed? Seems I should go with the 6.15. Worth a try.