How to Rename a Template in Shopify?
Follow these steps to rename a template file in your Shopify theme:
Step 1: From your Shopify admin, go to Online Store > Themes.
Step 2: Find the theme that contains the template you want to rename, then click “⋯” > Edit code.
Step 3: In the code editor, open the templates folder.
Step 4: Locate the template you want to rename, then right-click and select Rename from the dropdown menu.
Step 5: Enter the new name for the file (make sure to keep the file extension, such as .json
and .liquid
).
Example: If you rename page.custom.liquid
to page.promo.liquid
, Shopify will recognize it as a new template called “page.promo” in the Template dropdown.
Does renaming a template affect my pages built with GemPages?
GemPages automatically syncs with your Shopify theme files. When you create or edit a page in GemPages, it generates a custom JSON template (e.g., product.gem-XXXX-template.json) under the hood.
If you later change the base Shopify template’s label or contents, GemPages will adapt when you re-publish the page in the editor.
- Republish GemPages pages
After renaming a template label in code, open any GemPages page that uses that template and click Publish.
This forces GemPages to update its synced template and pick up the new label.
- The theme must be published
Edits to templates only take effect on the active theme.
Make sure your theme is published before making changes.
If you preview or use an unpublished theme, GemPages might not see the new name until the theme is live.
- Check template assignments
In GemPages, you can assign Shopify’s default or custom templates to GemPages pages.
If you’ve renamed a template in code, double-check that any manual assignments still point to the correct (newly named) template.
Troubleshooting the Common Issues
#1. New label not appearing
Sometimes the template list is cached, and you need to refresh the page or clear your browser cache.
We also recommend navigating away and back to the product/page settings.
#2: Error saving JSON
Likely, the file is missing required keys.
Ensure your template JSON includes at least one section and a matching order array entry. (Shopify requires a non-empty “sections” object to save.)
#3: 404 or wrong template applied
This can happen if you try to rename a template file incorrectly.
Revert the file rename and instead just change the name in JSON.
For legacy themes, remember you must edit the filename itself (which effectively creates a new template).
#4. GemPages page broken after rename
If a GemPages-designed page stops showing content, reopen it in the GemPages editor and publish again.
The republish will apply any template changes.
By following these steps, you can safely change the display name of Shopify templates seen in the admin, while keeping GemPages pages in sync.
Thank you for your comments