Categories

(63)
(43)
(8)
(26)
(68)
(95)

Migrate API in Drupal 8 and a glimpse at the migration process

20.01.2017
Migrate API in Drupal 8 and a glimpse at the migration process
Author:

Drupal 8 is so irresistible in its innovations that it just makes you wanna… pack your things and migrate! ;) To “pack” your website’s content and configuration carefully and move them to Drupal 8, there is a cool tool called Migrate API. As with any relocation, it's easier to “pack your things” when they fit into “standard boxes.” The same applies to websites: the less custom functionality they have, the quicker the upgrade process will go. We will touch upon this and many other interesting issues while discussing Migrate API, its benefits, the modules it includes and the migration process it provides.

Migrate API: best things come to Drupal 8 core!

Not only do the best things come to Drupal core, but the greatest ideas are born at DrupalCons. At one of these, DrupalCon Prague, there was a discussion of building an improved and powerful migration system for “the great 8” that would inherit the best concepts from Drupal 7’s Migrate module but make the upgrade process way easier and much more enhanced.

Mission completed! Drupal 8 core got Migrate API that was added as a set of experimental modules, but has been improving and gaining trust, and has now (beginning with subversion 8.2.5) reached beta stability.

Migrate API can offer you:

  • robust, smooth and repeatable (if necessary) migrations from Drupal 7 or 6 to Drupal 8
  • direct upgrades from Drupal 6 to Drupal 8
  • migrations to Drupal from other sources
  • no need for PHP updates (like there used to be)
  • a handy UI and Drush integration (see also some tips of upgrading with Drush)
  • detailed documentation
  • migration templates
  • easy rollback functionality

The modules Migrate API includes

They are now “the great three,” but they used to be “the great two” — up until Drupal 8.1.x subversion was released, which was when the Migrate UI module joined in. So here they go:

  • the Migrate module that provides general API functionality for your upgrades
  • the Migrate Drupal module that offers special configuration for Drupal 6 to Drupal 8 and Drupal 7 to Drupal 8 migrations
  • the Migrate Drupal UI module that has a convenient UI to use instead of Drush

Some extra modules to use with Migrate API

However, that’s not all, so you can improve your migration process with Migrate API even more by downloading some additional contributed modules.

The Migrate Tools module offers a basic UI to list migrations and show messages, as well as general migration Drush commands:

  • drush migrate-status
  • drush migrate-import
  • drush migrate-rollback
  • drush migrate-stop
  • drush migrate-reset-status
  • drush migrate-messages

The Migrate upgrade used to have a UI that moved to core, so its main destination now is to provide important Drush commands for upgrades between Drupal versions, as well as to do rollback if necessary:

  • drush migrate-upgrade
  • drush migrate-upgrade-rollback

With the help of the Migrate Plus module, you can greatly enhance your custom upgrades. It provides extra functionality, for example, for grouping migrations together, as well as XML and JSon parser plugins to make import from file-based sources.

The Migrate Manifest module will let you run selected migrations defined in a manifest file.

And, finally, if you want to move from Wordpress to Drupal (see the comparison), the Wordpress migrate module is here for you to export your Wordpress files and migrate them to Drupal.

Migration templates

A lot of work has already been done to simplify the upgrade process! Drupal 8 has lots of ready migration templates for the core stored in YAML configuration files. In case with contributed modules, there may also some ready migration files, so it’s worth checking out. But, as far as custom functionality is concerned, get ready to create your own custom migration files for it. However, you can always entrust it to professional developers.

A glimpse at the migration with Migrate API from Drupal 7 or 6 to Drupal 8

  • Before the migration, it’s better to have a fresh Drupal 8 installation, because it will make the process easier.
  • Next, you should tell Drupal how to connect to the source database, for example, in your settings.php file.
  • Enable all the required modules both on the source and the destination website.
  • Run your migrations via Drush or UI, whichever is more convenient for you.
  • Review your migrations to see the result.
  • If necessary, easily roll them back.
  • After that, uninstall the migration modules.
  • Done!

Have a smooth upgrade process with Migrate API and an amazing new life for your website on Drupal 8! Upgrades have become a really popular service, especially since the end-of-life announcement for Drupal 6, so we have sharpened our skills in them to perfection. So, no matter how complex your website is or how much custom code it has, your upgrade will be safe and easy with us. Big migrations begin with a small step like contacting us right now ;)

3 votes, Rating: 3.7

Read also

1

It’s a joy to see how Drupal 8 fulfills its promise of becoming more convenient in every way! We’ve discussed how it respects...

2

Simple but powerful, the Views is the most popular module, installed on over two-thirds of Drupal sites. So we are happy to include it into our expanding collection of Drupal 8 module recaps which...

3

Rules are everywhere: at school, at work, in life in general ... and there are some Rules in Drupal 8 as well! Although it’s definitely not what you think it is :)

4

So, Drupal does not seem inclined to stop migrating modules any time soon, and we are not complaining. So much information to explore, so many things to share with you guys. And this time we’re...

5

Sometimes 404 errors are hard to avoid, and which can significantly slow a website down. Luckily, there is the Fast 404 Drupal 8 module that prevents it.

Subscribe to our blog updates