Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How to Migrate Legacy Content to Craft Without Losing Your Sanity

James Greig
September 28, 2018

How to Migrate Legacy Content to Craft Without Losing Your Sanity

Importing existing content from another CMS is often a crucial step in a Craft project, but it can be a painful process.

What’s the best way to shape the content before you migrate it? What tools can you use to make the job easier? And what should you do if you get stuck?

This talk will help you to create a content migration workflow that makes sense for your needs and skillsets, and avoid some of the common pitfalls of content migration.

We’ll also explore methods for automagically importing content from the likes of Airtable via their API.

James Greig

September 28, 2018
Tweet

Other Decks in Programming

Transcript

  1. Like moving to a new house, except it takes longer,

    it’s more emotional, and it’s a lot more expensive... SETH GODIN ON MOVING FROM TYPEPAD TO WORDPRESS
  2. Contribute 2002–2003 Flash 2003–2006 Wordpress 2006-2016 Wordpress 2006–2014 2014–17 Craft

    :) 2017– Squarespace Shopify Jekyll Macromedia Anything… Help me!
  3. STIR FRY Choose recipe Assemble ingredients Chop ingredients Cook! (And

    enjoy) CONTENT MIGRATION Choose recipe Assemble content Chop content Migrate! (And enjoy)
  4. Choose recipe Assemble ingredients Chop ingredients Cook! (And enjoy) Choose

    recipe Assemble content Chop content Migrate! (And enjoy) THE HARD PART THE RELATIVELY EASY PART STIR FRY CONTENT MIGRATION
  5. Connect to external MySQL/Postgres databases and manipulate them in Twig.

    Connect Use the Guzzle HTTP client in Craft templates (handy for APIs). Fetch Import content and settings. Generate fake data (and remove it when done). Sprout Import XML/RSS/CSV/JSON to entries, categories, products and more. Feed Me (Pro) Use GatherContent to collect and organise your website content. GatherContent Some handy plugins for content migrations IMPORTING CONTENT CONTROL PANEL Inspect field handles and quickly edit field settings. (Must have!) CP Field Inspect Create plain text fields that are disabled, hidden or read-only. Incognito Field Edit multiple things (entries, assets, categories) without going back & forth Sequential Edit Quicker management and replication of fields and field groups. Field Manager MOVING CONTENT Quickly create migrations for settings (fields/sections/sites) and content. Migration Manager Generate content models from JSON data. Architect OTHER Intelligently redirect legacy URLs. Retour Integrates the Disqus commenting system into Craft 3 websites. Disqus Seamless legacy authentication - import WP/EE/BC users and more. Legacy Login * * these are all links
  6. UGH

  7. Don’t forget to import existing CMS admins TIP Legacy Login

    Top Shelf Craft Migrate users from: ExpressionEngine 2.x WordPress BigCommerce (self-hosted) Wellspring
  8. Comments can be migrated too TIP Craft Disqus nystudio107 Integrates

    the Disqus commenting system into Craft 3 websites, including Single Sign On and custom login/logout URLs.
  9. 1. LEGACY CMS WITH POSTGRES DATABASE 2. CRAFT CONNECT PLUGIN

    Connect to external mysql/psql databases, then perform db queries in your Craft Twig templates 3. JSON FEED OF ENTRIES 4. FEED ME PLUGIN 5. HAPPINESS
  10. Can't make it work exactly how you want? Use a

    simpler template for legacy content. TIP
  11. LEGACY TEMPLATE A single rich-text field, and a single assets

    field NEW TEMPLATE Matrix field with content blocks
  12. Twitter → Zapier → Airtable → JSON → Feed Me

    → Craft Give me some #dotall2018 tweets (with emoji plz )
  13. Twitter → Zapier → Airtable → JSON → Feed Me

    → Craft SHELL SCRIPT TO CREATE JSON VIA AIRTABLE API & RUN FEEDME
  14. Twitter → Zapier → Airtable → JSON → Feed Me

    → Craft CRON JOB RUNNING EVERY MINUTE ON SERVER TO TRIGGER SHELL SCRIPT
  15. Twitter → Zapier → Airtable → JSON → Feed Me

    → Craft INVITE PEOPLE TO TWEET WITH #DOTALL2018 AT THIS POINT TODO: FRONTEND TEMPLATE WITH AJAX AUTO-LOADING
 (IF TIME!)
  16. 1. A good content migration is like
 cooking a stir

    fry 2. Start with a site audit. 3. Not just about core content,
 users and comments can come too. 4. Don’t be a hero!
 (Do it manually if you have to) 5. Chop off what you don’t need. 6. If you get stuck, use a simpler
 template for legacy content. 7. Use a scraping tool if you don’t
 have access to the current CMS. 8. Improve SEO whilst you go. Content migrations
 don’t have to
 be a PITA.
  17. Content migrations
 don’t have to
 be a PITA. Have fun,


    and embrace
 the learning opportunity.