The recommended way to install and update a Drupal 10 site is using Composer.

  1. To update core, all outdated modules and theme, update the db, and clear the cache:

    composer update "drupal/" --with-all-dependencies
    drush updatedb
    drush cache:rebuild
  2. To list updates, use Composer's built-in command:

    composer outdated "drupal/*"
  3. To list security updates, use Drush:

    drush pm:security
  4. To update a specific module or theme, use the following Composer command:

    composer update drupal/modulename --with-all-dependencies
  5. For a major-version upgrade (such as 1.x to 2.x), use the following Composer command, substituting the new major version number as needed:

    composer require drupal/modulename:^2.0
  6. After updating, run any database updates, rebuild the cache, and export the potentially changed configurations, reviewing the changes via --diff:

    drush updatedb
    drush cache:rebuild
    drush config:export --diff