Categories

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 ;)

1 vote, Rating: 5

Read also

1

So, how to deliver your content through your customers’ mobile devices? Mobile-friendly site or a native mobile app? Which way is better? Let’s compare both options to find the best one for your...

2

Today we are going to name challenges programmers are facing when they have to make an estimate, to clarify what makes this stage of project developing so ambiguous and hard.

3

There is no longer a need to carry a thick wallet — a thin mobile device is now capable of much more in terms of payments! It can be a wallet, a credit card and even a little bank in your pocket....

4

In this blogpost we made an attempt to describe the differences and similarities between Drupal and .NET based CMS, their strong and weaker points for you to compare and make up your mind, which...

5

A sufficient number of people all over the world prefer online shopping to going to physical stores; prefer sitting in a comfortable chair at home to standing in a line. So, the popularity of e-...

Subscribe to our blog updates