# Updating a Theme

## Goal

Update a contributed theme on your site and run the _Database Updates_ script.
## Prerequisite knowledge

* [Concept: Security and Regular Updates](/link/780)
* [Concept: Cron](/link/778)
## Site prerequisites

* A contributed theme has been installed and there is an update available for
it. See [Downloading and Installing a Theme from _Drupal.org_](/link/764) and [Keeping Track of Updates](/link/781).
* If your site is live, you should test this process in a development
environment before running it on your production site. See
[Making a Development Site](/link/767).
* You have created a full site backup. See [Concept: Data Backups](/link/774).
* If you want to use the user interface to check for updates, the core Update
Manager module must be installed. See [Installing a Module](/link/707) for instructions on
installing core modules.
## Steps

Updating a contributed theme requires first putting your site into maintenance
mode, then obtaining the new code files and applying any required database
updates, then finally taking the site out of maintenance mode.

You can update the code for a contributed theme using Composer. If you are
updating a custom theme rather than a contributed theme, obtain the new theme
files, then continue with instructions for running the database updates via the
administrative interface below.

This assumes that you are using Composer to manage the files in your site; see
[Using Composer to Download and Update Files](/link/702).
### Update a contributed theme with Composer

1. Put your site in maintenance mode. See [Enabling and Disabling Maintenance Mode](/link/761).
1. In the _Manage_ administrative menu, navigate to _Reports_ >
    _Available updates_ > _Update_ (_admin/reports/updates_).
1. Find any themes in the list that need updating.
    <img src="https://docs.cocobook.com/uploads/images/gallery/2026-10/security-update-theme-updates.png" alt="Available updates" width="100%" />
1. Determine the short name of the project you want to update. For contributed
    modules and themes, it is the last part of the URL of the project page; for
    example, the Honey theme, at https://www.drupal.org/project/honey, has
    short name `honey`.
1. If you want to update to the latest stable release, use the following
    command, substituting the short name of the project to be updated for
    `honey`:
    ```text
    composer update drupal/honey --with-dependencies
    ```

    To learn how to download specific versions see [Using Composer to Download and Update Files](/link/702).

1. After obtaining the new theme files run any database updates page by typing
    the URL _example.com/update.php_ in your browser.
1. Click _Continue_ to run the updates. The database update scripts will be
    executed.
1. Click _Administration pages_ to return to the administration section of your
    site.
1. Take your site out of maintenance mode. See [Enabling and Disabling Maintenance Mode](/link/761).
1. Clear the Drupal cache (refer to [Clearing the Cache](/link/773)).

## Expand your understanding

* Review the site log, see [Concept: Log](/link/775), once the updates are complete to
check for errors.
* [Updating a Module](/link/783)
## Videos

[Updating a Theme](https://www.youtube.com/watch?v=elVnWoaQMkk)
