title | tags | |||||
---|---|---|---|---|---|---|
Updating Drupal Core in Archipelago |
|
Drupal, the project, puts out new core releases on a regular schedule. Your Archipelago site needs to apply the security updates and possibly minor releases between major core updates. Major core updates will typically coincide with an updated Archipelago stable release.
Updating core is done via Composer:
- First you will want to verify Drupal Core will update itself and the dependencies. To do so, you run the following command:
The
docker exec -ti esmero-php bash -c "composer update "drupal/core-*:^9" --with-all-dependencies --dry-run
--dry-run
flag will allow you to see what will be updated. Once you review the updates and are ready to go with the full update, you will run the same command without thedry-run
flag. - Update Core and the dependencies:
docker exec -ti esmero-php bash -c "composer update "drupal/core-*:^9" --with-all-dependencies"
- Sometimes the database needs to be updated after the update of the files. The following command will prompt you to type yes if there are updates to be done, or it will not return anything if no updates are needed:
docker exec -ti esmero-php bash -c "drush updatedb"
- Clear the Drupal cache:
docker exec -ti esmero-php bash -c "drush cache:rebuild"
Occasionally there will be other Drupal modules that Archipelago uses, and they need to be updated at the same time you run a Core update. This is an example of updating Drupal Webform, which was required for moving to Drupal 9.5.x:
!!! example "Updating a Drupal module"
1. Use Composer to update a module to a specific release:
docker docker exec -ti esmero-php bash -c "composer update "drupal/webform:6.1.4
3. Check for database updates and apply them if necessary:
docker docker exec -ti esmero-php bash -c "drush updatedb"
or
docker docker exec -ti esmero-php bash -c "drush updb"
4. Clear the cache again:
docker docker exec -ti esmero-php bash -c "drush cache:rebuild"
or
docker docker exec -ti esmero-php bash -c "drush cr"