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.
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. Content Data: Preserve the entire structure of your Pages and Posts. This includes your valuable written content.
- 2. Routes & Redirects: custom URL routes and redirects—defined in routes.yaml and redirects.yaml—are not included in standard exports and should be backed up manually to preserve site navigation and SEO structure.
- 3. Theme: Secure your website's design and functionality by exporting theme files.
- 4. Images & media: Although not included in the content data export, it is important to manually export your images and media files.
- 5. Export Your Valuable Members: note that members data are not included in the standard content export. You must export it separately from the ‘Members’ section in the admin panel.
1. How to export Content Data from Ghost?
Exporting your content data in Ghost CMS is essential, as it includes all key information stored in your Ghost database, structured in a JSON format. One of the main advantages of this export is that the JSON file can be easily imported into a new Ghost instance, enabling a smooth and efficient site migration.
To export your content data:
- Log into your Ghost Admin panel.
- Access the settings."
- Find Import/Export in left sidebar.
- In Migration tools you click on tab called "Export" -> Export Content
Video of export Content data from Ghost CMS
2. How to export Routes and Redirects from Ghost?
While in the Ghost CMS settings, navigate to the ‘Labs’ section from the left sidebar. To back up your site redirects, click ‘Download current redirects’—this will download a file named redirects.yaml. If you’re using custom routes, click ‘Download current routes.yaml’ to save your routes.yaml file. Both files are essential for preserving custom URL structure and SEO settings during migration or recovery.
Exporting of Routes and Redirect files from Ghost CMS
3. How to export Theme from Ghost?
Exporting your Ghost CMS theme ensures that your website’s design, layout, and custom functionality are safely preserved. This makes it easy to reapply the theme to a new Ghost instance or restore it later as a backup.
To export your Ghost CMS theme files, simply follow these steps:
- Navigate to settings page in your Ghost Admin panel.
- Find and click "Theme" in left-sidebar.
- Click on "Change Theme" in theme card.
- Click on "Installed" in left top corner and find your active theme.
- Click on 3 dots to download your theme, it might take some time.
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’ve created a backup file named ghost-files.zip, which contains all folders with images and uploaded files from your Ghost CMS instance. You can store this file in external cloud storage or download it to your local machine via SSH for safekeeping.
If you’re migrating to a new Ghost instance, unzip the archive and copy its contents into the content/ directory of the new installation. Note that file permissions and ownership may not transfer correctly, so you may need to recursively update the user and group permissions on the content/ folder after the migration.
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
5. How to Export Your Valuable Members Data in Ghost CMS?
This is a critical step—skipping it could result in the loss of all your subscriber data. To export your members in Ghost CMS, go to the ‘Members’ section in the admin panel, click the gear icon in the top-right corner, and select ‘Export all members’. Ghost will generate whole members database as CSV file and download it on your disk.
Exporting Memebers from Ghost CMS
This article covered the essential steps for backing up critical files and settings from your Ghost website. We explored how to export content data, routes and redirects files, theme files, images and media, and member data—key components for both backup and Ghost website migration.
If you need further assistance with your Ghost website, don’t hesitate to contact us. We’re here to support you every step of the way.