Migration of taxonomies and vocabs Drupal6/7 to drupal 8 with custom migration

To start with look for  :




In the custom_migration module (https://github.com/lomasgupta/custom_migration/tree/staging

) in config/install folder.

Now for setup you have to uninstall custom_migraton module :

drush pm-uninstall custom_migration.

Make sure configuration settings for the migration group (testgroup) is also removed. At this point it’s important to look into custom_migraiton.install file.


The code in this file is self explanatory , so let’s not look into deep. All it’s doing to delete the configuration from the DB using Drupal:: configFactory(). You can also delete from the UI admin/structure/migrate.


Step 2: Install the module again and drush ms. The output will be something like this :



Under testgoup, you can see the rb_d6_taxonomy_vocabulary and rb_d6_taxonomy_term migration scripts.


Core taxonomy module has migration templates (core/module/taxonomy/migration_templates) which are used in our custom_migraiton module.


We have changed the migration id and group id rest is same.


Now Do : Drush mi rb_d6_taxonomy_vocabulary:


Output: Processed 2 items (2 created, 0 updated, 0 failed, 0 ignored) - done with 'rb_d6_taxonomy_vocabulary'


Next do : drush mi rb_d6_taxonomy_term


Output : Processed 475 items (475 created, 0 updated, 0 failed, 0 ignored) - done with 'rb_d6_taxonomy_term'


You can do drush ms again to check.


You can find under testgroup import is done.