Install newer core files via the command line
Introduction
This tutorial assumes you are familiar with the command line, whether you're using a Mac or Linux. It utilizes wget, a package that comes standard on all *nix machines, but must be manually installed on any recent Mac. If you're using a 10.3 or 10.4 Mac, please download a copy of wget.zip, uncompress it, then to install it, type sudo cp -R pathToDecompressedWgetDirectory /usr/local/bin. You should now have a working copy of wget on all OS 10.3 and OS 10.4.x Tiger systems. To test the install, type wget --help
Replacing your Drupal files
Archive the old files
You'll want to move all the old core files into an archived folder for safekeeping using sudo mv /path/to/old/drupal/site/ /path/to/newly/desired/archive/ where path/to/old/drupal/site/ is your root drupal installation and path/to/newly/desired/archive/ is your desired archived folder location. Most people use ~/Sites/archivedDrupal/ for this, but you may use whatever you desire, as long as you can remember where you created the archive, because you'll need it later.
Wget the new files
Download and decompress the new core files into your base website directory using these three commands (where "drupal-5.5.tar.gz" is replaced with tarball name for the latest version of Drupal):
cd path/to/old/drupal-site/
wget http://ftp.drupal.org/files/projects/drupal-5.5.tar.gz
tar -xzvpf drupal-5.5.tar.gzRestore necessary files from the archived directory
Copy the following files from the backup directory into your Drupal site directory:
- .htaccess
- sites/default/settings.php (but see section on older sites below)
- the 'files' directory
- any other files you need from the 'backup' directory, such as your cron scripts in scripts/ or subdomain folders
Older sites
If you are upgrading from a version of Drupal that is older than Drupal 4.5 , then you will have to look in your archived directory for a file called: includes/conf.php and use a text editor to copy the following three lines as they appear in your conf.php file:
$db_url = mysql://user:pass@localhost/drupal_db';
$base_url = 'http://www.example.com';
$db_prefix = '';And paste them over the lines in your new Drupal file located at sites/default/settings.php
It's simply a matter of overwriting the above three lines in settings.php with the lines in conf.php.
These settings are responsible for connecting your Drupal to the database and to the files it needs. The file name and location was changed from Drupal 4.5 to 4.6, hence the need to move these lines to the new file.

Tar command
On my system that
tarcommand unpacks everything into./drupal-5.5, not the.directory. I had tocp -R * .htaccess path/to/old/drupal-site/to install the folders correctly.Seamless upgrade
Been working on a way to make a seamless upgrade (e.g. high traffic site - upgrade with few/no 404's).
The key is to make sure that the maintenance page does not break during the process.
The new themed maintenance pages in d6 makes things great. Here are my preliminary steps. If you have anything else to add, please do so.
1) Backup everything (Cardinal rule).
--- For copying the file structure, I recommend:
cp -Rpv /current/location/of/drupal/.htaccess /current/location/of/drupal/* /tmp/drupalbackup2) Follow the standard upgrade preparation procedures (i.e. Login as user 1, set offline, disable contrib modules, etc.).
3) Extract the new tarball (e.g. /tmp/newdrupal/) -- ENSURE timestamps are maintained.
4)
rm -f /tmp/newdrupal/sites/default/settings.php--- Unless something major has changed with settings.php - I highly doubt it. if so, you will have to hand modify.
5)
\cp -Rvupf /tmp/newdrupal/* /current/location/of/drupal/--- this will upgrade only the newer files (n.b. Yes, that's a "\" backslash at the beginning. That's to override any aliases.)
--- if there are any major changes to .htaccess/robots.txt, you will have to hand modify that file.
6) Follow the remaining steps of the standard upgrade procedures, starting at update.php
7) Don't forget about upgrading your contributed modules as well.
Here you will see that you don't need to delete/move any files, and hence, the server should be able to return some sort of formatted response, themed along with your site - i.e. few/no 404's.