Migrating to Drupal 8 from previous versions - DEPRECATED
DEPRECATED
The information below is either outdated, or no longer considered best practice at Kalamuna.
This has a lot of good information and is a good candidate for being updated, but as it stands a lot of the information is out of date.
General Overview
There are a lot of good articles out there that can help you with this. Â This is more of specific examples on how to do it between 2 localhosts.
Some references:
Preparing for an Upgrade (READ FIRST)
UI Based Migration
Simple, but will write this up later. In the interim:Â https://drupalize.me/tutorial/drupal-drupal-migration-ui?p=2578Â check that out
Migrating with Drush
You will need a few extra modules to get started with this route: Migrate Tools, Migrate Upgrade & Migrate Plus
Read the module page to make sure you grab the appropriate version for your D8 core version.
Double check if you need any special modules for your content as mentioned in the Preparing for an Upgrade link above.
Also, check out Drupal 8 Migration Useful Drush Commands & Other Tips for quick tips on drush commands.
Kalabox
Currently can't enable Migrate Upgrade module - see issue:Â https://github.com/kalabox/kalabox/issues/1789
Drupal VM
Download & setup both the D7 and the D8 sites
Enable the migrate, migrate tools, migrate upgrade & migrate plus modules in the D8 site
In the D8 site run this
drush migrate-upgrade --legacy-db-url=mysql://drupal:drupal@localhost/D7SITE_drupalvm --legacy-root=http://D7SITE.dvm --configure-only drush migrate-status
You will see a list of all the items queued for migration. Â You can either migrate them all or pick and chose.
You can migrate all of the items with:
drush migrate-import --all
OR you can be more granular and migrate only certain items:
drush migrate-import {migration name} i.e. drush migrate-import upgrade_d7_menu drush migrate-import upgrade_d7_node_news
NOTE: it will tell you what other items you need to migrate with that singular migration peice when you try to import it.
Custom Migrations
Use this option if you need to be more granular in your migration. Â You can also use this to change the names of items, etc. Â There are a lot of great resources out there on how to do super duper custom configs. Â This is just a simple example.
Note: This is for a local to local migration for testing  purposes.  Once you have a woring copy of what you need, I wrote an example of a Pantheon to Pantheon Migration below.
Kalabox
Currently can't enable Migrate Upgrade module - see issue:Â https://github.com/kalabox/kalabox/issues/1789
Drupal VM
Download & setup both the D7 and the D8 sites.
Do the following in your terminal on your D8 site (change our YOUR-MODULE as need be):
In your settings.local.php add this to the top:
In the YOUR-MODULE_migrate module we created above, add a config/install folder
In your D8 site run this:
Then you can go through and remove the yml files you don't need. Â Careful though, read the required dependencies at the bottom of each yml file.
You should also have a yml file(s) with named like the following: migrate_plus.migration_group.GROUP-NAME.yml.  The default group name is migrate_drupal_7.  Open that file(s) up and edit the last line: shared_configuration: null to the following:
If you need to skip rows (ie fields, certain nodes, etc), this is a good tutorial on how to do so:Â https://drupalize.me/tutorial/use-hookmigratepreparerow?p=2578
If you need to alter data or do heavier customization you need to extend various migration and plugin classes.Â
Here is a quick article on Altering data during a Drupal 8 Migration
There are also numerous articles out there as well to help you in this regard.
Wipe and re-install your D8 site plus enable the custom module. You should only have the config you specified in the module now.
You can check and then import with:
NOTE: Make a little script to help with testing this to remove failures, etc.  Use drush_print() in my hook_migrate_prepare_row() for fast debugging.  You will drop and import the DB over and over.  Here is a sample script:
Pantheon to Pantheon Migration Setup
SFTP a file called secrets.json to your D8's files/private folder.
Just put this in the file to make a legit json file:Â {}
In your D8 site's settings.php put this at the bottom:
Create a file called settings.migrate-on-pantheon.php in your D8 sites/default folder and put this in it:
Install Terminus and the Terminus Secrets Plugin
Run these commands on your local machine:
Review History
Who | When | Status |
---|---|---|
 |  |  |
Bob | 20230530 | Deprecated |