How to: upgrading from Drupal 7 to Drupal 8

How to: upgrading from Drupal 7 to Drupal 8

Upgrading a website script version is one of the most complicated procedure a webmaster has to deal with when managing a website. How to do a Drupal 8 upgrade? Here is a small guide with various details. Let’s start with basic info : The content of your site does not live in your Drupal installation. It lives in a MySQL database which is managed by your Drupal installation. This database will sit somewhere on your server, as determined by your web host. (As an aside, I never did figure out where Dev Desktop puts the database on your computer at home. It’s a mystery.) Anyhow, the exception to this is that the images within your site do live in your Drupal installation, they are in the sites folder somewhere (depending on your settings), with Drupal keeping records of them in the database.

Note: Earlier, there used to be a migrate_plus module in Drupal 8 core which contained all the pieces of migrate functionality that wasn’t able to make it in the Drupal 7 core. It contained all the plugins for the support of XML, CSV and JSON data sources along with the support for databases like MS SQL or Oracle. This module has now been split into different modules, namely migrate_plus, migrate_tools and migrate_source_csv. Though not yet perfect, the upgrade procedure in Drupal has come quite a long way. As you can see in this tutorial, the upgrade process is now very streamlined and is an integral part of the Drupal Core. If you liked this blog post, then give a read to another blog post by us on, How To Update Drupal 8 Core.

If you’re migrating from a previous version of Drupal, start with our Preparing for a Drupal-to-Drupal Migration tutorial. From there you’ll learn how to perform a basic update using either the built in UI or the contributed Drush commands, as well as some common best practices to help things go as smoothly as possible. If you’re looking to customize your Drupal-to-Drupal migration a bit, continue through the tutorials on writing custom migrations, and then we’ll go in-depth on how to use those skills to tailor the Drupal-to-Drupal update process to your specific use-case.

The steps above outline how to get a distribution minimally installed on an existing site. But you’ll still have a lot of work to do to reconcile your existing site content and structure with what has been created by the distribution. Here are a few tips to get you started–but you should begin with the assumption that there will be lots more you’ll discover and need to fix. Roles. Many distributions will create one or more custom roles. Examples include contributor, editor, and administrator. If any of these roughly correspond to existing roles on your site, delete the roles created by the distribution and rename the existing ones to use the distribution role names. For example, if your site has a role called “site administrator” and the distribution has created a role called “administrator”, delete the newly created “administrator” role and rename “site administrator” to “administrator”. After adjusting the role names, visit admin/config/people/accounts, ensure the “administrator” role is selected as the “Administrator role”, and save the form. Consolidating the roles in this way will get you the functionality of the distribution’s roles and permissions while maintaining your existing users’ role allocations.

Update your site to the latest version of Drupal 6 (core and contributed modules). Before upgrading to Drupal 7, disable and uninstall modules you know you won’t be using in the new site. To help determine which modules to uninstall, you could review the list of modules included in the distribution, which often are found in the download in the directory profiles/[distribution_name]/modules. If a given module is not in the distribution and you don’t foresee needing its functionality on your new site, you may choose to uninstall it.

There are several tips and best practices to follow to help you prepare for the upgrade. Still, since this is such a complex process, we highly recommend getting members of your development team involved from the beginning, which will help ensure the upgrade goes as smoothly as possible. Upgrading to Drupal 8 is more similar to building a new website than previous Drupal updates were, meaning that you should never perform the upgrade to Drupal 8 on a live site. It’s also strongly recommended that you create a backup of your live site so that if anything goes awry, you can quickly roll the site back to an earlier version while you figure out what the issue is. See extra info about Migrating from Drupal 7.

Comments are closed