Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Content migration - CSV to Drupal 8

3,832 views

Published on

Leveraging the migrate module for migrating content into Drupal 8 from CSV files

Published in: Software

Content migration - CSV to Drupal 8

  1. 1. Content Migration: CSV to Drupal 8 Hector Iribarne @hectoriribarne Track: Development & Performance Level: Intermediate
  2. 2. @hectoriribarne Hector Iribarne (iribarne.com) Drupal Site Builder & Developer (since 2007) Broward Drupal co-founder iribarne on Drupal.org and IRC Contributed Contentin and Contentout modules (D7 sandbox modules) #FLDC16
  3. 3. #FLDC16@hectoriribarne Main Topics Demo migrating content into D8 from a CSV file Demo migrating users into D8 from a CSV file Let’s look at some D8 code!
  4. 4. Basics: Migrating Content CSV into Drupal 8 @hectoriribarne #FLDC16
  5. 5. @hectoriribarne #FLDC16 Drupal 8 - Migrating from a CSV source - Basics : ● Drupal 8 contrib migrate modules: ○ Migrate Plus ○ Migrate Tools ○ Migrate Source CSV ● Great example (reference for this presentation) on migrating content into Drupal 8 from Lucas Hedding, the maintainer of the Migrate Source CSV module: https://github. com/heddn/d8_custom_migrate
  6. 6. @hectoriribarne DB from Site 1 (D7) CSV file (users) [(h)header, (c)content] Site 2 (D8) Site 1 (D7) CSV to Drupal 8 Content/User Migration: Contentout (One-click to generate CSV file from Site 1) d8_migr8_csv2pages 1 2 Legend: (h) header (c) content Sandbox module Custom modules Demo number #FLDC16 Presentation in one slide 1 h c c c CSV file (pages) [(h)header, (c)content] h c c c migr8_users SQL query (generate CSV file from Site 1 DB) SELECT FROM WHERE
  7. 7. Demo 1: CSV content into D8 @hectoriribarne #FLDC16
  8. 8. Demo 2: CSV users into D8 @hectoriribarne #FLDC16
  9. 9. What we covered in both demos @hectoriribarne #FLDC16
  10. 10. @hectoriribarne #FLDC16 Drupal 7 content to export:
  11. 11. @hectoriribarne #FLDC16 Create CSV file in Drupal 7 using Contentout:
  12. 12. @hectoriribarne #FLDC16 Pages.csv file:
  13. 13. @hectoriribarne #FLDC16 Import CSV content into Drupal 8:
  14. 14. @hectoriribarne #FLDC16 Voila! Content migrated to D8:
  15. 15. @hectoriribarne #FLDC16 Drupal 7 users to export:
  16. 16. @hectoriribarne #FLDC16 SQL query for users:
  17. 17. @hectoriribarne #FLDC16 qb_users.csv file:
  18. 18. @hectoriribarne #FLDC16 Import CSV users into Drupal 8:
  19. 19. @hectoriribarne #FLDC16 Voila! Users migrated to D8:
  20. 20. Let’s look at some code!!! @hectoriribarne #FLDC16
  21. 21. @hectoriribarne #FLDC16 Links: ● Code/files: CSV to D8 Migration ○ http://browarddrupal.org/PastMeetings/february-2016 ● Contentout sandbox module ○ https://www.drupal.org/sandbox/iribarne/2461613 ○ git clone --branch 7.x-1.x http://git.drupal.org/sandbox/iribarne/2461613.git contentout ● Content Migration: CSV to Drupal 7 ○ http://www.slideshare.net/hectoriribarne/drupal-camp-atlanta-2015-no-code-content- migration
  22. 22. Questions? Hector Iribarne @hectoriribarne
  23. 23. http://browarddrupal.org/contact If you liked my presentation, follow me on Twitter: @hectoriribarne Go Fish:Details: Hector Iribarne d.o. username: iribarne http://certifiedtorock.com/u/192646 #FLDC16

×