How to Import Pages (not Posts) between Ghost instances

I’m trying to import Page content (not just Posts) from an production Ghost instance (on 4.15.1 at the moment) into a local Ghost instance (on 4.16) for theme development. Both the running instance and local instance have similarly named pages.

From looking at the documentation, the export process will export the page data, but the importer (either via the ghost admin panel or via ghost-cli) seemingly only imports ‘Posts’, not Pages. Is that correct? Is there a workaround (e.g. delete all content on the local instance, or migrate the whole db?)

The importer used by the CLI and Admin are the same thing :slight_smile:

As far as I’m aware, the importer should import both posts and pages. Have you tried importing your export into your local Ghost instance?

Thanks for the quick response - Yes, already tried importing. I’m thinking it might be avoiding the import of Pages because the local instance already has Pages with the same name (no warning is thrown about this).

Since you’re trying to replicate your production instance locally, can you try (as you suggested) to delete all content and import again?

Yep, deleting the db and importing again did what I wanted (and didn’t remove the content folder’s images which was a concern), thanks!

Filed a small request to report warnings around this here: Importer: Report warning if Page/Post wasn't imported

Not sure if you have had a look, but this tool for moving content around can be helpful GitHub - TryGhost/migrate

1 Like

I did this recently (edited the Pages on a Staging site and then imported into a Production site) and found it a little mysterious too. It worked… but didn’t seem to at first. I think I had to delete the originals by the same name to get the imported versions to appear, or something to that effect.