Learn key Drupal concepts prior to upgrading

Last updated on
23 September 2022

Note: the topics described on this page are not related to the actual migration of configuration or content to Drupal 9 (or later). The topics are described here so that site builders preparing an upgrade from Drupal 6 or Drupal 7 to Drupal 9 (or later) can familiarize themselves with these topics and choose the most suitable approach.

Drupal configuration management system

One of the most powerful new Drupal concepts is an advanced configuration management system that can be used to deploy the whole Drupal configuration from one environment to another, for example DEV - STAGING - PROD. 

In Drupal, every configuration change you make on the various configuration forms can be exported to a yaml text file and imported to another environment. You can define the 'sync directory' where the whole site configuration is exported and where it is imported from. Best practice is to have this directory under version control system such as Git so that you can manage the configuration changes in a controlled way. 

This means that one possible upgrade strategy is to migrate configurations such as content types, fields etc. to a DEV environment and finalize the site configuration manually. The complete site configuration can then be easily deployed to STAGING and PROD. The  actual site content would then be migrated to STAGING and PROD after the complete site configuration has been deployed.

Read more about choosing the upgrade approach.
Read more about the Drupal 8 (or later) configuration management

Composer can be used to install Drupal core, modules and themes

Traditional way to manage Drupal, modules and themes

The traditional way of managing a Drupal site was to download a tarball or zip of Drupal core, extract it and then do the same thing for contributed modules and themes. Some modules have required third party libraries to be manually downloaded to a certain directory, typically under sites/all/libraries. Drupal 8 (or later) core and most of the modules can still be installed and updated with this traditional approach, but there's an increasing number of contributed modules which require installation with Composer.

Drupal 8 (or later) can be installed and updated using Composer

Modern PHP applications are typically built using reusable libraries or components. This applies also to Drupal 8 (or later) which uses components of the Symfony framework and many other third parties. It is also increasingly common that contributed Drupal modules have dependencies to third party libraries. Composer is a dependency manager for PHP that resolves the component dependencies and downloads the required versions for you.

Managing and updating your Drupal 8 (or later) site can become challenging if you originally installed Drupal 8 (or later) core with the traditional tarball / zip approach and then need modules that can only be installed using Composer. A couple of examples of modules with third party dependencies:

If you know that you will need a contributed module which must be installed with Composer, it is highly recommended to also install Drupal 8 (or later) core with Composer. Switching to Composer managed approach when the site was originally installed with the traditional approach can be quite challenging. This hassle can be avoided by using Composer to build the whole site from the beginning. In practice this means that you will NOT download and extract any tarballs / zip files manually but you use Composer to install Drupal 8 (or later) core, all contributed modules and themes.

Read more about managing Drupal 8 (or later) and contributed modules using Composer
 

Help improve this page

Page status: No known problems

You can: