Migrate in drupal means, Migrating configuration and data from old drupal site to new Drupal 8
In drupal 8 now migrate, replaced the old upgrade process that was used in privious versions of drupal. upgrade system is now dropped and import and data transformations now will happen druring migration.
Migrating in drupal 7 involved defining your fields mapping and manually creating the new content types. This is no longer necessary in drupal 8.
In Drupal 8 migrations automatically create content types and map fields between old site and new site. This leads to very less configuration to be done for migration from older version to drupal 8
Why Migrate from Drupal 6 to Drupal 8 ? Why not Drupal 7 to Drupal 8?
migration from drupal 7 will come soon, developement is in process now. For now Drpal-6 code is finalizing. In Drupal 8, It not longer support data migration from drupal 7 using upgrade process.
Migration from drupal 6 to drupal 8
- PHP 5.4
- Drual 7.x(dev). (Lower version doesn’t suport Drupal 8. To use migrate you need to have the most up to date version of drush 7.x How to Install Drush 7 for Drupal 8 in linux )
- Comfortable with Commandline (There is no GUI at this momment,you need to do the things using commands)
First step of migration is to create manifest file for the migrate module to operate on. Its just a simple text file,that needs to be in root directory of drupal 8.
These are things that needs to be keep in mind, while creating manifest file.
- This file contains the migrations to be executed.
- For migratio you need to include all the dependencies in file.
- you can include comment by # character.
Here is a simple example to run the Druapl 6 node migration
#for user and user roles including profile fields
#for node and node types
#for cck fields
you can download the complete manifest file for all drupal 6 to drupal 8 migratio from https://drupal.org/node/2221779
Now last step of migraton is executing migratio using command line.
Open terminal and go to drupal 8 root directry and run following command.
/** Enable drupal migrate module **/
drush en migrate_drupal -y
/**RUN MIGRATION **/
drush migrate-manifest --legacy-db-url=mysql://<username>:<password>@<host>:<portno>/<db_name> <manifest-filename>
Problem with drupal 6 drupal 8 migration
Migration from drupal 6 to drupal 8 is very easy and fast, but this process has few issues. Some Major issues and fixes are:
- It doesn’t migrate node reference and user reference fields. (I have created two modules for that which create text field on drupal 6 for reference fields and later you need to manually create refernce fields in each content type manually(with same names) and run drupal 8 modules. Which will fill all the refernce fields with actual content. I’ll post guide for each in later post)
It doesn’t properly migrate checkboxes/radio button because on drupal 6 there we could put key value pair for checkbox and radio buttons. but on drupal 8 it can only have on off button with value 0 and 1. (You can overcome this by mapping fields type, I did this on one project. Please check this on https://www.codeinsects.com/drupal-6d6-to-drupal-8-d8-cck-single-onoff-checkbox-checkboxes-fix.html)
Before doing migration new modules and theme should be enabled on new drupal 8 installation
Only the default, short, medium and long formats are migrated. All other formats need to be reconfigured after migration.