# Auto-Restore Missing Templates

{% hint style="warning" %}
This feature is experimental, and is opt-in. Prior to enabling it, we advise consulting with your developers. If you have further questions, reach out to [help@shoplift.ai](https://coda.io/d/_dCs048o6O_b/_supqj).
{% endhint %}

To prevent template and theme tests from being interrupted by changes in your theme files, Shoplift has created an experimental feature that will automatically backs up and restores required theme files for your active template and theme tests in the event they become unavailable.

### **How it works with template tests**

If a tested template becomes unavailable during an active template test, Shoplift will automatically restore it from the backup created at the test’s launch to keep the test running uninterrupted.&#x20;

A common example is when a template test leverages a duplicate template that might not be on your other themes. When a new theme is published, if it doesn't contain the duplicate, then Shoplift will add the required file from a backup taken when the test was launched.

### **How it works with theme tests**

If your template requirements change during an active theme test, such as publishing a new pagebuilder page, Shoplift will automatically migrate **all missing template, section, and snippet files** from your main theme to the test theme to prevent test interruptions.

{% hint style="danger" %}
Potential risks and limitations

An inherent risk to leveraging this feature is when templates, sections, and snippets are migrated from your main theme to your test theme in order to allow a theme test to run uninterrupted when new file dependencies arise.

If your test theme has existing references to any files that are migrated from your main theme, then your test theme experience could behave in unintended ways, depending on the dependencies and references that exist.
{% endhint %}

#### **Opting In**

This feature is opt-in and can be enabled in your settings at your discretion. To enable this feature, visit **Settings > Preferences.** You can then toggle this feature on or off at any time.

<figure><img src="https://314821113-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDg2m2UmvTCMjmBjnzBKA%2Fuploads%2FpqtKnKolCOaGBIHKGRwG%2Fauto%20restore%20missing%20templates.png?alt=media&#x26;token=0b0776fc-2235-46ca-8a4d-1d5642dc15d5" alt=""><figcaption></figcaption></figure>

**Feedback and Support**

We are actively refining this feature and plan to release a more stable version in the future. If you encounter any issues or have feedback, please share it with our team at <help@shoplift.ai> to help us improve.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shoplift.ai/account/account-preferences/auto-restore-missing-templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
