If you have terminal access to your Drupal website many administration tasks become much easier with a little familiarity with the command line. Here are two commands that I use to easily update the Drupal core files on a site.
First, we want to delete all files except the "sites" directory and the ".htaccess" file. This command takes care of that (note, the .htaccess file is hidden so it isn't returned by the ls command).
rm -R `ls --hide=sites`
Then we will extract the files from the Drupal core tarball.
tar --strip 1 -xzf path/to/drupal-6.xx.tar.gz
You will still need to run the update.php by browsing to example.com/update.php, or if you have drush installed, from the terminal execute
drush update
Note:
- Obviously, make sure you have a backup before applying any updates
- These commands were used on Linux. They will probably work on any Unix variation. On Windows, you will need to install Cygwin or GnuWin32.
- The .htaccess file is intentionally not deleted to prevent access to the sites directory during the process. Although the .htaccess file will be replaced by the tar command. If you have some custom contents in the .htaccess file, you will need to restore it after the tar command.
- At the time of this writing drush added support for upgrades to Drupal core yesterday. I haven't tried it yet, but I will certainly try it soon.
Please post a comment if you have a better method of applying Drupal core updates or if you see a problem with the method I explained above.