Skip to main content
Submitted by admin on 11 January 2022

Upgrade approach 

  1. Upgrading using web browser
  2. Upgrading using Drush

1. Upgrading using web browser

Before you start with the migration

It is better to upgrade from a local copy of your site instead of directly from your live site.

Required Migration Modules

  • Migrate: This is the core upgrade API module.
  • Migrate Drupal: This contributed module consists of all the classes that are required for migration/upgrade from Drupal 7 to Drupal 8.
  • Migrate Upgrade: This is the contributed module that provides the user with a simple and easy to use UI for performing the migration from Drupal 7 to Drupal 8.
  • Migrate Drupal UI

It is time to start the actual migration process

  • Make a local copy of your original website.
  • Make a local copy of latest Empty Drupal 8 website by using composer(recommended).
  • Verify that you have the migrate upgrade module
  • Navigate to the Upgrade Path by visiting the /upgrade (http://localhost/D8/web/upgrade   
    • Make sure that access to the database for the old site is available from this new site.
    • If the old site has private files, a copy of its files directory must also be accessible on the host of this new site.
    • Enable all modules on this new site that are enabled on the old site. For example, if the old site uses the Book module, then enable the Book module on this new site so that the existing data can be imported to it.
    • Do not add any content to the new site before upgrading. Any existing content is likely to be overwritten by the upgrade process. See the upgrade preparation guide.
    • Put this site into maintenance mode.
  • Enter the details and Define the source site
  • upgrade
  • Start the migration

2. Upgrading using Drush

Before you start with the migration

Required Migration Modules

  • Migrate Upgrade: Provides Drush support for upgrading from Drupal 6 or 7.
  • Migrate Plus: Provides extensions to core migration framework functionality.
  • Migrate Tools: Provides the Drush commands used later on this page.
     

Define the source database in settings.php

$databases['default']['default'] = [
  'database' => 'drupal8',
  'username' => 'drupal8',
  'password' => 'drupal8',
  'prefix' => '',
  'host' => 'database',
  'port' => '3306',
  'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
  'driver' => 'mysql',
];

$databases['migrate']['default'] = [
  'database' => 'drupal7db',
  'username' => 'drupal7db',
  'password' => 'drupal7db',
  'prefix' => '',
  'host' => 'd7db',
  'port' => '3306',
  'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
  'driver' => 'mysql',
];
...
...
...