-

Drupal Version Upgrade - Preparation, Specific Steps, and Common Challenges

Upgrading Drupal to a newer version ensures your website remains modern, secure, and efficient. For Drupal 8 users, upgrading to a higher major version, such as Drupal 9 or 10, is significantly easier than for older versions, thanks to the improved upgrade process. However, an update isn’t just clicking a button – it requires proper preparation to avoid technical issues and ensure uninterrupted website operations. In this article, we explain the differences between an upgrade and a migration and highlight key points to consider when upgrading Drupal 8 to newer versions.

Differences between migration and upgrade

When working with Drupal, it's essential to understand the distinction between migration and upgrade, as these processes are fundamentally different in scope and complexity. This distinction becomes particularly relevant when planning improvements for your website.

What is a migration?

Migration involves moving a website from an older version of Drupal, such as Drupal 7, to a modern version, such as Drupal 10 or 11. This process often requires rebuilding the website from scratch because older versions of Drupal aren’t directly compatible with the architecture introduced in Drupal 8. The website's content, custom functionality, and design are transferred to a new environment during a migration. It's a comprehensive project that often requires rethinking some aspects of the webpage to take full advantage of the capabilities of the newer Drupal versions.

Migrating a website can be complex and resource-intensive, but it’s necessary for older Drupal versions that are no longer supported. For organizations still using Drupal 7 or earlier, migration is the only way to ensure the website benefits from the enhanced performance, security, and features of the latest versions.

What is an upgrade?

An upgrade is the process of taking a Drupal webpage to a newer version within the same architectural framework. For example, moving from Drupal 8 to Drupal 9 or 10 is considered an upgrade. Thanks to the Symfony-based architecture introduced with Drupal 8, upgrades between these versions are significantly more streamlined than migrations.

During an update, Drupal core and contributed modules are upgraded, but the webpage's overall structure, content, and features remain intact. Upgrades are much less disruptive than migrations, as they don't require rebuilding the entire website. However, they still require careful planning and execution to ensure compatibility of custom modules, themes, and integrations with the newer version.

Why this distinction matters

Understanding whether your project needs a migration or an upgrade is crucial for proper planning. Migrations demand a full-scale rebuild and are more resource-intensive, while upgrades focus on enhancing an existing website with minimal disruption. For Drupal 8 users, upgrading instead of migrating is a significant advantage, as it simplifies the process and allows organizations to keep their webpages modern without undertaking a complete overhaul.

Why upgrade Drupal 8 to a newer major version?

Upgrading Drupal 8 to a newer version, such as Drupal 9 or 10, is more than a routine technical task— it’s an investment in your website’s future. The benefits of updating go beyond keeping your website secure. They also include improved performance, modern features, and better compatibility with emerging technologies. Let’s explore the key reasons why updating Drupal 8 is essential for your organization.

End of support for Drupal 8

Drupal 8 reached its end-of-life in November 2021, which means it no longer receives official security updates or community support. Operating on an unsupported Drupal core version poses significant risks, such as exposure to security vulnerabilities and limited access to technical assistance. Upgrading ensures your website remains protected against potential threats and adheres to best practices in cybersecurity.

Enhanced features and performance

Each newer version of Drupal introduces advanced features designed to improve both user experience and website management. For example, Drupal 9 streamlined the upgrade process, while Drupal 10 introduced cutting-edge tools like Claro as the default admin theme and Olivero as the default frontend theme. These updates provide a more intuitive interface, improved accessibility, and a visually modern design.

Olivero is a default frontend theme in Drupal 10

Source: Drupal.org

Beyond aesthetics, newer versions also include performance optimizations that reduce page load times and enhance the overall speed of your website, ensuring a better user experience and improved SEO rankings.

Preparing for a Drupal 8 upgrade

Proper preparation is the cornerstone of a successful Drupal 8 update. Skipping this crucial phase can lead to unexpected issues, increased downtime, and unnecessary complications. By taking a methodical approach, you can ensure a smooth transition to the newer version of Drupal.

Conduct a full Drupal website audit

Start by reviewing all installed Drupal core modules and contributed ones. Identify any custom modules or code that might require adjustments. Tools like the Upgrade Status module can help detect deprecated elements. Additionally, check the compatibility of your theme with the newer Drupal versions to avoid layout and functionality issues during the upgrade.

Backup your website

Creating a comprehensive backup of your webpage is essential. This includes your database, website files, custom modules, themes, and media. Store backups securely and test them to ensure they can be restored if necessary. A reliable backup is your safety net if anything goes wrong during the update. You can use the Backup and Migrate module.

Check server requirements

Ensure your hosting environment meets the requirements of the updated Drupal version. Drupal 9 requires PHP version 7.4 or higher, while Drupal 10 needs PHP version 8.1 or above. Check the compatibility of your database and ensure your server resources are sufficient for the updated version’s demands.

Review and upgrade dependencies

Dependencies play a crucial role in the update process. Update your Composer version and verify the compatibility of all third-party libraries and APIs used on your website. Outdated or incompatible dependencies can cause significant issues, so addressing them early is vital.

Create a development environment

Before updating your live website, set up a staging or development environment. This allows you to test the update process and resolve any issues in a controlled setting. Testing in this environment minimizes risks and ensures that the live webpage remains unaffected by any problems during the update.

Plan for downtime

Even with the best preparation, some downtime might be unavoidable. Communicate the expected maintenance window with stakeholders and inform users about potential disruptions. Clear communication helps manage expectations and minimizes the impact of any interruptions.

By following these steps, you’ll establish a solid foundation for a successful Drupal 8 upgrade, ensuring your website remains functional, secure, and ready for future challenges.

Drupal upgrade step-by-step

Updating your Drupal 8 website involves a series of carefully executed steps to ensure a seamless transition to newer versions.

Steps to follow when upgrading Drupal website to a newer version

1. Start with a comprehensive backup

Before beginning the update, create a fresh backup of all critical components of your webpage. This includes:

  • The website’s database, containing all content and configuration data.
  • Core files, contributed modules, custom modules and themes.
  • Media assets, such as images and documents.

2. Review and update Drupal core modules and themes

Update all modules and themes to their latest versions compatible with Drupal 8. This step minimizes the risk of conflicts during the upgrade process. Pay close attention to:

  • Contributed modules: Check for available updates using Composer or the admin interface.
  • Custom modules: Review and refactor any custom code that may rely on deprecated APIs.
  • Themes: Test your website’s visual elements for compatibility and adjust styles or templates as needed.

3. Use Composer to update Drupal core 

Composer is essential for managing dependencies and upgrading Drupal core. Execute the following steps:

  • Run the command:

    composer update drupal/core --with-dependencies
  • Verify that all related libraries and dependencies are updated alongside the core.

This process ensures that your website’s codebase aligns with the latest Drupal release while maintaining compatibility with essential modules and tools.

4. Apply database updates

Once Drupal core and module updates are complete, run database updates to implement required changes to the website’s schema. You can use either of these methods:

  • Drush Command: Execute 

    drush updatedb 

    to apply database updates programmatically.

  • Update Script: Access the update script at

     /update.php

     via your browser and follow the prompts.

Database updates are critical to ensuring the website functions properly after the codebase changes.

5. Conduct thorough testing

Testing is crucial to identify any issues introduced during the update process. Focus on the following areas:

  • Core functionalities: Verify that forms, user authentication, and administrative workflows operate as expected.
  • Custom modules and features: Ensure that custom functionality performs without errors.
  • Theming and layout: Test the visual aspects of the website for any discrepancies or alignment issues.
  • Third-party integrations: Confirm that APIs, analytics, and external tools remain operational.

Document any issues found during testing and address them before proceeding to deployment.

6. Deploy to production

Once all tests have been successfully completed in a staging environment, deploy the changes to your live website. Follow these best practices:

  • Schedule the deployment during low-traffic periods to minimize user disruptions.
  • Monitor the live website closely after deployment to identify and resolve any unforeseen issues quickly.
  • Rebuild caches

    drush cache-rebuild

    to optimize performance and ensure the website reflects the latest updates.

Common challenges and solutions

Even with careful preparation, challenges may arise during a Drupal update. Knowing what to expect and how to address these issues ensures a smoother process.

  1. Module compatibility issues
    • Certain contributed modules may not yet support newer versions.
    • Solution: Use the Upgrade Status module to check compatibility and replace unsupported modules with alternatives.
  2. Deprecated code in custom modules
    • Such modules may contain deprecated code that causes incompatibilities.
    • Solution: Use deprecation checking tools to identify and refactor modules as needed.
  3. Theme issues
    • Themes might break due to changes in templates or libraries.
    • Solution: Test themes in a staging environment and update their code as necessary.
  4. Database update failures
    • Database updates can sometimes fail due to unforeseen issues.
    • Solution: Ensure backups are available and review error logs to resolve specific problems.
  5. Performance drops
    • Outdated caching or configurations may cause slow performance after updates.
    • Solution: Rebuild caches using drush cache-rebuild and optimize settings for CSS and JavaScript aggregation.

Drupal version upgrade. How can Droptica help?

Upgrading your Drupal website can be complex, but Droptica makes it simple. We conduct a thorough website audit to identify issues, plan your update, and execute it efficiently. We ensure a seamless transition from upgrading Drupal core and modules to testing in a staging environment. Post-update, our ongoing support keeps your website secure and optimized. 

-