4. DrupalDevDays Montpellier 2015 Léon Cros @chipway
Migration to Drupal 8: Introduction
● How will we migrate an existing website to
Drupal8?
● What is the state of migration tools?
● How to test & contribute to migration
improvement
● Experience level: Beginner
5. DrupalDevDays Montpellier 2015 Léon Cros @chipway
What migration do we speak about?
Pull → (process/prepare) → Create → Store
● Settings
● Users
● Taxonomies
● Menus
● Entity Bundles
● Content Data
6. DrupalDevDays Montpellier 2015 Léon Cros @chipway
What migration do we speak about?
Pull → (process/prepare) → Create → Store
● Settings
● Users
● Taxonomies
● Menus
● Entity Bundles
● Content Data
Drupal 8
Migrate
Credit : http://www.odbco.com/products/lct650b.htm
7. DrupalDevDays Montpellier 2015 Léon Cros @chipway
Want to hear about module migration?
● Rewriting Contributed Modules for Drupal 8
● Kevin Kaland
● Friday 10:30-11:20
● Amphitheater 2
9. DrupalDevDays Montpellier 2015 Léon Cros @chipway
Old deprecated way
● Update.php script
● Overwrite D6 web site / update-in-place / dev copy
● One BIG shot script
● Retry from scratch
● Update.php kept for minor upgrades only
● Php <> D6 to D8 & Drush <> D6 to D8
+
14. DrupalDevDays Montpellier 2015 Léon Cros @chipway
Migrate to 8 paths: D6 → D8
● Skip core versions
● D6 → D8
● Priority for migration
● End of D6 official support
● Support extended for some months?
16. DrupalDevDays Montpellier 2015 Léon Cros @chipway
Migrate to 8 paths: D8 → D8
● Use cases?
● Repair/Rescue a broken site
● Early D8 websites
● Refactor a website
● Change structures
● New site
● Minor version upgrades use update.php
● 8.0.x to 8.0.y
17. DrupalDevDays Montpellier 2015 Léon Cros @chipway
Migrate to 8.0.0 will support
● all core components
● Included in D8 core
● From D6 contribs to D8 core
● Configuration ; variables, settings → CMI
● Cck
– Content types
– Cck core Fields + link field [issue?]
● Users
● Vocabularies & Terms
● Nodes
● Multilingual from i18n
– Node translation → entity translation
– Count language source nodes before!
● ~ 100 migrate templates
19. DrupalDevDays Montpellier 2015 Léon Cros @chipway
Migrate: Workflow/sequence
● Clean up your D6 web site
● Disabled modules + uninstall
● Deprecated contents
● Garbage in garbage out
● On fresh D8
● Enable all modules with target data
● It will accept disabled modules data from D6
● Migrate to Drupal 8
● (Refactor/improve your D8 site then)
20. DrupalDevDays Montpellier 2015 Léon Cros @chipway
Migrate: how to do ?
● A new Drupal 8 fresh install, with
● Access to old DataBase
● Access to old files
● A theme with target regions
● migrate_upgrade contrib module (UI)
● Enable all needed modules on D8 install
● Check all those ever used on D6
● Enable your own/contrib modules [create plugins]
● Enable migrate + migrate_drupal + migrate_upgrade
● Type-in Drupal upgrade source site information
● DB user+pw
● Http URL of public files to migrate
● private files filesystem path
● Click « Perform upgrade »
21. DrupalDevDays Montpellier 2015 Léon Cros @chipway
Processing order
● Replicate Configuration
● Settings
● Content types/Entity bundles + Fields
● Import content
● Load one row at a time
● PrepareRow hook => Here you can change it !
● Save
● Watchdog
22. DrupalDevDays Montpellier 2015 Léon Cros @chipway
Drush or UI ?
● Now use UI to test it [all migration]
● Drush commands available
● Some or all migrations
● Use drush to rebuild your fresh D8 site
23. DrupalDevDays Montpellier 2015 Léon Cros @chipway
How to customize?
● Drush
● Manifest file(s) lists migrations to run
● Can't use manifest file from UI
● Hook PrepareRow
● Drop deprecated contents/config from D6 install
● Clean up texts or content issues
● Convert
● Populate new fields with default/computed values
● Move block in a new region
25. DrupalDevDays Montpellier 2015 Léon Cros @chipway
Create a plugin
● Build your own handler for your custom entities
● Plugins are awesome
● File with a migration class
● In a special folder of your module
● Custom/src/Plugin/migrate/… => update name in comment
● Place your plugin in your module
● With configuration file for your migration
● Or change configuration for existings migrations [CMI]
● Process plugins to change things + chainable
● Copy/rename from Core
● core/modules/migrate/src/Plugin/migrate/
● Annotation in comments
● Try by building a custom block
– ../source/blocks/
Migrate API in Drupal 8
https://www.drupal.org/node/2127611
26. DrupalDevDays Montpellier 2015 Léon Cros @chipway
Drush useful commands
● drush config-list | grep migrate
● List all available templates
● drush si standard --db-url=mysql://[db_user]:
[db_pass]@localhost/[db_name] --site-
name=[site_name] --account-name=[user_name]
--account-pass=[user_pass] --account-
mail=[user_mail] --locale=fr
● drush migrate-manifest MyManifest.yml --legacy-db-
url=mysql://D6user:D6pw@localhost/D6db
27. DrupalDevDays Montpellier 2015 Léon Cros @chipway
Status of migrate
● Migrate + migrate_drupal in core
● D6 → D8
● D7 → D8 : templates needed → help
● D8 → D8 : templates needed → help
● Source plugins
● Rollbacks ? (now reinstall, build & distroy CI) → migrate_plus
● Incremental migration? → migrate_plus
● Views to rebuild
● Roadmap : [META] node/2456261
● Be ready to re-migrate with new Core version :(
28. DrupalDevDays Montpellier 2015 Léon Cros @chipway
State of migrate in core
● Things that work
● Migrate
● D6 → D8 path
● Let's test in real life
● Multilingual support → test
● Still needs work
● migrate_drupal D7
● migrate_upgrade [Ui] → core 8.1
● Documentation / contrib modules upgrade
● TESTING
29. DrupalDevDays Montpellier 2015 Léon Cros @chipway
Schedule
● 8.0.0
● API in core
● contrib UI
● 8.1.x
● Official Migration path to D8 with UI
30. DrupalDevDays Montpellier 2015 Léon Cros @chipway
How to contribute : Info
● Join https://groups.drupal.org/imp
● drupal.org/node/2456261
● [META] Finalize the Migration system
● IRC : #drupal-migrate
● Drupal.org/irc
● Migrate API in Drupal 8
● https://www.drupal.org/node/2127611
● Weekly G+ hangout for progress updates at 01:00am Paris every
wednesday [9pm EST (-05:00)]
● If you begin:
● https://www.drupal.org/getting-involved
31. DrupalDevDays Montpellier 2015 Léon Cros @chipway
How to contribute : What to do?
● Create plugins for your contrib/custom modules
● Create templates for D7, D8
● Test
● No technical skills needed
● Come with your D6 sites
● Test D6 → D8 on simple sites
● Test D6 → D8 on multilingual sites
● Test D6 → D8 on comprehensive sites
● Test D6 → D8 on complex/risky sites [upraded multiple times]
● Sprint here
● http://montpellier2015.drupaldays.org/sprints
● Report !, Report !, Give feedback !
32. DrupalDevDays Montpellier 2015 Léon Cros @chipway
How to contribute : Report
● Report running cases
● Report issues : D6 migration in Core issues
– (Drupal.org user)
– https://drupal.org/project/issues/drupal
– Select component = migration system
● Report
● Smal bugs
● Data integrity
● migrate_upgrade problems
● Coders
● Report and submit patches
33. DrupalDevDays Montpellier 2015 Léon Cros @chipway
Congrats and credits
● Ben Dougherty (benjy) maintainer
● Károly Négyesi (chx)
● Ryan Weal (ryan weal)
● Mike Ryan (mikeryan)
● Brent Dunn (bdone)
● Christian Lopez Espinola (penyaskito)
● Melissa Anderson (eliza411)
● Mickael Anello (ultimike)
● Bohjan Somers (bojhan)
● Moshe Weitzman (moshe weitzman)
● Many more...
● Next: Yourself!
34. Thank you for attending
Questions?
@chipway_en
@chipway
Feedbacks?
Slides on:
http://fr.slideshare.net/chipway/ConferenceMigrateToDrupal8DrupalDevDays2015