| Drupal

This tutorial will walk you through, step-by-step, how to update your Drupal module to a new version.

Please make sure you have fully backed up your site before proceeding.

Download and Extract the New Module

Go to http://drupal.org/project/modules and download the new version of the module, then extract the module folder. For more detailed instruction on how to download and extract, please visit the first few steps of our How to Install a Drupal Module tutorial.

Start your FTP Client

Enter your FTP credentials and start your FTP client. Having this ready will help minimize site down time.

Set the Site Status to Off-line

tutuploadstutuploadsmedia_1292098869359_b0887da9b5518dd401eaf82438b24598.png

Log into your user #1 Admin account. User #1 is the very first user which you created when first installing Drupal. Then navigate to Administer >> Site configuration >> Site maintenance.

tutuploadstutuploadsmedia_1292099089766_bb5445843495e67372d22d0a1e871a22.png

Set site status to Off-line, then customize your site off-line message letting your users know about the maintenance and expected downtime. Once done, save the configuration.

The reason that we set site status to Off-line is to prevent users from calling any of the module code that would shortly be deleted, and therefore be missing, thus preventing error messages from displaying to the user and at the same time preventing database corruption.

Backup Your Old Module

tutuploadstutuploadsmedia_1292100147301_a8e2424703bd73b94b24f5acbba4ac5e.png

Your old module folder should be in the sites/all/modules directory. Many have their modules in the default /modules folder in the root of the Drupal installation, however, for easily updating your Drupal Core version, it is preferred to place all modules in the sites/all/modules directory.

Wherever your old module folder is, back it up by downloading it your computer to allow us to easily revert back if anything goes wrong.

Once you have downloaded it, rename it and add Backup to the end of the folder name, e.g. aclBackup, to ensure we do not confuse the new folder with the old one.

Delete Your Old Module from the Server

tutuploadstutuploadsmedia_1292100492789_40dc36efb6a2cf040474a348c8ee78e6.png

Delete the old module.

Upload the New Module Folder

tutuploadstutuploadsmedia_1292100999010_a78393551fa010ab132411e33f126e79.png

Next, we need to upload the new module to the same directory the old module was in.

Run update.php

tutuploadstutuploadsmedia_1292101448461.png

Make sure that you are still logged in as the Administrator, then run http://yoursite.com/update.php in your browse by adding /update.php to your Drupal installation's root URL.

This page will give you the directions for the update process (which we have already done). Make sure you read through and have followed the directions carefully. Hit continue when you are ready.

tutuploadstutuploadsmedia_1292101611583.png

Read and follow the directions. Once ready, click Update.

tutuploadstutuploadsmedia_1292101801713.png

Once the update process is completed and no errors are found, your module has been successfully updated.

If errors are found, read through the error log and correct all errors before proceeding. Do not set your site to On-line until all errors are corrected.

Set Site Status to Online

tutuploadstutuploadsmedia_1292102108316.png

Either click on administration pages or main page.

tutuploadstutuploadsmedia_1292102210233.png

At the top, click on "Operating in off-line mode".

tutuploadstutuploadsmedia_1292102243091.png

Set your site status to Online and save the configuration.

You have just finishing updating your module!


About the author

Nick is the Director of Support at OSTraining and you can find him in almost every area of the site, from answering support requests and account questions to creating tutorials and software.