The upgrade of Drupal Starter Kits from 1.x to 2.x changes it from a profile to a module. The Drupal Starter Kits 2.x module retains all the required dependencies previously available in the Drupal Starter Kits 1.x profile. When you upgrade to Drupal Starter Kits 2.x, you can use the latest features of the composable architecture.
Prerequisites
Update your PHP version to 8.1 with the following command:
composer config platform.php 8.1
- Take a backup of database and configuration of your site.
- Complete your site setup as mentioned in Studio configuration management strategy.
Upgrade checklist
To upgrade Drupal Starter Kits to 2.x, complete the following tasks:
Upgrading Drupal Starter Kits 1.x from its current version to the latest version
Use the following steps to upgrade Drupal Starter Kits 1.x from its current version to the latest version:
Update Drupal core to the latest version 9.5.11 with the following command:
drupal/core:~9.4.0 acquia/cohesion:~6.9.0 drupal/core-recommended:~9.4.0
Update Drupal Starter Kits to its compatible version 1.5.8 with the following command:
composer update acquia/acquia_cms -W with drupal/acquia_cms_common:~1.9.0
Add Page Manager and Panels modules to the codebase with the following command:
composer require drupal/panels drupal/page_manager
You can remove them from the codebase later, if required. With Drupal core 9.x, the Drupal Starter Kits Common module 1.9.x uses the Moderation Dashboard module 2.x, which removes the Page Manager and Panels modules from the codebase.
Add the Webform module to Composer dependencies with the following command:
composer require 'drupal/webform:~6.0.0'
You can remove it from the codebase later, if required. The latest version of the Drupal Starter Kits Starter module removes the Webform module from Composer dependencies.
Update your database with the following command:
./vendor/bin/drush updb -y
(Optional) On running any Drush command, if you get the
Error: Class "Drupal\Driver\Database\mysql\Connection" not found
error, update database specification by replacing the line'namespace' => 'Drupal\\mysql\\Driver\\Database\\mysql'
in yoursettings.php
file:$databases['default']['default'] = array ( 'database' => 'drupal', 'username' => 'drupal', 'password' => 'drupal', 'namespace' => 'Drupal\\mysql\\Driver\\Database\\mysql', 'driver' => 'mysql', );
(Optional) If you use Facet accordion custom style on the site, update its configuration:
- Edit Facet accordion from:
/admin/cohesion/styles/cohesion_custom_styles
. Update the
.collapsiblock
element to.collapsiblockTitle
:Change anchor to button under the
.collapsiblockTitle (child)
element:Change anchor to button under the
.facet-item (child)
element:Add custom CSS property to button element under the
.collapsiblockTitle (child)
“CSS property: width” & “CSS value: 100%”:- Click Save and Continue to save changes to the component.
- Export your Site Studio configuration to retain the preceding changes in your configurations.
- Edit Facet accordion from:
Uninstall the Acquia Telemetry module as its functionality is available in Acquia Connector from the version 4.0.0-beta4.
./vendor/bin/drush pmu acquia_telemetry ./vendor/bin/drush cex
Commit all changes, deploy them to your development environment, and run the following commands:
./vendor/bin/drush updb -y ./vendor/bin/drush cim -y
Update Drupal core to 9.5.11 along with Drupal Starter Kits and its dependencies:
composer update "drupal/core-*" acquia/acquia_cms -W
- (Optional) If you use Claro as the admin theme:
Install the Site Studio Claro sub-module. The Drupal Starter Kits Site Studio module 1.6.0 uses Acquia Site Studio 7.4.2, which includes the Site Studio Claro sub-module. This sub-module fixes template and style issues for media library in Page Builder. If you do not install this sub-module, you might get the following error while updating your database:
Enable the Acquia Claro module with the following command:
./vendor/bin/drush en sitestudio_claro
Clear cache and run the database update and configuration export commands.
./vendor/bin/drush cr ./vendor/bin/drush updb -y ./vendor/bin/drush cex
Commit all the changes, deploy them to your development environment, and run the following commands:
./vendor/bin/drush updb -y ./vendor/bin/drush cim -y
- Verify that your development site works as expected.
Upgrading Drupal Starter Kits 1.x to 2.x
Use the following steps to upgrade Drupal Starter Kits from 1.x to 2.x by using the profile switch
command. This command also helps you to add the modules that were deleted from the most recent version but are still necessary for Drupal Starter Kits.
If you use BLT, check your install profile with the following commands:
./vendor/bin/drush status --fields=install-profile Install profile : acquia_cms
- Edit
blt/blt.yml
. - Change the profile key to minimal.
- Edit
Run the profile switcher command to switch the profile from
acquia_cms
tominimal
../vendor/bin/drush acms:switch The site's install profile will be switched from acquia_cms to minimal. Do you want to continue? (yes/no) [ yes ]: > yes Profile switched from acquia_cms to minimal.
- Verify the site and ensure that it works as expected.
Export the configurations.
You can observe the changes in the
core.extension
configuration parameter../vendor/bin/drush cex [notice] Differences of the active config to the export directory: +------------+---------------------+-----------+ | Collection | Config | Operation | +------------+---------------------+-----------+ | | core.extension | Update | | | system.theme.global | Update | +------------+---------------------+-----------+ The .yml files in your export directory (../config/default) will be deleted and replaced with the active config. (yes/no) [yes]: > [success] Configuration successfully exported to ../config/default.
Commit all the changes, deploy them to your development environment, and run the following commands:
./vendor/bin/drush cr ./vendor/bin/drush cim --yes ./vendor/bin/drush updb --yes
- Verify that your development site works as expected.
Upgrade Drupal Starter Kits to 2.x with the following command:
composer require -W acquia/acquia_cms:^2.0
(Optional) Add the Google Analytics module to your project, if required.
composer require -W drupal/google_analytics:^2.0
Update your database.
./vendor/bin/drush updb -y
Commit all changes, deploy them to your development environment, and run the following commands:
./vendor/bin/drush cr ./vendor/bin/drush cim --yes ./vendor/bin/drush updb --yes
Verify that your development site works as expected.
The Drupal Starter Kits 2.x module keeps all the required dependencies previously available in the profile. The
acquia_cms
profile codebase does not exist in thedocoot/profiles/contrib
directory.
Upgrading Drupal core to the latest version of 10.x
Use the following steps to update the text format to use CKEditor 5, remove the old CKEditor, and upgrade your Drupal core version to the latest version.
- Switch from CKEditor 4 to CKEditor 5.
Install the CKEditor 5 module with the following command:
./vendor/bin/drush en ckeditor5
Click Configuration > Content authoring > Text formats and editors.
Alternatively, append
/admin/config/content/formats
to your application name.Update each text format, such as Filtered HTML and Full HTML, to use CKEditor 5.
For more information, see Using the CKEditor5 text editor for the “Site Studio” text format.
Uninstall any previous version of the CKEditor module.
./vendor/bin/drush pmu ckeditor ./vendor/bin/drush cex
Commit all changes, deploy them to your development environment, and run the following commands:
./vendor/bin/drush cr ./vendor/bin/drush cim --yes ./vendor/bin/drush updb --yes
- Verify that the site in your development environment works as expected.
- Upgrade your Drupal core version.
Remove incompatible and insignificant modules.
composer remove drupal/upgrade_status Composer remove acquia/http-hmac-php
Add the HAL module to the codebase because it is removed from core 10.
composer require 'drupal/hal:^2.0' --no-update --no-install
Add the latest version of core and contrib module.
You can remove modules that are not used in the project. For example, Webform and Google Analytics.
composer require "drupal/core-composer-scaffold:^10" "drupal/core-recommended:^10" drupal/webform:^6 drupal/google_analytics:^4 drush/drush:^12 --no-update --no-install
Install the latest Drupal core and its required dependencies with the following command:
composer update -W
Perform post upgrade activities.
./vendor/bin/drush cr ./vendor/bin/drush updb -y ./vendor/bin/drush cex ./vendor/bin/drush coh:import ./vendor/bin/drush coh:rebuild
Commit all the changes, deploy them to your development environment, and run the following commands:
./vendor/bin/drush cr ./vendor/bin/drush cim --yes ./vendor/bin/drush updb --yes
- Verify that the site in your development environment works as expected.