Clicky

Content migration to Drupal 8

Drupal 8 brought a lot of changes to our CMF, to someone it seemed superfluous and very complex, but indifferent clearly didn`t remain. Today, it is, probably, the most popular type of work for freelancers - the transition to Drupal 8.

In a new branch, there is no such thing as an upgrade of the kernel; we can`t copy Drupal 8 files to the root of our site, for example on Drupal 7 and run update.php - as we did in previous releases of the engine.


Now the only way to use a new branch is migration. Fortunately the developers didn`t leave us alone with this problem and tried to simplify our lives as much as possible and included the migration tool in the engine core. This tool is the migrate module (albeit a truncated version). Probably, many of us have already worked with it, and those who hear for the first time have an excellent opportunity to get to know it.

The migrate module allows you to import content from various sources, not only inside Drupal branches, but also external databases, CSV, XML, JSON files or CMS. Now we will analyze the simplest of migration of content in Drupal 8 - using the user interface. I want to note that migration involves only the transfer of content and no one will save you from rewriting your topic to a new branch or rewriting custom modules.

Migration Drupal 7 → Drupal 8 with the use of UI


I have two sites, one on Drupal 7 - with it we will export the content and Drupal 8 - into which we will import our materials. Both sites are located on the local host.


To do this, activate the necessary modules in Drupal 8:

            • Migrate - the core of the migration;
• Migrate Drupal - Migrates from older versions of the engine;
• Migrate Drupal UI - provides a user interface for migration.

Select and activate the required module.

Then we go to the address:
     1. sitename.ru/upgrade
Where, we are urged to do 5 points before migration:

            • Create backup database of site;
                
            • Make sure that you have access to the exported site database
                
            • Ensure that all your private files are also on the local site host 
               
              (publicly available), if any;
                
            • Include all the modules that you used in the previous Drupal branch; 
                
            • Transfer the site to the maintenance mode.
                

We must do all recommendations before migration.

After you have followed all the recommendations - click "Continue". Now we have a form in front of us, where we can only specify the type of database, the connection parameters to the database and the path to the directory with the files. I want to note that it is desirable to specify the path to the directory or the address of the exported site, for only so is the transfer of your files guaranteed.

Specify the parameters for the database and the path to the files before migrating:

            1. type of database;
2. database host;
3. database name;
4. username of database;
5. password to database.
The path to the files before migrating:
directory of files.

And click "Update", where we will see a list of what we can import, and what we can’t import.

A lot of modules, such as contextual or dashboard, no longer exist in the core of Drupal 8, so they will be listed in the list of what we can`t import.

List of modules that can’t be imported:

            color;
contextual;
dashboard
devel;
devel_degenerate;
field_sql_storage;
field_ui;
help;
list;
number;
options;
overlay.

After you have verified that there are no critical modules in this list, click "Run Update", where the content migration process will start.

  Next you see the process of content migration.

After the migration is completed, you should see your content, users, taxonomy dictionaries - if any, etc.

  The migration process is over.

Also, all events in the migration process are recorded in the log, where you can see what happened at each migration stage.

  Look at the entries in the logs.

This method is fairly simple and suitable for sites where there were no custom entities implemented, otherwise you can’t do without writing your import module.
There are other ways to migrate content. We considered only one of them.

Quick Free Quote
We respect your privacy. NO SPAM No selling your personal data.
We will respond to your query & collect further details within 24 hours. Guaranteed!

Support

We are friendly people who love to talk. So go ahead and contact us.

Technologies

Awards & Certification