Updating Drupal

Updating Drupal root
Drupal Version

Updates patch Drupal to add new features and protect against discovered vulnerabilities, keeping your sites working optimally. Always test new updates on a development site before applying them to your live, production site.

Drupal 9 has a different method of doing updates.  Please see the soon-to-be-added pages for Drupal 9 update instructions.


Drupal Updates Sub-Topics

Configuring the Drupal Update Manager

Configuring the Drupal Update Manager esembrat3
Drupal Version

The Update Manager, if used properly, can provide you an easily-accessible location to view what modules and themes need updating.

The settings for the Update Manager ( admin/reports/updates/settings ) provide a few key settings:

  • E-mail addresses to notify when updates are available - A list of emails to be notified when Drupal finds a new release of a module.
  • Check for updates of disabled modules and themes - To ensure all modules are kept up to date, this should be checked (on multi-sites, you only need to check disabled modules and themes for ONE of the multisites).

Updating Drupal 7 Core Via Installatron

Updating Drupal 7 Core Via Installatron root
Drupal Version

Before You Begin

  • To be able to use this method of upgrading, your Drupal site must have been created via Installatron or imported into Installatron.
  • Please note that if you installed the Drupal application via Installatron with the update automatically setting, you will not need to go through these steps, as Installat ron will update the site as soon as the new release is posted.
  • Important!!! Installatron will overwrite your .htaccess and robots.txt files.  If you have made any changes to them, be sure to back the m up before upgrading so that you can restore your custom changes after the upgrade is done.
  • Be sure that your Drupal website is configured in Installatron.

Upgrade Process

  1. Open a web browser and navigate to OIT Web Hosting [https://hosting.gatech.edu/]
  2. Log in using your GT Account Username and password, and then select the appropriate site from the list.
  3. From the left-hand menu, select Installatron Applications Installer.
  4. An entry describing your Drupal site should appear.  Select the Upgrade button.
  5. Installatron will guide you through the upgrade process of the site.
  6. Follow the directions on the page and select Upgrade to complete the process.

Drupal 7 Installatron Updating Tips

Drupal 7 Installatron Updating Tips esembrat3
Drupal Version

Running updates on OIT Web Hosting is essential to ensuring that your site remains safe and responsive to every user. The preferred method of running updates is through Installatron, a server application which manages installed web applications on a hosting account.

Update Check

By default, Installatron will check for core updates in one of two ways:

  • For new Installatron Drupal websites, Installatron checks every 6 hours for Drupal security updates. 
  • For imported Installatron Drupal websites, Installatron does not check for Drupal core updates.

Installatron keeps track of each site's app separately, so there is not a way to determine exactly when an update is going to apply for a site. The documentation for Installation say that a site's web app will update between 12am and 6am server time.

Similarly, when Installatron checks for web app updates from the mothership, it's independent (e.g., the updates do not happen at 12 pm, 6 pm, 12 am, 6 am). This makes sense since the increased load of websites all applying updates concurrently would heavily degrade the hosting service.

Configuring Installatron Updates

To configure your Drupal site on Installatron to automatically update, follow the directions below:

  1. Log in to your website from OIT Web Hosting.
  2. Select Installatron Applications Installer.
  3. For the Drupal site in question, select the wrench to view/edit details.
  4. Under Automatic Update, select "Create a backup and update to new minor versions and security releases. (Recommended)".
  5. Select Save All.

Updating from Installatron

Please see Updating Drupal Core (Installatron).

False Flag on Latest Version

As Doug Curtis from OIT Web Hosting notes, there is a current bug in detecting the latest release of Drupal from within Installatron.

  • There is an open issue where Installatron shows a green check mark indicating it has the latest version but if you check the version number next to the check mark, it is not [current]. I have a ticket open with the vendor about this. This is a good reminder that you should always manually check your versions and not rely 100% on automatic systems.

Backup Directory

The default backup directory for Installatron is:

  • /application-backups

You can set custom backup locations through Installatron by editing your Drupal installation via the Applications Installer, and looking under "Default Backup Location".

Updating Drupal 7 Core Manually

Updating Drupal 7 Core Manually root
Drupal Version

Before You Begin

  • The instructions below are for moving between different releases of the same major version of Drupal (e.g. 7.x, 8.x. etc.)  Please see our Site Migrations section for more details on moving to the next major version of Drupal, which is a much more involved process.

  • If you are managing a Drupal 8 or later site via Composer, you do not want to use the following instructions, as all updates will be handled through composer.

  • The instructions below assume your site is on a UNIX style web server and regularly reference the OIT Web Hosting environment.  If your site is hosted on a different kind of web server, then these instructions may have to be modified to work correctly for you.

  • Additional information can be found on the Drupal.org page about minor version updates.

Drupal Core Upgrade Process

  1. Open up a web browser and navigate to your Drupal site.
  2. Log into the site as an Administrator.
  3. Navigate to the Maintenance subsection of the Development section of your site's Configuration administration area (Configuration -> Development -> Maintenance) and enable the "Put site into maintenance mode" checkbox.  (Don't forget to save your change!)
  4. Either via SSH/SFTP or (for sites on OIT Web Hosting) the Plesk Control Panel, make a backup of your site's filesystem.
    • If you are using SSH, you can navigate to your site's base directory and issue the following command:
      • tar czf ~/drupalbackup.tgz *
    • If you are on OIT Web Hosting, you should store your backup in the "private" folder like so:
      • tar czf ~/private/drupalbackup.tgz *
  5. Backup your MySQL database.  On OIT Web Hosting, the easiest way to do this is to log into the Plesk Control Panel for you site and access phpMyAdmin via the Webadmin link in the Databases management section.  On the other hand, if you are on a stand-alone web server where you have direct access to mySQL commands, you can run a command like the following (be sure to insert the correct username, password, and database name for your particular website):
    • mysqldump -u USERNAME -p DATABASENAME > ~/backups/database-backup.sql
  6. Rename the directory containing your Drupal installation or move the contents of the directory to another location.  With many shared hosting services, you won't be able to rename this directory, so your only choice will be to move its contents.  When moving the contents, be sure to get the .htaccess file from this directory so that you'll have it for reference later on.
  7. If you were able to rename the directory containing your Drupal installation, then from that same parent directory, download and unpack the latest version of Drupal core (be sure to replace 'x' and 'y' with the right major and minor version numbers) and rename the new drupal-x.y directory to match the orignal name of your Drupal installation directory.
    • wget https://drupal.org/files/projects/drupal-x.y.tar.gz
    • tar -xzvf drupal-x.y.tar.gz
    • mv drupal-x.y orignalDirectoryName
  8. If you had to move the contents of your Drupal directory somewhere else, then make sure you are in that now empty directory and do the following:
    • wget https://drupal.org/files/projects/drupal-x.y.tar.gz
    • tar -xzvf drupal-x.y.tar.gz
    • mv drupal-x.y/* drupal-x.y/.???* .
    • rmdir drupal-x.y
  9. Move the following folders to your old Drupal directory to your new Drupal directory:
    • sites/
  10. Return to your web browser and navigate to  https://yourSiteHostName/update.php.  Follow the prompts to apply any database table updates that are needed.
  11. Check the administrative Status report to verify that everything is working as expected.
  12. Navigate to the Maintenance subsection of the Development section of your site's Configuration administration area (Configuration -> Development -> Maintenance) and disable the "Put site into maintenance mode" checkbox.  (Don't forget to save your change!)

Updating Drupal 7 Modules

Updating Drupal 7 Modules root
Drupal Version

Before You Begin

  • Installatron does not upgrade modules, so even if you use Installatron to manage your Drupal core upgrades, module updates must still be done manually.

  • If you are managing a Drupal 8 or later site via Composer, you do not want to use the following instructions, as all updates will be handled through composer.

  • The instructions below assume your site is on a UNIX style web server and regularly reference the OIT Web Hosting environment.  If your site is hosted on a different kind of web server, then these instructions may have to be modified to work correctly for you.

  • Additional information can be found on the Drupal.org page about module updates.

Drupal Module Update Process

  1. Open up a web browser and navigate to your Drupal site.
  2. Login to the site as an Administrator.
  3. Put the site into maintenance mode (Configuration -> Development -> Maintenance) by enabling the "Put site into maintenance mode" checkbox and saving the configuration.
  4. Either via SSH/SFTP or (for sites on OIT Web Hosting) the Plesk Control Panel, make a backup of your site's filesystem.
    • If you are using SSH, you can navigate to your site's base directory and issue the following command:
      • tar czf ~/drupalbackup.tgz *
    • If you are on OIT Web Hosting, you should store your backup in the "private" folder like so:
      • tar czf ~/private/drupalbackup.tgz *
  5. Backup your MySQL database.  On OIT Web Hosting, the easiest way to do this is to log into the Plesk Control Panel for you site and access phpMyAdmin via the Webadmin link in the Databases management section.  On the other hand, if you are on a stand-alone web server where you have direct access to mySQL commands, you can run a command like the following (be sure to insert the correct username, password, and database name for your particular website):
    • mysqldump -u USERNAME -p DATABASENAME > ~/backups/database-backup.sql
  6. Either via SSH/SFTP or (for sites on OIT Web Hosting) the Plesk Control Panel File Manager, locate the existing installation of the module and either delete it or move it somewhere outside your Drupal installation's base directory.
  7. Download the archive file for the new version of the module and unpack it into the same location where the module had previously been installed
  8. Via SSH, a typical set of commands for steps #6 and #7 might look like this:
    • cd /path-to-your-drupal-site/sites/all/modules
    • rm -r modulename
    • wget https://drupal.org/files/projects/module-x.y.tar.gz
    • tar -xzvf module-x.y.tar.gz
  9. Return to your web browser and navigate to  https://yourSiteHostName/update.php.  Follow the prompts to apply any database table updates that are needed.
  10. Check the administrative Status report to verify that everything is working as expected.
  11. Navigate to the Maintenance subsection of the Development section of your site's Configuration administration area (Configuration -> Development -> Maintenance) and disable the "Put site into maintenance mode" checkbox.  (Don't forget to save your change!)