← Bucketback

How to roll back a Shopify theme change

You edited your theme and now something is broken: a section is missing, the layout has shifted, or the store throws an error. Shopify gives you two useful tools, and both have limits. Try them in this order.

1. Restore a single file from its Timeline

If you edited the code, the code editor keeps a history for each file. Per Shopify's guide:

  1. In the Shopify admin, go to Online Store, click the menu (three dots) on the theme, then Edit code.
  2. Open the file you changed.
  3. Copy the current contents somewhere safe, in case you want to keep part of it.
  4. In the Timeline view, click an entry to compare it with the current file.
  5. Right-click the entry, choose Restore contents, then confirm with Restore.

Limits that Shopify lists:

In the admin the button was labelled Timeline when we checked. Some older guides and forum posts call it Older versions, so if you cannot find one, look for the other.

2. Switch back to a duplicate

If you made a copy of the theme before the change, you are in good shape. On the Themes page, publish the copy. To make a copy next time, use the theme's menu and choose Duplicate. It appears as "Copy Of" plus the theme name. A store can hold up to 20 themes, so you may need to delete an old one first, and deleting a theme is permanent. Downloading the theme as a ZIP gives you an off-site copy.

A duplicate is only a snapshot from when you made it. Anything edited in the live theme since then, including content changed in the theme editor, will not be in it.

3. If neither is available

Ask Shopify Support. If you hired a developer or used an app that changed the theme, ask them for the previous version of the files they touched. If an app injected code, removing the app and its code snippets sometimes fixes the page.

4. Where a backup app helps

Timeline and duplicates depend on you remembering to act before the mistake. A backup app does this on a schedule. It can only restore from backups taken after it was installed, so it cannot help with a change made before that.

Bucketback is a backup app we build. Every theme file is backed up nightly, and a theme can be restored per theme with a preview of what will change. A safety backup is taken before each restore, so you can undo the restore itself. Because the restore goes back to the last nightly backup, not to the minute, edits made today after the backup will not be in it.

5. Habits that help


Related guides

Written by Ravish Labs, the developer of Bucketback. Questions: support@ravishlabs.app. · Privacy · Terms