Exporting your Ghost CMS for migration or backup.

Gain expertise in exporting valuable data from Ghost CMS with our comprehensive guide. Delve into the intricacies of content, routes, redirects, and themes to ensure a seamless migration or establish robust backups. Seize control of your Ghost CMS data to drive exponential growth for your website.

3 min read

In this article, we will walk you through the process of exporting your valuable data from Ghost CMS. Whether you're considering backups or planning to migrate from one Ghost instance to another, these steps are crucial for a smooth transition:

Exporting Essential Components:

  1. 1. Content Data: Preserve the entire structure of your Pages and Posts. This includes your valuable written content.
  2. 2. Routes & Redirects: Custom URL routes defined for your instance and custom redirects from one URL to another for your Ghost instance.
  3. 3. Theme: Secure your website's design and functionality by exporting theme files.
  4. 4. Images & media: Although not included in the content data export, it is important to manually export your images and media files.

1. How to export Content Data from Ghost?

When it comes to Ghost CMS, exporting your content data is of utmost importance, because these data contains all your valuable information saved in the Ghost database, structured in a JSON format. The great advantage is that this JSON file can be seamlessly uploaded into a new Ghost instance, ensuring a smooth transition.

To export your content data:

  1. Log into your Ghost Admin panel.
  2. Access the Labs view and click on "Export."
  3. Download the generated .json file that contains your content data.
Video of export Content data from Ghost CMS

2. How to export Routes and Redirects from Ghost?

Staying on the Labs page, click Download current redirects to get your redirects file. This will be called redirects.yaml (or redirects.json depending on your Ghost version). If you’re using custom routes, click Download current routes.yaml to get your routes.yaml file.

Exporting of Routes and Redirect files from Ghost CMS

3. How to export Theme from Ghost?

By exporting your theme, you ensure that the design and functionality of your website are preserved. This allows for seamless integration of your theme into a new Ghost instance or serves as a backup for future use.

To export your Ghost CMS theme files, simply follow these steps:

  1. Access the "Design" settings page in your Ghost Admin panel.
  2. Navigate to the "Change theme", in left bottom corner.
  3. Click on "Advance" button in right top corner.
  4. Locate the "Active" label next to your current theme and click on the Download button next to it.
  5. Ghost CMS will then generate a .zip file containing all your theme files.
Ghost CMS - theme export

4. How to export images & media files from Ghost CMS?

The export process can be a bit challenging with Ghost since it doesn't currently offer a built-in feature in the admin panel for easy exporting. However, the solution varies depending on whether you're a Ghost (Pro) user or self-hosting on your own servers. If you're a Ghost (Pro) user, the official method is to contact the Ghost team support and request them to handle the export for you. For self-hosters, the process involves logging into our servers and working with the terminal.

When you are logged-in your server navigate into your Ghost installation, it is usually in /var/www/ghost/content and zip all necessary folders.

zip -r ghost-files.zip images/ files/ media/

We have created a file called ghost-files.zip, which includes all the folders containing images and files from our Ghost instance. You can save this file for backup purposes. If you need to migrate to a new Ghost instance, simply unzip the folder and copy the contents into the 'content/' folder of the new instance.

To adjust the owner and group settings of the copied folders, navigate to your new Ghost instance directory. Make sure you are at the level above the 'content' folder, such as /var/www/ghost-new/ and execute following command:

sudo chown -R ghost:ghost content

The migration of files and images should now be complete. Please restart your Ghost instance to ensure everything is up and running smoothly.

ghost restart


This article covered the essential steps to back up crucial files and settings from your Ghost website. We explored the process of exporting Content data, Routes and Redirects files, theme files, and Images with media files. While these are the critical components for backups and Ghost website migration, it's important to note that there are additional elements that can be exported, such as member lists or analytics data.

If you require assistance with your Ghost website, please feel free to reach out to us. We're here to help.

Hello 👋

If you have any questions or need help with your project, please don't hesitate to contact us!

 
 
 
 
CZ
EN
EN