Update drupal to 6.x
Again a blog post to make sure my mind can remember what needs to be done… in case I want to update a drupal installation. As a source I used the video on http://www.masteringdrupal.com/screencast/upgrading-to-drupal-6. The text below is a summary of that video.
Note: If you want to upgrade from drupal 4.x, then first upgrade to 5.x. Only then start to follow this guide.
Let us start with some well meant advice:
- Do a lot of reading (documentation of the installed modules, drupal update manual, etc.)
- Make backups (drupal folder, database, etc)
1. Backup procedures
Before the actual upgrade we make sure that we can restore the website if the update fails. This we way are sure that we do not loose important information during the update process. Follow these steps carefully and add all steps that you think are missing. Remember; better a backup to many, then a backup to little!
- First we backup all the files of the website. Use your favourite ftp client (or use other means to connect with your server) and download all files in the drupal folder. Store this backup securely!
- Secondly backup the database. Depending on the access you have to the database you can either try to login directly and download a backup, use PHPMyAdmin (http://www.phpmyadmin.net), or use the backup and migrate module (http://drupal.org/project/backup_migrate). Also store this file securely!
Before we start we prepare our installation for the upgrade
- Check the logs for errors. You can find the logs under: ?q=admin/reports/dblog
- Check all your modules Find them under: ?q=admin/build/modules Make sure that you disable and uninstall the Update status module if you have it.
- Upgrade all modules to the lastest versions (5.x versions) To be clear; do not update them to the 6.x version, but only to the 5.x version.
- Disable and remove all modules that you want to stop using. This includes the modules which are not available for drupal 6.x
- Make sure you update all the database tables. Do this by going to: www.yourdomain.com/update.php and follow the steps. Make sure that the shown report does not contain any errors.
- Login as user number one (the user that was the first admin of the system).
- Set the website theme to a standard theme (as we do not know yet if your 5.x theme will work in drupal 6.x)
- Set the website into off-line mode Find it under: ?q=admin/settings/site-maintenance
3. The upgrade
Now it is time to upgrade drupal and your website. Make sure that you have a (tested and working) backup of your website before you continue.
- Remove from the drupal folder all files and folders except the ./sites, the ./files, and the ./.htaccess
- Place the new 6.x files in the drupal folder. This all files are now updated to the new version.
- Remove all old versions of your modules from the ./sites/all/modules folder.
- Place the new (6.x versions of your) modules into the ./sites/all/modules folder.
- Again update all the database tables. Do this by going to: www.yourdomain.com/update.php and follow the steps. Make sure that the shown report does not contain any errors.
4. Basic checks and theming
The drupal and the database are now updated. It is time to check the new website.
- Go to the status-report and check for any notifications
- I do recommend you to enable the Update status module Find them under: ?q=admin/build/modules
- Check if you have the latest versions of the modules, if not return to step 3.4
- Test your theme. If it works, enable it. If not, update it to work with drupal 6.x
- Put your website in on-line mode Find it under: ?q=admin/settings/site-maintenance
- Now click around on your website. Check all settings and make sure everything works. Try also all links and functionality as a user with other permissions.
Be happy with the result and thank the drupal team for their efforts!