Drupal 9 to 10 Migration: A Step-by-Step Guide for Smooth Transition

Drupal

Date

2024-12-15

One of the most popular open-source content management systems (CMS), Drupal is an astonishingly flexible and robust framework. After the launch of Drupal 10, many site owners are thinking of migrating from Drupal 9. The transition process may appear to be complicated it is necessary to ensure that it’s well planned and executed in order to avoid dramatics. This guide outlines step wise process with procedure to enable you seamlessly migrate from Drupal 9 to Drupal 10.

Why Upgrade to Drupal 10?

Before jumping off to the migration process, there is a question that comes first, which is why one should do an upgrade to Drupal 10 in the first place. It is important to keep these advantages in mind as well:

Improved Features: Improved tools such as CKEditor 5 greatly improve content editing and overall performance. All tools have greatly improved.

Support for many years Down the Road: Drupal 9 will some day be unsupported and will come to an end, so it is preferable to upgrade in this case, so that you can be provided with continues security updates and help from the community.

Better User Interface: New front-end themes like Claro and Olivero help to improve the UI for both the administrators and the end users alike.

Progressive Our Technology Stack: The combination of Symfony 6, PHP 8.1 and Twig 3 come together into making Drupal 10 to be better on the performance side and much more compatible.

Moving forward with the upgrade will ensure that your website is well protected for the foreseeable future and you also make use of the best in web development.

Pre-Migration Checklist

Tempering your expectations is in order - you have a few hurdles to overcome initially, so let’s see what the most probable steps needed for a website migration look like:

  1. Look at your Existing Site

Before doing server-to-server site migration you must take an inventory of installed modules, themes, and custom code and deprecated modules and unsupported customizations.

  1. Archive the Existing Site in its Entirety

You can then take an entire site backup from the existing site that is including files, databases and configurations and store the whole template in a secured area so as to lessen the risk of data loss.

  1. Confirm that All Required Systems Are Installed

Make sure that your server structures are consistent with the installation requirements for Drupal 10, which include an on-premises precise database coupled with a working PHP version of 8.1 or better. If your hosting environment needs adjusting, do so, especially if the current version is insufficient.

  1. Upgrade Modules for Migration to the latest version of Drupal 9 to 10.

There are several tools that can assist in this process, such as Upgrade Status module, which allows one to know the deprecated and still supported modules enabling the migration of the supported ones first and ensuring that all versions used are updated to the Drupal 10

  1. Prepare yourself for an Outage

This is more about making sure that the expectations are managed across the board, where you notify stakeholders about the downtime long before you schedule it to update to Drupal.

Step-by-Step Migration Process

Step 1: Perform a Core Upgrade and Update Contributed Modules

  1. Perform an Update to the Most Recent Release of Drupal 9

The necessary updates ought to ensure you’re on the most recent release, which is important because it contains essential tools for migration.

  1. Check For Dependencies and Test the Upgrade

To check the contributed modules, use the Upgrade Status module.

Use the Drupal 10 replacements for deprecated modules.

  1. Execute Database Updates to upgrade Drupal.

Use the drush updb to ensure your site is running the latest version of Drupal. to upgrade Drupal core. command to ensure your database schema is upgraded.

Stap 2: Custom Code Evaluation

  • Custom Code Review and Audit
  • Go through the custom modules and themes for the use of any obsolete functions and APIs.
  • Replace code that is old and out of use with the APIs which are supported by Drupal 10.
  • Utilize Rector for Ease of Updates
  • The Drupalaroctor extension will be installed and used to such fixes in custom modules which will be deprecated in future updates.

Step 3: Test Migration Locally

  1. Local Development environment Setup
  • Perform Site Testing by using a local copy by tools such as Docker, DDEV or Lando.
  • Recreate the Migration
  • Migrate website content to a local installation for previewing of the site’s performance.
  • Make certain that all changes with respect to layouts, plugins and other settings have been carried out as envisioned.

Step 4: Transition to Drupal 10

Deposit Core Drupal Files

Having obtained the core sources of Drupal 9 site, deposit the core files that have not been deposited yet to make the source of Drupal 10 site complete.

Change the composer.json file to display the modified dependencies.

For those who are less familiar with PHP, we have prepared some command line aliases in Composer, or alternatively in our commands for upgrading to the new version of Drupal.

Commands:

composer update --with-all-dependencies
drush updb
drush config:import

Purge the Cache

In order to display Drupal 8 the right way, it is necessary to purge updated caches thrice after the upgrade.

Step 5: Confirm the Upgrade - Post-Upgrade Verification

Conduct Checking of the Entire Site

  • Check the homepage and all pages with their content, functionalities and integrations.
  • Double-check the requirements that every link is working fine, and the features appear correct.

Rectify Errors/FIX Other Issues

  • Eliminate any detected errors or warning messages from the checking process.
  • If necessary, ask the Drupal community on drupal.org or check the documentation for upgrading to the new version.

Step6. Bring the Upgraded Site Live

Put the Site in Maintenance Mode before performing any updates to Drupal.

  • To limit user action, start maintenance mode for the live already deployed site.

Commence The Upgrade

  • Transfer all the code meaning build changes along with the database into the active setting.

Turn Off The Maintenance Mode

  • After the deployment is successfully completed, remove maintenance mode and give users access.

Post-Migration Tasks

Once the migration is over, it is important to do the following tasks:

Check Performance

  • Keep an eye on server performance and website performance within the first few days.
  • Should there be any issues relating to performance, you should try to deal with such problems as quickly as possible.

Update the Manuals

  • Edit internal documents and user guides covering the parts of the site that have been updated or added.

Train Employees on the new version of Drupal.

  • Conduct training seminars for the editors and site managers on how to work with new features and changes in Drupal 10.

Set Routine Maintenance to ensure a smooth transition when updating to Drupal.

  • Draw up a plan for regularly scheduled maintenance of core, modules and themes in order for your site to be maintained and updated.

Tips for a Smooth Migration

Act in Advance: The migration to Drupal 10 should be carried out long before the End of Life date of Drupal 9.

Use Non-production Environment to test updates to Drupal before going live. Revisions to the system must be implemented first on a non- production environment before being pushed to production.

Involve the Community: Ask for help to the Drupal community as regards help and as well resources.

Make Records: Keep comprehensive record of the entire migration process so that one is able to refer back to it.

Put Emphasis Around Automation: Make use of Drupal Rector and Drush in place of manual input and command line interaction where repetition of tasks are required to upgrade Drupal.

There is no denying the fact that upgrading from Drupal 9 to Drupal 10 is a necessary action if you want your website to be functional, secure and ready for the upcoming opportunities. If you follow the guidelines provided in this step by step manual, you should be able to effectively plan and comprehensively execute the migration strategy. Putting a lot of emphasis on the pre-planning stages, performing an adequate amount of testing, and utilizing the right tools and technologies will ensure a soft transition. This way, you will be better prepared for innovations in the area of content management and web development using Drupal 10 and the latest contrib modules.

Frequently Asked Questions

Got questions? Our FAQ section covers the software we build, how we ensure quality, manage projects, and handle security. We’re committed to delivering top-notch, custom solutions. Check it out!

What is the process for upgrading from Drupal 9 to Drupal 10?

The process for upgrading from Drupal 9 to Drupal 10 involves checking your current site for compatibility, updating contributed modules and themes, and using the upgrade status tool to identify any issues. After resolving any identified problems, you can proceed with the upgrade using Composer to ensure a smooth transition to the latest version.

Are there any major differences between Drupal 9 and Drupal 10?

Yes, there are several differences between Drupal 9 and Drupal 10. Notably, certain modules and themes that were deprecated in Drupal 9 have been removed in Drupal 10. Additionally, Drupal 10 introduces new features and enhancements, including updated CKEditor 5 support, improved user interface elements, and enhanced performance.

How can I check the compatibility of my modules before upgrading to Drupal 10?

You can check the compatibility of your modules by using the upgrade status tool provided by Drupal. This tool will generate a report indicating which modules are compatible with Drupal 10, which need to be updated, and which may not be supported in the new version.

What PHP version is required for the Drupal 10 upgrade?

Drupal 10 requires PHP 8.1 or higher. It is essential to ensure that your server environment meets this requirement before initiating the upgrade process from Drupal 9 to Drupal 10.

Will my custom modules still work after the Drupal 10 upgrade?

Custom modules may require updates to ensure compatibility with Drupal 10. You should review your custom code for any deprecated functions or APIs that were removed in Drupal 10. Testing your custom modules in a staging environment before the final upgrade is advisable.
FAQ

Comments

Check

Thank you for your comments. It will soon be reviewed by a moderator.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Author

Date