logo

Palette - Make it Colorful🎨

Palette - Visual Page Builder, no design degree required.

Live Demo Download Palette

Scroll

1.2.1. Updating Drupal 8 modules and core.

17/04/2025, by Ivan

Drupal core and module updates are released frequently. While not all updates are necessary, security updates are critical and are highlighted in red by Drupal. Your update method depends on how Drupal was installed: via Composer or by downloading from Drupal.org.

Updating Drupal Using Composer

Composer makes it easy to update Drupal core with a single command:

composer update drupal/core --with-dependencies

The --with-dependencies flag ensures that all dependent packages are updated. After updating, run the database update process using one of the following:

  • drush updatedb
  • drupal update:execute
  • /update.php (in a browser)

Manually Updating Drupal Without Composer or Drush

For manual updates, refer to this article:
How to update Drupal 8 manually without Drush and Composer

Official guide:
Drupal.org - Updating Drupal Core

Preparation Steps

  1. Backup your entire site – files and database. Use tools like Adminer or phpMyAdmin for database backups.
  2. Download the latest version of Drupal 8 from drupal.org.
  3. Extract it and compare folders like /vendor for required libraries (e.g., for Drupal Commerce).
  4. Enable maintenance mode:
    /admin/config/development/maintenance

Update Process

  1. Delete all core Drupal files and folders except:
    • /sites – content and config
    • /themes – custom themes
    • /modules – contributed/custom modules

    Don’t forget to preserve your customized .htaccess, robots.txt, settings.php, and composer.json (if used).

  2. Upload the new Drupal files (except the ones above) into your site's root.
  3. If your host supports SSH, it's faster to upload the full archive and extract it via:
    tar -xvzf drupal-x.y.z.tar.gz
    or
    unzip drupal-x.y.z.zip
  4. If using FTP, use FileZilla and increase the number of parallel connections to speed up uploads.
  5. Restore your customizations:
    • settings.php
    • .htaccess
    • robots.txt
    • favicon.ico
  6. Run the update script in your browser:
    /update.php
  7. Log in as admin and go to:
    /admin/reports/status
    to verify the update.
  8. Disable maintenance mode:
    /admin/config/development/maintenance

Pro Tip: Always test the update process locally before applying changes on the production site.

If you face any issues, post your errors or questions in the comments section of the guide — support is often available.