-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.txt
58 lines (42 loc) · 1.65 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Introduction:
This module provides sample code to migrate data from non-drupal mysql database
to Drupal 8 database.
Steps for that are mentioned below:
Step-1:
Go to material folder and import database on your system. You can import it
using PHPMyadmin or similar tools.
Database name will be "migrate-source"
It contains one table "pages" with related data.
Step-2:
Now enable "migrate_example_mysql_setup" module.
This provides basic required fields for page content type.
drush en migrate_example_mysql_setup
Step-3:
Now enable "migrate_example_mysql" module.
Step-4:
Update your settings.php file so that it tries to connect to other mysql
(source) database.
Add below snippet:
$databases['db_migration']['default'] = array(
'database' => 'migrate-source',
'username' => 'username_here',
'password' => 'password_here',
'prefix' => '',
'host' => 'localhost',
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
);
User name and password may vary as per your mysql's settings.
Step-5:
Go to terminal and your project (Drupal8) folder.
Run command "drush migrate-status"
It should list migration related to "Demo" group.
If connection is successful it should show below output.
Group: MySql Demo imports (demo) Status Total Imported Unprocessed Last imported
pages Idle 2 0 2
Step-6:
Run migrate import command.
drush mi --group=demo
Step-7:
Visit admin/content on your drupal 8 site and you should see migrated content.