This article covers two methods for updating Drupal: the Composer-based method (recommended for Drupal 9, 10, and 11) via SSH, and the admin UI update path available in older setups. Both methods finish with running database updates via Drush and clearing cache to ensure everything is working correctly.

Before you update

Always create a full backup before updating Drupal core or any module. This gives you a restore point if something goes wrong. See how to create and restore Drupal backups.

  • A full site backup (database + files) created and verified
  • SSH access to your hosting (for Composer-based updates)
  • Composer 2 available on your server — HOSTDOG provides Composer 2 on all plans
Warning: Never update Drupal on a live production site without testing on a staging environment first, especially for major version upgrades (e.g., Drupal 9 → 10).

Method 1: Composer-based update (recommended)

Drupal 9, 10, and 11 are managed with Composer. All core and module updates should be performed through Composer to maintain proper dependency resolution. This method requires SSH access.

Step 1:
Connect via SSH

Connect to your HOSTDOG hosting account via SSH. See how to connect via SSH if you need help. Once connected, navigate to your Drupal root directory (the directory containing composer.json):

cd ~/public_html
Step 2:
Check available updates

Run the following command to see what updates are available without applying them:

composer outdated --direct

You can also check via Drush:

drush pm:list --status=enabled --fields=name,version
Step 3:
Update Drupal core

To update Drupal core to the latest patch or minor version within your current major version:

composer update drupal/core-recommended drupal/core-composer-scaffold --with-all-dependencies

If your project uses drupal/core directly (older setup):

composer update drupal/core --with-all-dependencies
Tip: For a major version upgrade (e.g., Drupal 9 → 10), you need to change the version constraint in composer.json first. This is a more involved process — HOSTDOG's support team can assist via ticket.
Step 4:
Update contributed modules

To update all contributed modules at once:

composer update drupal/* --with-all-dependencies

To update a specific module only:

composer update drupal/module_name --with-all-dependencies
Step 5:
Run database updates

After updating Drupal core or modules, always run the database update script to apply any schema changes:

drush updb -y

This is equivalent to visiting yourdomain.com/update.php in your browser, but faster and scriptable.

Step 6:
Clear the cache

Clear all Drupal caches after running updates:

drush cr

Then visit your site to confirm everything is working correctly.

Method 2: Admin UI update path

For Drupal installations not managed by Composer (typically older Drupal 7 or 8 setups), you can use the admin interface to update contributed modules. Note that this method does not update Drupal core — core updates on non-Composer setups require manual file replacement.

Step 1:
Check for available updates

In your Drupal admin, go to Reports → Available updates. Drupal will check drupal.org for newer versions of your installed modules and core. Any available updates are listed with their security status.

Step 2:
Download and apply module updates

In the Available updates report, select the modules you want to update and click Download these updates. Drupal will download the new versions and ask you to run the update script. Follow the on-screen prompts to complete the update process.

Step 3:
Run update.php

After the files are updated, visit yourdomain.com/update.php in your browser (or run drush updb -y via SSH). This applies any database schema changes included in the updated modules. After this completes, clear the cache at Administration → Performance → Clear all caches.

Troubleshooting

Composer update fails with a dependency conflict

A dependency conflict means one of your modules or their dependencies requires a version incompatible with the target Drupal version. Check the error output for the conflicting package. You may need to update or remove the conflicting module first, or check the module's issue queue on drupal.org for a compatible release.

This usually means database updates were not run, or a module is incompatible with the new Drupal version. Connect via SSH and run drush updb -y followed by drush cr. If the issue persists, check Drupal's recent log messages via drush watchdog:show for the specific error.

Restore the backup you created before the update. See how to restore a Drupal backup. This is why backing up before any update is essential — it is your safety net.

Need Help? If an update causes an issue on your Drupal site, our team is here 24/7. Navigate to the HOSTDOG homepage and click the Log in button to open a support ticket and we'll assist you promptly.