Guidelines for a Drupal 6 to Drupal 8 Migration
Migrating from Drupal 6 to Drupal 8 is tricky business. We outline a couple of approaches, discuss multilingual considerations and review a few gotchas.
The Core Migration Process
Drupal 8 is substantially different from Drupal 6. So you can’t just “Update” your Drupal 6 site. Rather it needs a full-blown migration of both content and configuration.
- Migrate Configuration : This includes Content Types, User Roles and Field Definitions.
- Migrate Content : This includes Nodes, Users and Taxonomy terms.
A few high-level considerations:
- Identify core hacks : Sometimes developers directly modify core and we must make sure that no such alterations exist. To do this, we will need to do a recursive diff of the project code base against a clean Drupal 6 code base. And we should repeat this process for all modules in the Drupal 6 install.
- Upgrade to the latest minor release first : Before switching to Drupal 8, update to the latest Drupal 6. For eg. if the latest drupal 6 is 6.35.10, we need to make sure the drupal core is at the same version. The same applies to all modules in the Drupal 6 install.
- Identify nontransferable modules : some drupal 6 modules do not have an upgrade path into Drupal 8, Sometimes the functionality of old modules will need to be redesigned in the new install. For eg. some modules such as Views have gotten migrated to core in Drupal 8, while modules such as Blocks got a massive rework by being split into blocks and custom blocks.
- Choose an upgrade path : While the whole migration process is still experimental for D8, there are already many modules that help in the process, there is also an option to “migrate using browser”. The migrate module is often used for the final migration, as it is meant to replace “Features” as the main Drupal configuration and content transport method. If a site does not have much content or configuration, you might want to consider manually creating this in the new site. Although automated tools are available, it is a judgment call about which approach is better.
- Themes : Drupal 8 has huge changes in how themes are structured, built and deployed. These cannot be migrated from Drupal 6 in general. You will need to rebuild them.
Drupal 8 handles multilingual completely differently from Drupal 6. In Drupal 6, an article in English (Node X) would have a different node ID when translated into say French (Node Y). Not so in Drupal 8 – they both have the same Node ID! This has to be taken into account when doing the migration..
The content of both nodes is migrated to one and the same node so that there are language versions on field level. Redirects from node/2 to node/1 will be automatically created during the migration.
For a deeper dive, you can read our post on how to do Internationalization in Drupal.
Known Issues for Drupal 6 to Drupal 8 Migration
- Aggregator Categories : Drupal 8 no longer supports aggregator categories and therefore they’re not migrated from Drupal 6.
- Allowed vocabularies of taxonomy term reference field: In Drupal 6, the list of applicable content types for a given vocabulary are defined on vocabulary settings. In Drupal 8, the allowed vocabularies can be defined on taxonomy term reference field settings. This setting is currently not migrated, allowing all vocabularies to be referenced in Drupal 8. You can manually edit the taxonomy term reference field settings in Drupal 8 after the upgrade and select the allowed vocabularies.
- Menu UI : The menu_primary_links_source and menu_secondary_links_source variables are not migrated, because they do not have equivalents in Drupal 8.
- Node content types : The default configuration in Drupal 6 has Story and Page content types. Drupal 8 default content types are called Article and Basic Page (which has a machine name ‘page’ just like in Drupal 6).
- Text/Input formats : Filter formats not recognized by Drupal 8 will be migrated as filter_null, a filter that simply returns an empty string. This means that any Input format using an unknown filter format won’t display fields’ content, although the content is in the database.
- Filter formats not recognized by Drupal 8 include the PHP code filter, and any other filter provided by a contrib module that is not available in your Drupal 8 installation. The PHP filter is not supported in Drupal 8 core. To repair this situation, you have several alternatives:
- Check if the modules providing the filters have a Drupal 8 version and install them
- Edit and save the affected input formats. This will remove the reference to format_null, and the contents will start showing. Note that since the original filter doesn’t exist, contents are not being filtered and unreplaced tokens may be shown, or even the site can be exposed to any security issue
- Edit the contents and change to another input format. This suffers the same problems as the previous point
- URL Aliases : When migrating URL aliases for a language that is not enabled on the new Drupal 8 site, none of the aliases will work until you enable the language on the new Drupal 8 website.
- Views : Views are not migrated, you will need to create the views in Drupal 8 manually.
- Who’s online block : The User activity settings are not migrated. This needs to be manually edited in the relevant View under filters/access
- Time Zones and Dates : Drupal 6 uses a time zone offset to compute local time. Drupal 7 and Drupal 8 use a time zone name. Unfortunately, the PHP function timezone_name_from_abbr() which converts the offset to time zone names will produce different time zone names depending upon whether or not daylight savings time is turned on or not on your server.
If you're interested in Drupal, and considering migration, we have a great article on migrating from Drupal 7 to to Drupal 8.
If you'd like to know more we’d love for you to join us on Linkedin at Exemplifi, Facebook at ExemplifiSites or Twitter at ExemplifiSites.