Upgrading Drupal

This is a quick guide for upgrading drupal.

Assuming your website is hosted on a shared web hosting account and you can upload files through ftp. If your site is hosted on a dedicated server the steps here may not apply to you.

Backup Drupal

Before attempting an upgrade you need to backup your current drupal installation. At least you need to backup your drupal database and any file you have modified or added like a module, theme, etc.

Some hosts offer the ability to create and download a full backup, using this feature you can download a compressed file with all your files and databases.

If your host doesn't offer this option check in your control panel the option to generate and restore database backups, create and download your drupal database backup. Then using your ftp program download your drupal files to your computer.

Identify if your site can be upgraded

Between Drupal versions some incompatibilities can arise with the previous modules and themes due to API modifications. If your site relies on a module or theme that doesn't work with the new version of Drupal, upgrading to the newer version will broke your site. You have two options, you can wait until the development proccess updates those files or you can modify your site to use another module or theme.

Manual upgrade

Download the latest version of drupal, uncompress the installation files to a folder on your computer. If you have modified any files or added modules or themes to your previous installation, this is a good time to replicate those changes to your new installation, at least you need to modify the configuration file with the values to access your database and your site's base url. In the current version this file is called settings.php and it's on the folder \sites\default.

Connecting to your site via ftp you need to delete your old installation files and folders and upload the new ones. To avoid a long interruption on your site's service, upload the new files and folders into a temporary folder on your server, when you have finished uploading them proceed to delete the previous ones, then move the new ones from your temporary folder to the location of your previous installation. Moving files with your ftp program is faster than waiting for the deletion of your previous files and the upload of the new ones.

Note: The drupal handbook says that you need to overwrite your current files, but I think deleting them is much cleaner.

Sometimes a database upgrade is required to complete the upgrade. To do this login to your site with user1 and point your browser to http://www.example.com/update.php change http://www.example.com/ with the address of your website. Follow the instructions on that page to complete your database upgrade.

Do you need to upgrade your modules?

Check also if you need to follow additional steps to upgrade any contributed modules you are using.

Do you need more information?

You can ask questions on this forum. This site runs drupal and is continually updated.