How to Enable Automatic Updates for your Drupal Site
- Last updated
- 1 minute read
Goal
This tutorial will show you how to install, enable, and use the Automatic Updates Drupal module.
Prerequisites
- Existing Drupal 9 or 10 Site
- Writable File System
Overview
Automatic Updates makes it much, much easier and better to keep Drupal core up to date. This tutorial will show you everything you need to install, enable, and use the module.
If you're familiar with the Drupal core Update Manager than you already know that Drupal will happily tell you when you have updates that need to be installed. BUT there's a catch: it doesn't actually do anything to help you with the updates (other than link you out to the project page on Drupal.org). There's a new update kid in town though... the Automatic Updates module can be added to your site so that the update reports now not only show you what's out there, but help you get the latest and greatest at the same time.
As with any Drupal module, the first step is to add Automatic Updates to your codebase. This can be done with a quick composer command:
composer require drupal/automatic_updates
Once installed, there should be two new modules on your Extend page. The automatic updates module (which provides updates for Core) and Automatic Updates Extensions module (which provides updates for themes and modules). Let's enable both of these.
At the time of writing, Automatic Updates itself is stable, but the extensions module is in the experimental state and is looking for feedback! So, you'll get an additional warning asking to confirm you're ok with an experimental module. Note too that Package Manager is a required module for Automatic Updates (so it will be installed even if you didn't manually select it).
Once installed, you can visit the Extend page and click on the Updates page (or just go directly to /admin/modules/update). If you have any available Drupal core or contrib updates, they will appear here like:
From here, all you have to do is select the modules you want to update and click to install. Warning: automatic updates requires a writeable file system to download these updates. Many hosting providers (including Acquia) don't have writable file systems in the hosting environment. So, this means you'll need to execute these updates in your local environment / Cloud IDE to test them, and then make changes to composer to push upstream to your hosting environements.
Once the updates have run, you'll see a confirmation similar to:
Finalize the process by running your database updates and you should be good to go!
Remember, the Drupal release cadence is fairly robust. There are two release windows for Drupal core itself every month (one for security, one for bug fixes). There are also regular security and feature updates made to most contributed projects. TLDR if you don't stay on top of your updates and maintenance, it's very easy to fall behind. Automatic Updates can make a big impact on this problem. Download it and give it a test today! We'd love to hear your feedback so we can get it stable in Drupal core in 2023.