How to Update Drupal Modules
Upgrading modules is a more involved process than installing or removing modules. The steps should be followed closely, as all these steps are necessary to ensure the stability of your website. In this article I would like to tell you about all these steps.
How do you know that you should update modules?
Enter administration area of your site. If there are some critical updates that you haven’t installed yet, you will see the warning message right on the Administer page:
The system doesn’t notify you in such manner about recommended updates. It’s just about critical updates. However you can view all available updates in Administer > Reports > Available updates section:
Database & site backup
Your website’s database contains all of its content, as well as all of its settings and configuration. As such, any operation which modifies it could, although unlikely, be potentially damaging.
Please be sure that you’ve made a backup of your web site and database. It is the highly recommended precautionary measure.
Download Modules Updates
So, let’s start. Navigate to Administer > Reports > Available updates through the left navigation menu and view the available updates for your modules:
Modules marked with green are up-to-date. Yellow marker shows modules that have the available updates. And modules which updates are critical are marked with red.
Download all Recommended updates. Then unpack the modules updates to ..\modules folder in your site’s root. Overwrite file if required.
Run update.php
Update.php is a script that is used to maintain websites after upgrades. A new version of a module may change the structure of the database. This script adjusts the database to fit the updated module. As the database contains all of the content and the settings of your website, this is an essential step to ensure its continued operation.
The update.php script can be called two different ways. You may go to the main administration page and click on the “update.php” link on the front page, or you may go directly to [sitename]/update.php in your browser.
Read over the content of this page. Instructions for a database backup are linked to above, and should be followed as noted here. You will require admin privileges to perform this upgrade. The first account created on your site will have the required privileges.
If you do not have the proper privileges, you will receive this screen. Either log in or follow the instructions on the page to perform the upgrade.
Once you have the proper privileges, you will see this screen. Click on the “Select versions” link to expand the section.
These dropdown boxes contain database updates specified by modules you have installed. If you are not developing your own module or troubleshooting, you should leave them alone and just click the “Update” button. The correct items should already be selected by default — either “No updates available” if there have not been any database changes, or a number, which is simply an ID number of the database upgrade being applied.
This next page may take a small amount of time to load, as the server is modifying your database. This page will display any errors that may have occurred during the process. If none have occurred, your module upgrade is complete!
Run Cron
If Cron system isn’t configured on your server, you should run it manually after updating the modules. Go to Administer > Reports > Status report:
View the list of report statuses and find Cron maintenance tasks there:
Click run cron manually link for the appropriate reports.
Good luck!