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
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.gz
Restore necessary files from the archived directory
Copy the following files from the backup directory into your Drupal site directory:
- 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
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
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.