If you're a Drupal site builder, you've probably heard about how you can migrate your content into Drupal using the Migrate module. But you might have assumed that migrating content is the 'developer's job': a long and arduous task best avoided.
As site builders, we're often responsible for setting up the information architecture of a Drupal site, and testing that the content provided fits into this architecture. We start most Drupal projects by looking at content: What content needs to be displayed on the website? How does it need to be organized? What's the content strategy? Site builders often become content experts, and are in a great position to inform the migration process. By learning about the migration process, we can make better site building decisions.
This session will provide an introduction to Drupal's Migrate module for site builders. No experience developing modules required. We'll look at how to get your content into Drupal, from another Drupal site or from an external CSV file. We'll also see how to line up your migration with Drupal’s configuration components.
7. Migration Methods
• Migrate content by hand
• Feeds module
• Realistic dummy content module
• Create a custom migration script
• Migrate module
8. Migration Methods
• Migrate content by hand
• Feeds module
• Realistic dummy content module
• Create a custom migration script
• Migrate module
• Best practice for site building
• Streamlines content creation
• Useful for a lot of Drupal projects
9. When to Use Migrate
Use cases for migrating data
Upgrading an Old Site Populating a websiteUsing 3rd Party Data
11. Why use Migrate for
Populating New Content?
• Allows you to do content creation/editing and
site building in parallel
• Give clients more control/responsibility over
content
• Start working with real content sooner
• No master database, content is
independent from configuration
12. How Migrate Works
• Gets content from various sources
• Creates different types of content in Drupal
(nodes, taxonomy terms, users)
• Easy to test, ‘rollback’, and try again
• Write some simple code for each migration
13. What you need to know to
use Migrate
• Site Building (how content types work)
• Love working with and testing content
• Not scared to put together a simple module
16. What You Need
Custom Module (for the demo):
bit.ly/migrate-programs
Program Content Type (import using bundle copy)
bit.ly/program-content-type
Contrib Modules:
• migrate
• views
• bundle_copy
17. Basic steps
1. Preparing your source content (CSV file)
2. Preparing the site
3. Create your migrate module
4. Run the migrations
5. Testing and iterating
19. What do you need?
• Destination:
• Put your content types in place
• Source:
• CSV file
• Each column corresponds to a field, setting,
or field property
• Multi-value fields, separate with a comma
42. Testing and Iterating
• Use Views to create a table of content to test
the results
• Test a random sampling of content
• Rollback the migrations and try again
44. What to Check for
• Missing fields that are required
• Images that are the wrong size
• Values for select fields that don’t match
allowed values
• Text that is too long or too short for the
design
• Duplicate titles that make finding content
difficult
• Missing data because the ‘unique ID’ is not
unique
49. Other field types
• Files work just like images
• Links have a ‘title’ and ‘url’ attribute
• Entity reference fields can point to another
migration
• Use Migrate Extras for other field types
59. Drupal 8 Migrate
• Migrate and Migrate Drupal core modules
• No need to create content types
• Works with content and configuration
• Currently works for D6 to D8, D7 to D8 in progress
• No more upgrading using update.php
• You can create manifest.yml to define a migration
• Migrate Upgrade module (contrib) provides a UI
for Drupal to Drupal migrations
https://www.drupal.org/node/2350521