Important: The tools mentioned in this article are no longer being actively maintained.
If you're ready to leave your current CMS and move to Contentful – we’re happy to hear that. Excellent choice!
But Contentful is rarely the first content management tools our customers use. Certainly you have tons of content stored in your Wordpress or Drupal or whatever CMS you've been struggling with, and most likely you'd like to keep that content. Also, you wouldn't want to copy it manually, as this would take hours, many hours, many frustrating hours. So – we're here to help.
We've built a set of tools to assist in migrating the existing content from a CMS to Contentful. Our intention is to help you seamlessly shift to Contentful and enjoy all its benefits, whilst spending as little time as possible on setting up and diving in (not too exciting) configuration issues. These tools are:
The Contentful Importer, which title is as straightforward as its purpose: it imports content from appropriately structured JSONs to the Contentful database. To transform your existing content collection to a series of properly structured JSONs, use one of the exporting tools described below.
The Generic Database Exporter enables exporting content from any SQL database, preserving the structure and relationships between entities. This tool helps process the database output to JSON so it can be imported in Contentful. Supported databases are MySQL, Oracle, PostgreSQL, SQLite3, as well and many others.
Anyone comfortable with the command line is skilled enough to use these tools. They are shipped as Ruby gems, making the installation a one-liner (literally). Here is a brief overview of the workflow; the detailed instructions can be found on each tool page.
In a nutshell, you'll have to provide a configuration file to let the importer know where the data is stored, how it is structured and where to upload it. The JSON describing the Contentful content model can be downloaded from the web app. Having prepared all that, you'll import the entries with one command and the assets with another.
If anything goes wrong, the results are captured in the log so you can try solving the problem yourself or provide details when contacting our support. Good thing is, the importer will not copy the same data twice.
The process might be a bit more elaborate, but essentially it comes down to this: set up the overall configuration, describe the new content model, extract the data from the database or the CMS (depending on the data source), map the data to the new content model, create JSONs and pass all of that to the Contentful Importer. See the tool pages for detailed step-by-step instructions.
Importing mediocre content in Contentful doesn't suddenly make it great. If the existing content is poorly structured, if the content is intermingled with styling, or if it's just plain ugly – importing it as is will retain these issues. Kind of obvious, but worth noting. However, our API-focused approach will hopefully push you to reorganize and rework the content so as to make it better from every angle.
Also worth mentioning is the effect of plugins and external modules for open-source CMSs on the database structure. The result is oftentimes dozens, a lot, great many extra tables – which make it much harder to put all the content together. If you find yourself in such a situation, be ready to spend some time on sorting out the content. We'd love to help, but since each bloated database case is different, that's beyond generic tools abilities.
Overall, these export and import tools can't solve all the problems of every content database, but they will prove useful in migrating a solidly structured content collection.