Developer Migration Docs
If no export tools exist for your current blogging system you’ll need to create one that generates a JSON file as described here. There is a full example at the end of this file. Please note that your final JSON file should have no comments in the final format. Those are only included here for readability and explanatory purposes.
JSON file structure
First and foremost, your JSON file must contain valid JSON. You can test your file is valid using the JSONLint online tool.
The file structure can optionally be wrapped in:
Both with and without are valid Ghost JSON files. But you must include a meta
and a data
object.
The meta object
The meta
block expects two keys, exported_on
and version
. exported_on
should be an epoch timestamp in milliseconds, version should be the Ghost version the import is valid for.
The data block
Ghost’s JSON format mirrors the underlying database structure, rather than the API, as it allows you to override fields that the API would ignore.
The data block contains all of the individual post, tag, and user resources that you want to import into your site, as well as the relationships between all of these resources. Each item that you include should be an array of objects.
Relationships can be defined between posts and tags, posts and users (authors) and between users and their roles.
IDs inside the file are relative to the file only, so if you have a post
with id: 1
and a posts_tags
object which references post_id: 1
, then those two things will be linked, but they do not relate to the post
with id: 1
in your database.