How to back up / migrate your homepage template in Shopify
Learn how to properly backup your Shopify homepage template before making major modifications or preparing for timed releases.

Backing up your homepage template is something that should be standard practice, especially when you’re about to make major modifications or preparing for timed releases. In this guide, I’ll walk you through the exact steps to safely backup and migrate your Shopify homepage template.
Why Backup Your Homepage Template?
Before diving into the how-to, let’s understand why this is crucial:
- Safety net: Easily revert changes if something goes wrong
- Version control: Keep track of different design iterations
- Timed releases: Prepare seasonal or promotional homepages in advance
- Testing: Experiment without affecting your live store
Step-by-Step Guide
Step 1: Access Your Theme Editor
Navigate to your Shopify admin panel and go to the themes area:
- From your Shopify admin, go to Online Store > Themes
- Find the theme you want to work with
- Click the three dots (⋯) next to the “Customize” button
- Select Edit code
Step 2: Create a New Template
Once you’re in the code editor:
- Look for the “Add a new template” option in the left sidebar
- Click on it to create a new template
- Choose the template type (product, page, collection, etc.)
- Give it a descriptive name like
homepage-backup-2024-05-04
Step 3: Locate Your Homepage File
Your homepage content is stored in a specific file:
- Use the search bar in the top left corner of the code editor
- Search for
index
- You’ll find a file named
index.json
in the templates folder - This file contains all your homepage section configurations
Step 4: Copy the Homepage Code
Now for the actual backup:
- Click on
index.json
to open it - Select all the code (Ctrl+A or Cmd+A)
- Copy it to your clipboard (Ctrl+C or Cmd+C)
Step 5: Save Your Backup
Paste the code into your new template:
- Open the template file you created in Step 2
- Paste all the code from index.json
- Click Save to store your backup
Step 6: Assign the Template (Optional)
If you want to test your backup or use it for a specific page:
- Go to Online Store > Pages
- Select or create a page
- In the page settings, look for “Theme template”
- Select your newly created backup template from the dropdown
Pro Tips
Naming Conventions
Use descriptive names that include:
- Purpose (backup, seasonal, test)
- Date (YYYY-MM-DD format)
- Version number if applicable
Example: homepage-backup-2024-05-04-v2
Regular Backups
Make it a habit to backup before:
- Major design changes
- Installing new apps that might affect the homepage
- Seasonal updates
- A/B testing experiments
External Backups
For extra security, also save your template code externally:
// Save this in a file like homepage-backup-2024-05-04.json
{
"sections": {
// Your homepage sections configuration
},
"order": [
// Section order array
]
}
Version Control
Consider using Git to track changes:
# Initialize git in your theme directory
git init
# Add your template files
git add templates/index.json
# Commit with a descriptive message
git commit -m "Backup homepage template before summer sale redesign"
Common Use Cases
Seasonal Campaigns
Create different homepage versions for:
- Black Friday/Cyber Monday
- Holiday seasons
- Summer/Winter sales
- Product launches
A/B Testing
Maintain multiple versions to test:
- Different hero sections
- Varied product showcases
- Alternative call-to-action placements
Development Workflow
- Create a backup of the current live version
- Make your changes on a duplicate theme
- Test thoroughly
- Deploy when ready
Troubleshooting
Template Not Showing Up
If your template doesn’t appear in the dropdown:
- Ensure it’s saved properly
- Check that it’s in the correct format
- Refresh your browser
- Clear your cache
Code Formatting Issues
If the JSON is malformed:
- Use a JSON validator
- Check for missing commas or brackets
- Ensure proper quote usage
Conclusion
Backing up your Shopify homepage template is a simple yet crucial practice that can save you hours of work and prevent costly mistakes. By following these steps, you’ll always have a safety net when making changes to your store.
Remember: It’s better to have a backup and not need it than to need a backup and not have it. Make template backups a regular part of your Shopify workflow, and you’ll thank yourself later.