Basic usage

Last updated on
28 September 2017

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

After you have placed your CSV files in the configured directory you can trigger the migration by using the following drush command:

drush migrate_taxonomy (mt) [Optional subdirectory: subdir] [optional language: --language=fr]

The basic command is drush migrate_taxonomy or drush mt for short. This will run the migration on all the files, even the ones inside subdirectories, which have no language extension in the file name. Existing terms will be updated, none existing terms will be created and even if the vocabulary doesn't exist, it will be created.

Note: It is not recommended to trigger the migration itself by using drush migrate-import directly or the migrate ui. It is possible, but the configuration of the last imported CSV will be used. 

Subdirectories

So if we use the same example for the file structure as discussed in the basic usage page:

 ~/.../drupal_root/sites/default/files tree
├── styles
└── vocabularies
    ├── Colour\ #colour.csv
    ├── Colour\ #colour.fr.csv
    └── second_level
        └── Material\ #material.csv

You can specify an optional subdirectory to only run the migration of the files inside this subdirectory (and the directories that might exist inside this subdirectory). So for example if we want to only run the migration on the "second_level" directory, the command will look like the following:

drush mt second_level

Help improve this page

Page status: No known problems

You can: