Create a free account to get access to additional free training videos. Enjoy this free video from CraftQuest! Create a free account to get access to additional free training videos. Join the Community

Migrating a Website to Craft CMS

Exporting Data into an Importable Format

We continue with a discussion of strategies for getting data out of Craft. We'll handle each situation in a separate, hands-on video but first let's talk about planning and strategy.

Now that we’ve set up Feed Me as our import tool, let’s focus on prepar­ing our source data for migra­tion into Craft CMS. Our goal is to for­mat the data in a way that Feed Me can accept.

Feed Me sup­ports sev­er­al formats:

  • JSON
  • XML
  • CSV
  • RSS
  • Atom
  • Google Spread­sheets

These for­mats can be accessed via a file on disk or through an API.

Export­ing data depends on the source CMS:

  1. Word­Press:

    • Use the built-in WP JSON API (rec­om­mend­ed for cur­rent versions)
    • WP All Export plu­g­in (exports to XML)
  2. Expres­sion Engine:

    • Use the tem­plate pro­vid­ed by Feed Me (may need tweak­ing based on your EE version)
  3. Spread­sheets:

    • Export as CSV
    • Use Google Sheets sup­port in Feed Me
  4. Oth­er sources:

    • Cus­tomize exist­ing RSS or Atom feeds
    • Cre­ate a cus­tom feed for migration
    • Devel­op cus­tom mid­dle­ware (e.g., using Lar­avel) to export JSON

Key ques­tions to ask:

  1. Does the exist­ing sys­tem have a JSON API available?
  2. Can we eas­i­ly export data in a for­mat Feed Me accepts?

If you’re los­ing access to the old data­base, request a JSON out­put accord­ing to your spec­i­fi­ca­tions from the data­base admin­is­tra­tor. Test this out­put with Feed Me to iden­ti­fy any nec­es­sary adjustments.

Data Inter­change For­mats: These are mid­dle for­mats that many sys­tems can process, typ­i­cal­ly in ASCII or plain text. They fol­low struc­ture con­ven­tions that tools can eas­i­ly out­put and import. JSON and XML are com­mon examples.

It’s not unusu­al for peo­ple to have data in spread­sheets as a edit­ing tool and import data from the spread­sheet. You can export the data as a CSV and import it, or use the Google Sheet sup­port in FeedMe.

If no export tools are avail­able (e.g., for a cus­tom CMS), you may need to access the exist­ing system’s data­base and cre­ate your own export using cus­tom middleware.

In the upcom­ing videos, we’ll cover:

  1. Migrat­ing data from Word­Press to Craft using the WP JSON API
  2. Export­ing data as XML
  3. Writ­ing cus­tom middleware
  4. Work­ing with Expres­sion Engine data

Next, we’ll start hands-on migra­tion from Word­Press to Craft. Stay tuned!

Migrating a Website to Craft CMS is made up of the following videos: