# Reuse a structure from one site to another

A package carries a content type with its fields, its referenced types and its templates in one file. This article shows you how to export a package, then import it on another site after reading what it would do.

## Before you start

- Exporting and importing require being a site administrator.
- A package carries the types, their fields and their content templates. It carries no content: not the properties, nor the cities, nor the offers entered.
- The media that a template displays stay on the original site. On the new site, place them again in the template.

## Export a type

1. In the administration menu, open **Content types**.
2. In the **Content types** or **Categories** table, on the type’s row, click **Export**. The **Export:** window followed by the name of the type opens.
3. Uncheck what you do not want to carry over. Everything is checked at the start.
4. If the box **Check these points before you download the package.** appears above the button, read each of its lines. The section Read the export warnings details them.
5. Click **Download the package**. You receive a dated `.json` file, for example `lovely-content-model-2026-10-11.json`.

| Section | Content |
| --- | --- |
| **Content fields** | The fields the type uses, with their key in parentheses. |
| **Referenced types** | The types that its reference fields cite, for example the Town and Property type categories. |
| **Models** | Its content templates. The default template carries the mention **default**. |

An empty section is not displayed. A link leaves only if both its ends leave: unchecking the Surface field removes its use by the type.

## Read the export warnings

The window flags what the package would leave out, before the download. The box **Check these points before you download the package.** gives one line per case. It updates each time a box is checked or unchecked and disappears when there is nothing left to flag.

| Warning | Effect on the package |
| --- | --- |
| The template “…” displays the field “…”, missing from the export. | The template still leaves, without this field. |
| On “…”, the field “…” is displayed only under a condition that reads “…”, missing from the export. | The field leaves with its condition. On a site that does not have the field read by the condition, this field stays hidden. |
| The configuration of “…” could not be read and was left out. | The type does not leave in the package. |

**Tip:** For a complete package, check again the fields that your templates and your conditions read, until the box disappears. The warnings do not block the download: the package leaves as you checked it.

## Import a package

**Warning:** Import a package only from a trusted source. Nothing is written before you have read the report, but what you accept becomes the structure of your site.

1. In the **Content types** menu, next to the **Content fields** title, click **Import a package**. The **Import a package** window opens.
2. Choose the `.json` file, then click **Read the package**. The **Contents of this package** report appears. Nothing is written yet.
3. Read the **On this site** column of each resource.
4. For each **Already there, different** resource, choose in **Action** between **Keep mine** and **Replace with theirs**. **Keep mine** is checked at the start.
5. Click **Apply**. The **Import finished** summary lists what was written and what was kept.

| State | Effect of the import |
| --- | --- |
| **Does not exist yet** | The resource is created. |
| **Already there, identical** | Nothing is written. The site’s resource is reused. |
| **Already there, different** | You keep your definition or replace it with the package’s. |

There is never a setting-by-setting merge. **Replace with theirs** replaces the entire definition, including what you changed in it. A resource of the site that the package does not bring stays in place.

## Understand a refusal

The import checks the package before writing anything. It names each problem.

| Screen | Cause | Fix |
| --- | --- | --- |
| **Package refused**, at reading | The file is not a package, or a key is malformed. The entire package is refused. | Export the package again from the original site. |
| **Nothing was written.** and one line per resource, at reading | The package declares a property or a value that the format does not accept, for example after a manual edit. No **Apply** button appears. | Fix or export the package again. |
| **Package refused**, at application | Your choices produce a structure that the site cannot hold. For example, you keep your field while a type in the package uses it differently. Replacing a field with a field of another type is refused in the same way: a field never changes type. | Change your choice on the named resource, then start the import again. |
| **Import interrupted** | Writing a resource failed. The summary lists what had been written before. | Read the summary, then start the import again. |

A type can arrive with fields that your site does not have: the package brings them.

## Update an imported structure

Apply the new version of the package like an ordinary import. An identical resource is reused. A resource modified, on either side, appears as **Already there, different**. A field that changed type in the new version causes the import to be refused.

Reimporting a package on the site it came from changes nothing: everything appears as **Already there, identical**. This is how you check that a package is complete.

## See also

- [Create a content type](https://lovelyrender.com/documentation/create-content-type/)
- [Add fields to a type](https://lovelyrender.com/documentation/add-content-fields/)
- [Start from a content model](https://lovelyrender.com/documentation/start-from-template/)
- [Take your site with you](https://lovelyrender.com/documentation/export-your-site/)
