Tutorial: How to Migrate from Drupal 6 or 7 to Drupal 8

Overview

As Drupal 8 does not allow you to upgrade an existing drupal 6 or 7 database to the Drupal 8 structure, content and configuration must be migrated over. To facilitate this, there are a few modules created to assist with this effort.

See: https://www.drupal.org/docs/8/upgrade/upgrading-from-drupal-6-or-7-to-drupal-8

Considerations

There are two ways currently offered to run migration efforts: Through the Drupal UI or Drush.
After having tested both approaches, the Drupal UI route (although a bit slower) seems to be the least error-prone. However, the Drush route allows for more flexibility and rerunning individual migrations etc. but it is also a bit more problematic and error-prone. While testing, I was unable to get the same results via the Drush route as I did using the Drupal UI route. If things fail via Drush, it’s initially set up to abort and cancel the migration. However, via the UI interface, it continues silently until the end. This can be desirable for small migrations but probably not for larger efforts.

See UI: https://www.drupal.org/docs/8/upgrade/upgrade-using-web-browser
Drush: https://www.drupal.org/docs/8/upgrade/upgrade-using-drush
Modules: https://www.drupal.org/docs/8/upgrade/drupal-8-migrate-modules

Before beginning

It should be noted that having access to the Drupal 6/7 site root containing the code and files etc. is needed. Along with this being able to run both sites locally is quite beneficial in the migration effort. In order for this to happen, having the appropriate PHP version etc. for each site to run simultaneously needs to be taken into consideration. Both sites, the one being migrated and the one where things are to be migrated to should also be updated fully to the latest core release and all contrib modules etc. should be updated as well. Given that Drupal 6 contrib modules are mostly deprecated, Drush (by default) will not allow querying whether there is a newer version. However, there is a D6 module call mydropwizard to facilitate in the gathering of proper module version info: https://www.drupal.org/project/mydropwizard.

The process

As the Drupal UI migrate approach is what I had the best results with, I will go over the process for using this approach:

1. Create local instances of both sites (the site being migrated and the one being migrated to)

2. The D8 site should not have any configuration done to it. It should be a completely fresh install.

3. Update both sites to their latest core versions and any outstanding core/contrib modules

4. Catalogue the modules enabled on the existing site and verify whether it is still needed (see https://www.drupal.org/docs/8/upgrade/preparing-a-site-for-upgrade-to-drupal-8)

5. Activate necessary modules on D8 site needed to be replicated from existing site and update to latest release

6. Activate the relevant migrate modules on the D8 site (Migrate, Migrate Drupal, Migrate Drupal UI)

7. Navigate to /upgrade in the D8 site and fill out the appropriate fields:
Drupal Migration Tutorial

8. Review the items to be upgraded and the ones that will not be upgraded on the subsequent screen:
Drupal Migration Tutorial

9. If there are certain items shown that will not be upgraded but are expected to be upgraded and are needed, take a step back and verify that proper analysis was done on the modules enabled and existing on the current site and whether there is a proper module activated for it in the new site.

10. If the new site was modified and there is existing content that will be replaced, you may be prompted to acknowledge that data may be lost:
Drupal Migration Tutorial

Acknowledge and proceed accordingly.

11. Wait for the upgrade to run:
Drupal Migration Tutorial

12. Review migration log once completed:
Drupal Migration Tutorial

13. If needed, the Drupal log contains extended information on the migration effort:
Drupal Migration Tutorial

After migration

It is highly unlikely that everything will go according to plan with the migration effort. There are certain modules existing in D6/7 wherein there isn’t a proper path to D8. In such cases, some things may not work as expected on the D8 site. The migration takes care of a lot of content pieces (content types, fields, files etc.) However, custom pieces such as views etc. would have to be recreated manually. And, in some instances, utilizing the feeds approach outlined by Ramon above may be needed in order to finish off some missing pieces.