How to update Drupal? How to update a Drupal module?
Drupal is a constantly evolving system, with frequent updates being released. This does not mean that Drupal is poorly made and requires fixes. On the contrary, most updates include changes to API functions that enhance Drupal's capabilities, and security updates are relatively rare. It is important to always keep your modules and the Drupal core up to date. In this article, we will look at how to update both modules and Drupal itself.
Go to the list of modules. If there are modules that require updates, a message like this will appear:
Click "Available updates" to go to the list of modules, including those that need to be updated. Modules with the current version will be shown in green; outdated modules will appear in yellow or red:
Before updating, be sure to create a backup of your site! You can read about creating a backup in this article.
You can also click on the "Note" link to see what changes have been made to the module:
Before downloading and installing the module, follow these steps.
The module update process is as follows:
1. Put the site into maintenance mode. Go to "Site configuration - Site maintenance" in the admin panel. Enable maintenance mode.
Now only the site administrator can access the site. Others will see a message like this:
To log in, add /user to the site URL.
2. Clear the site cache. This step is optional but recommended.
3. While the site is in maintenance mode, download the latest version of the module by clicking "Download" or by downloading it from Drupal.org.
4. Delete the old module folder from sites/all/modules.
5. Copy the new version of the module into the same folder.
6. Run the update.php script by adding /update.php to the URL.
Click Continue, then Update.
Everything should update successfully. If there are any database changes, you will see a message about them.
7. After updating, disable maintenance mode to bring the site back online.
Updating Drupal
Now that we’ve covered module updates, let’s update the core.
The update process is the same, with one IMPORTANT exception!
The sites folder contains your files, configurations, and modules – these should not be updated. Also, if you’ve modified the .htaccess file, do not overwrite it either.
Download the new version of Drupal and replace all files except the sites folder and the .htaccess file.
After replacing the files, run update.php.
Then disable maintenance mode and return the site to normal operation.