/migration_boilerplate

Drupal 8 Migration Boilerplate

Primary LanguagePHP

Drupal 8/9 Migration Boilerplate

Use this module and the directions below as a starting point to easily get your Drupal 6/7 sites into Drupal 8/9.

SETUP

  1. Setup both your Drupal 6/7 and Drupal 8/9 sites in Lando.
  • If using Drupal 8, configure the site to use Drush 9
  • If using Drupal 9, pin your Drush to 10.3 until this issue is resolved
  1. Copy the .lando.yml file in this repo to your Drupal 8/9 site root (change the app name)
  2. Export your Drupal 6/7 DB with lando db-export dump.sql.gz
  3. Copy the settings.local.php file in this repo to your Drupal 8/9 sites/default folder.
  4. Import the Drupal 6/7 DB into the Drupal 8/9 Site with lando db-import --host=d7db --user=drupal7db dump.sql.gz
  5. Run this in your Drupal 8/9 project root:
lando composer require 'drupal/migrate_plus:^5.0'
lando composer require 'drupal/migrate_tools:^5.0'
lando composer require 'drupal/migrate_upgrade:^3.0'
  1. Enable this module.
  2. Run the following commands in your D8 site:
lando drush migrate-upgrade --legacy-db-key=migrate --configure-only
lando drush config-export --destination=/tmp/migrate
lando ssh -s appserver -u root
cp /tmp/migrate/migrate_plus.* /app/path/to/migration_boilerplate/unused_config
chown -R www-data:www-data /app/path/to/migration_boilerplate/unused_config
exit
lando drush cim -y
  1. Run lando drush ms to make sure the configs made it over.
  2. If you want to to remove the red warnings for missing D6 or D7 migrations, add this code snippet to your migration_boilerplate.module file and adjust the code.