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

How to Migrate Legacy Content to Craft Without Losing Your Sanity

Aa9b6ae5e90d1759aa1979b782275f33?s=47 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.

Aa9b6ae5e90d1759aa1979b782275f33?s=128

James Greig

September 28, 2018
Tweet

Transcript

  1. !1 @graphicalhouse

  2. Legacy CMS

  3. Custom CMS

  4. ‣Old/unruly technology ‣Broken images ‣Weird text formatting ‣Misformed URLs ‣Frustrated

    clients ‣Shonky SEO
  5. 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
  6. How to Migrate
 Legacy Content to Craft CMS WITHOUT LOSING

    YOUR SANITY @j_greig greig.cc
  7. ich bin nicht super technisch

  8. Designer Developer Content Strategist Information Architect

  9. Designer Developer Content Strategist Information Architect “I make websites”

  10. Contribute 2002–2003 Flash 2003–2006 Wordpress 2006-2016 Wordpress 2006–2014 2014–17 Craft

    :) 2017– Squarespace Shopify Jekyll Macromedia Anything… Help me!
  11. OBLIGATORY CAT PHOTO

  12. Done right, website migrations are like cooking a good stir-fry

    Lernert & Sander
  13. STIR FRY Choose recipe Assemble ingredients Chop ingredients Cook! (And

    enjoy) CONTENT MIGRATION Choose recipe Assemble content Chop content Migrate! (And enjoy)
  14. 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
  15. trends.builtwith.com/cms/Craft/Market-Share Where
 from?

  16. 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
  17. THREE MIGRATION STORIES

  18. WORDPRESS MIGRATION STORY 1

  19. UGH

  20. Start with a
 site audit ‣ Structure ‣ Content ‣

    Functionality TIP
  21. EXPORT USING WP ALL EXPORT

  22. POSTS XML

  23. FEED ME SETUP

  24. END RESULT = ENTRIES IN CRAFT

  25. 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
  26. 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.
  27. CUSTOM CMS
 MIGRATION @joselong STORY 2

  28. 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
  29. Don't be a hero! (sometimes it's faster to do it

    manually) TIP
  30. Chop off what you don't need TIP FOR EXAMPLE: CMS-GENERATED


    IMAGE VARIATIONS IN S3 BUCKET
  31. Can't make it work exactly how you want? Use a

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

    field
  33. LEGACY TEMPLATE A single rich-text field, and a single assets

    field NEW TEMPLATE Matrix field with content blocks
  34. Don’t miss the opportunity to improve SEO TIP dotall.com/sessions/seo-best-practices-from-a-developers-point-of-view

  35. HANDS-FREE
 MIGRATION STORY 3

  36. HANDS-FREE
 MIGRATION STORY 3

  37. Don't have access to the current CMS? Use a scraping

    tool. TIP
  38. Don't have access to the current CMS? Use a scraping

    tool. TIP
  39. None
  40. None
  41. 2. JSON FEED 1. PARSEHUB SCRAPE 3. FEED ME PLUGIN

    4. EVEN HAPPIER LAGER
  42. Now for something “fun”

  43. Now for something “fun” Twitter Airtable JSON Craft ZAPIER .SH

    SCRIPT & CRONJOB FEED ME
  44. Twitter → Zapier → Airtable → JSON → Feed Me

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

    → Craft
  46. https://airtable.com/invite/r/cvOfNOTz Twitter → Zapier → Airtable → JSON → Feed

    Me → Craft Not bad...
  47. Twitter → Zapier → Airtable → JSON → Feed Me

    → Craft Better :)
  48. Twitter → Zapier → Airtable → JSON → Feed Me

    → Craft Better :)
  49. getpostman.com Twitter → Zapier → Airtable → JSON → Feed

    Me → Craft
  50. getpostman.com v SHELL SCRIPT TO CREATE JSON VIA AIRTABLE API

  51. Twitter → Zapier → Airtable → JSON → Feed Me

    → Craft
  52. Twitter → Zapier → Airtable → JSON → Feed Me

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

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

    → Craft
  55. 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!)
  56. Airtable JSON Craft AIRTABLE API FEED ME BUT HOW COULD

    YOU USE THIS IN REAL LIFE?
  57. Airtable JSON AIRTABLE API BUT HOW COULD YOU USE THIS

    IN REAL LIFE?
  58. Airtable JSON Craft AIRTABLE API FEED ME BUT HOW COULD

    YOU USE THIS IN REAL LIFE?
  59. Content migrations
 don’t have to
 be a PITA.

  60. 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.
  61. Content migrations
 don’t have to
 be a PITA. Have fun,


    and embrace
 the learning opportunity.
  62. Least-worst CMS

  63. Thank y all @j_greig greig.cc @graphicalhouse graphicalhouse.co.uk