CLIENTS ON MAP

Ultimate Guide: How to Migrate Drupal 7 To Drupal 8

Drupal 8 provides support for D7 to D8 migrations. Since there is no direct upgrade path for Drupal 7 to Drupal 8, you should become familiar with the migration system in Drupal. You can migrate content & configuration from Drupal 7 to Drupal 8.

In this article we will share two (2) different ways to migrate from Drupal 7 site to Drupal 8

1) Migration through Drupal Configuration
2) Migration Using Drush Command & Composer

Let’s start….

1) Migration through Drupal Configuration

Steps to Migrate Drupal 7 To Drupal 8 Using Site Configuration of Drupal

Step 1 – Check Drupal 7 site for existing content and modules

Please check that stable Modules in Drupal 7 are also available in Drupal 8 or not.

Step 2 – Download & install the latest version of Drupal 8

Once your installation setup is completed into localhost. This Drupal 8 site will be used as the destination site for the migration process. Tip: Please build the website in the local environment

Step 3 – Enable the below Modules in Drupal 8 site

Migrate: – Migrate module provides a flexible framework for Drupal 7 to Drupal 8 content migration

Migrate Drupal: – Migrate Drupal module provides the capabilities for importing content from Drupal 7 to Drupal 8

Migrate Drupal UI:-  This module provides below mention characteristics

1) Show list of migrations that can be filtered by migration tags
2) Create new migrations from scratch
3) Edit and delete existing migrations.
4) Configure advanced process pipelines, E.g. configure the process plugins for each field.
5) Build migration templates into migration config entities.

Please refer below screenshot for more details

Step 4 – Navigate to the Upgrade path

www.example.com/upgrade

Once the Migrate module is enabled, you need to navigate to the upgrade path. Further steps will be available on the upgrade path to proceed. So, read and follow the migration steps carefully. Then press to the continue button and open to the migration screen. Please refer the image below

Step 5 – Make sure that access to the database of Drupal 7 is available from Drupal 8 site

Before performing the migration, you must check that you have full access of your Drupal 7 database and private files which you want to migrate to Drupal 8 website.

Step 6 – If the old site has private files, copy its file’s directory and that must also be accessible on the host of Drupal 8 site

You must enable the permission in your drupal7 private files that can be accessible in drupal8 sites.

Step 7 – Enable all modules on Drupal 8 site that are enabled on Drupal 7 site.

For example, if the old site uses the mark-up module, then enable the mark-up module on the new site so the existing data can be imported easily.

Step 8 – Do not add new content to the new site before migration. Any existing content will be overwritten in the migration process.

Please make sure that you don’t add any new content before migrating the database. You can always add the content after the successful migration to the new version

Step 9 – Put Drupal 8 site into maintenance mode

Go to.
-admin/config/development/maintenance
-Save Configuration.

Step 10 – Continue the upgrade process

Once you click perform upgrade button it will start migrating from Drupal 7 to Drupal 8.

Step 11 – Start the Migration

The migration process will take some time, depending on the size of the website. In case of errors, just reload the web page.


Once it is completed successfully you will be able to see below screen.

Finish….

This process is very simple and can be done easily with some technical knowledge by using Drupal modules & configurations.

Second Approach….

2) Migration Using Drush Command & Composer

Required Modules for Migration using Drush Command

1) Migrate Upgrade:-
Provides Drush support for upgrading from Drupal 7 to Drupal 8.

2) Migrate Plus:-
Provides extensions to core migration framework functionality.

3)Migrate Tools:-
Provides Drush commands which can be used in the migration process.

Step 1 – Install Composer

Let’s initiate Drupal 7 to Drupal 8 migration using Drush command.

Please install the composer first by using the below command.

Command :
“composer install

Step 2 – Update Composer (Optional)

If you have already installed the composer, make sure it’s updated. If it’s not updated, then you can update the composer using below command.

Command :
“composer update

Step 3 – Install Drush using Composer

If your Composer doesn’t have Drush listed as a dependency, you can install Drush from the command line as follows

Command:
“composer require drush/drush”

Step 4 – Check the Version of Drush

Make sure your Drush version is up to date

You can check your drush version with the following command.

Command:-

“drush –version”

Step 5 – Start Migration Through Drush

Now start your migration with following drush command

Command

“drush ://user:password@server/db — ://example.com –configure-only”

Replace below mention value with your values in the above command

-‘user’ is the username of the source database

-‘password’ is the source database user’s password

-‘server’ is the source database server

-‘db’ is the source database

Step 6- Check Your Migrate Status

After migration, check migration status with the following command
Command:-
“drush migrate-status”

Step 7 – Import the Migrate Data

To check the migration list, please use the following command
Command

“drush migrate-import –all”

Step 8:- After successful migration, following path can be used to check status of migration.

Go to the structure->migration

Check the migration group ‘import from drupal 7’ list migration and useful data will import it.

After clicking on list migration button all upgraded data will be visible. Click to the execute button and data will be imported.

Once you click on the execute button, you will be redirected to the page with below mention options.

Import: –

Imports all previously unprocessed records from the source, plus any records marked for the update, into destination Drupal objects.

Rollback: –

Deletes all Drupal objects created by the import

Stop: –

Please stop any import or rollback processes that may currently be running.

Reset: –

Sometimes a process may fail to stop, and be left stuck in an Importing or Rolling Back status.

You can select the options and execute the process as per your requirement and your migration will be completed.

Done!!!

Please compare manually a few of your Drupal 7 contents with Drupal 8 to verify.

If you follow the above mention steps carefully, you can easily migrate your site.

If you are looking for Drupal Guide please refer to the link Getting Started With Drupal.

Conclusion:-

We hope the information gives you a complete idea of how to Migrate your Drupal 7 site in Drupal 8.

If you get any issue while migrating, you can contact us anytime.

If you get any issue while migrating, you can contact us anytime. Our expert Drupal developers can help you to migrate your website quickly. cmsMinds is headquartered in RTP and worked on many Drupal Development & Drupal migration projects. If you need help migrating or upgrading your website, then drop an email on info@cmsminds.com to schedule a free initial consultation with one of our Drupal experts.

Leave a Reply

avatar
  Subscribe  
Notify of