Module to migrate Drupal 8 node images to Drupal 8
Currently this module migrates nodes from all content types in the legacy Drupal 8. If you want to migrate only one content type you have to uncomment the 'node_type' option in migrate_plus.migration.migrate_node_images.yml file and set the content type you want to migrate.
By default this module will migrate the field_image field, but if you want to migrate another image field, you should change the machine-name in these files:
- src/Plugin/migrate/source/Node.php -> line 67.
- config/install/migrate_plus.migration.migrate_node_images.yml -> line 29.
If you don't have it yet, follow the installation instructions here
This command also will install the module dependencies:
- migrate_plus
- migrate_tools
- migrate_drupal
- drupal8_migration_files(*)
(*) This module migrates Files from Drupal 8, you can download it here.
$ drupal module:install drupal8_migration_images
Provide credentials to legacy Drupal 8 database, you will be prompted to specify these information:
- Database type.
- Database host.
- database name.
- Database user.
- Database password.
- Database prefix.
- Database port.
- Local file directory.
$ drupal migrate:setup
You will be prompted to specify the Source site URL and the same information as above in the Setup command.
$ drupal migrate:execute drupal8_files migrate_node_images
You will see confirmation messages like: