---
title: How to copy metafield and metaobject definitions to another Shopify store
date: 2026-11-30
description: Shopify has no button that copies definitions between stores. How to export metafield and metaobject definitions to a spreadsheet and import them into another store.
tags: ["Guides","Metafields","Metaobjects"]
url: https://www.getaltera.com/blog/2026-11-30-copy-metafield-and-metaobject-definitions-to-another-shopify-store/
---
Shopify has no button that copies metafield or metaobject definitions from one store to another. You can create them again one by one in the admin, or a developer can copy them through the Admin API. To copy them without rebuilding each one, use an import app such as Altera: export the definitions from the first store to a spreadsheet, and import the file into the second store.

Altera exports metafield definitions and metaobject definitions in one file. The import creates the metaobject definitions first, so the metafield definitions that reference them work, and it updates definitions that already exist instead of making duplicates.

{{< youtube id="oGyoenFzp2U" title="Bulk edit and transfer Shopify metafield definitions with a spreadsheet" loading="lazy" >}}

## What Shopify offers

| Method | Who it is for | Copies to another store |
| --- | --- | --- |
| Shopify admin | Anyone, one definition at a time | No |
| Shopify CLI | App developers, for the app's own definitions | Only to stores with the app installed |
| Admin API | Developers who write a script | Yes, with code |
| Spreadsheet import app | Merchants and agencies | Yes |

**The admin.** You add metafield definitions in **Settings** > **Metafields and metaobjects**, and metaobject definitions in **Content** > **Metaobjects** or **Settings** > **Custom data**. Shopify's Help Center articles on [metafield definitions](https://help.shopify.com/en/manual/custom-data/metafields/metafield-definitions) and [metaobjects](https://help.shopify.com/en/manual/custom-data/metaobjects) describe how to create them in the admin. They do not describe an export, an import, or a copy to another store.

**Shopify CLI.** The command [`shopify app import custom-data-definitions`](https://shopify.dev/docs/api/shopify-cli/app/app-import-custom-data-definitions) is for app developers. It reads the definitions that your app owns (namespace `$app`, or metaobject types such as `$app:author`) from a development store or a Shopify Plus sandbox store, and converts them to TOML for `shopify.app.toml`. When you run `shopify app deploy`, Shopify creates those definitions on every store that has the app installed. See the [announcement on the developer changelog](https://shopify.dev/changelog/posts/migrate-metafields-with-shopify-app-import-custom-data-definitions). It does not copy the definitions that a merchant made in the admin, which are usually in the `custom` namespace.

**The Admin API.** A developer can read the definitions with the `metafieldDefinitions` and `metaobjectDefinitions` queries, and create them on the other store with [`metafieldDefinitionCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/metafieldDefinitionCreate) and [`metaobjectDefinitionCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/metaobjectDefinitionCreate). The script must create the metaobject definitions first, and it must change the IDs in the reference validations, because each store gives its definitions different IDs.

**A spreadsheet import app** does the same work without code. The rest of this guide uses Altera.

## Copy the definitions with a spreadsheet

Install [Altera](https://apps.shopify.com/altera-import-export-excel?utm_source=getaltera.com&utm_medium=referral&utm_campaign=website&utm_content=copy-definitions) on both stores. You export on the source store and import on the destination store.

### 1. Export from the source store

In Altera on the source store, click **New export**. Select **Metafield definitions** and **Metaobject definitions**, and click **Start export**. When the job is done, click **Download output**.

![Altera export page with Metafield definitions and Metaobject definitions selected. The metafield definitions have a filter Namespace is not equal to shopify, and the file format is Excel](/images/blog/copy-definitions-export.jpg)

*Both definition types in one export. The namespace filter is added for you.*

The export adds the filter **Namespace** is not equal to `shopify` to the metafield definitions. Definitions in that namespace belong to Shopify, and apps can't create them on another store.

The Excel file has a sheet for each data type: **Metafield Definitions** and **Metaobject Definitions**.

### 2. Check the file

The **Metafield Definitions** sheet has one row per definition:

| Owner | Handle | Name | Type |
| --- | --- | --- | --- |
| Products | custom.designer | Designer | metaobject_reference |
| Products | custom.care_instructions | Care instructions | multi_line_text_field |
| Variants | custom.fit | Fit | single_line_text_field |

`Handle` is the namespace and the key, joined by a period. The file also has the columns `Description`, `Pinned Position`, the `Option:` columns for access and capabilities, and a `Validation:` column for each rule. For example, `custom.fit` has `Slim, Regular, Relaxed` in `Validation: Choices`.

`custom.designer` has `designer` in `Validation: Metaobject Definitions`. A reference to a metaobject definition uses its type, not its ID, so the file works on any store.

The **Metaobject Definitions** sheet has one row per field of a definition:

| Type | Name | Field: Key | Field: Name | Field: Type | Field: Required |
| --- | --- | --- | --- | --- | --- |
| designer | Designer | name | Name | single_line_text_field | TRUE |
| designer | Designer | bio | Bio | multi_line_text_field | FALSE |
| designer | Designer | portrait | Portrait | file_reference | FALSE |

The settings of the definition, such as `Description` and the `Option:` columns, are on the first row of each definition.

You can delete the rows of definitions that you don't want to copy. You can leave the `ID` column in the file. The IDs of the source store don't match on the destination store, so Altera looks for each metafield definition by owner and handle, and for each metaobject definition by type. For all columns, see [Metafield definition fields](https://support.getaltera.com/en/articles/11490228-metafield-definition-fields) and [Metaobject definition fields](https://support.getaltera.com/en/articles/11747962-metaobject-definition-fields).

### 3. Import into the destination store

In Altera on the destination store, click **Upload file** on the home page and select the file. Altera recognizes both sheets and shows the columns that it found.

![Altera import screen for definitions.xlsx. The Metaobject Definitions sheet and the Metafield Definitions sheet are both ready, with their recognized columns](/images/blog/copy-definitions-analysis.jpg)

*Both sheets are ready. The metaobject definitions are imported first.*

The `Command` column is `MERGE` in an export. With `MERGE`, Altera creates the definitions that are missing and updates the ones that exist. You can import the same file again, and it does not create duplicates. Click **Start import**.

### 4. Check the results

When the job is done, download the results file and check the `Import Comment` column for messages about each row. Then open **Settings** > **Metafields and metaobjects** on the destination store and check a few definitions.

Test with a few definitions first if the destination store already has definitions of its own. Export them as a backup before you import.

## Metaobject definitions come first

A metafield definition of the type `metaobject_reference`, `list.metaobject_reference`, `mixed_reference`, or `list.mixed_reference` names the metaobject definitions that it can point to. Shopify only accepts the metafield definition when those metaobject definitions exist on the store.

When both sheets are in one Excel file, Altera imports the **Metaobject Definitions** sheet before the **Metafield Definitions** sheet. A metaobject definition can also reference another metaobject definition in the same file. If you use separate files, import the metaobject definitions first.

If a referenced definition is not on the store and not in the file, the metafield definition fails with [MOBD006](https://support.getaltera.com/en/articles/17229125-metafield-and-translation-error-codes#MOBD006), and a metaobject definition fails with [MOBD011](https://support.getaltera.com/en/articles/17229125-metafield-and-translation-error-codes#MOBD011).

## Copy only some definitions

Add filters to the export to copy part of the definitions:

- **Metafield definitions:** **Owner type** (for example only products and variants), **Namespace**, **Key**, and **Created at**.
- **Metaobject definitions:** **Type** and **Is managed by Shopify**.

Definitions that Shopify manages have a type that starts with `shopify--`. They are in the export by default. Product category definitions, such as `shopify--color-pattern`, are enabled on the destination store during the import. Other definitions that Shopify manages can't be imported and fail with [MOBD005](https://support.getaltera.com/en/articles/17229125-metafield-and-translation-error-codes#MOBD005). If you don't need them, filter them out or delete their rows.

See [Understanding filters](https://support.getaltera.com/en/articles/12840202-understanding-filters) for how filters work.

## Copy the values too

Definitions are only the structure. The values are on the products, variants, collections, and other objects, and in the metaobject entries. After the definitions are on the destination store:

- **Metaobject entries:** export **Metaobject definitions** and **Metaobjects** in one file, and set **File name format** to **CDN URL** under **Advanced options** so that images are copied too. See [How to copy metaobjects between Shopify stores](https://support.getaltera.com/en/articles/17334594-how-to-copy-metaobjects-between-shopify-stores) and [How to import metaobject entries into Shopify](/blog/2026-11-02-import-metaobject-entries-to-shopify-from-csv-or-excel/).
- **Metafield values:** export the products or other objects with their metafield columns, and import the file. See [How to transfer metafields between Shopify stores](https://support.getaltera.com/en/articles/11602842-how-to-transfer-metafields-between-shopify-stores).
- **A complete store:** see [How to duplicate a Shopify store](https://support.getaltera.com/en/articles/13733576-how-to-duplicate-a-shopify-store) for the order of all data types.

## Update definitions later

To change many definitions at once, export them, edit the file, and import it on the same store. You can change the name, the description, the pinned position, the options, and most validations. To copy new definitions to the other store later, run the same export and import again.

Some values can't change after a definition is created. For a metafield definition, these are the owner, the namespace, the key, and the type. For a metaobject definition, these are the type, the field keys, and the field types. Shopify also can't change which metaobject definitions an existing reference definition points to.

## Common errors and fixes

**[MDEF003](https://support.getaltera.com/en/articles/17229125-metafield-and-translation-error-codes#MDEF003): the namespace belongs to Shopify.** Apps can't create or edit definitions in the `shopify` namespace. Keep the default export filter, or delete these rows. For product category metafields, import the `shopify--` category metaobject definitions, which Altera enables on the store.

**[MDEF014](https://support.getaltera.com/en/articles/17229125-metafield-and-translation-error-codes#MDEF014): the type can't be changed.** The destination store already has a definition with the same owner and handle, but with another type. Change the definition on one of the stores, or give one of them another key.

**[MOBD006](https://support.getaltera.com/en/articles/17229125-metafield-and-translation-error-codes#MOBD006) or [MOBD011](https://support.getaltera.com/en/articles/17229125-metafield-and-translation-error-codes#MOBD011): a referenced metaobject definition is not found.** Add the metaobject definition to the file, or import it first.

**[MOBD005](https://support.getaltera.com/en/articles/17229125-metafield-and-translation-error-codes#MOBD005): the definition is managed by Shopify.** Apps can't create these definitions, for example the definitions of the Shopify Knowledge Base app. Install that app on the destination store so that it creates its own definitions, and remove the rows from the file.

**The limit of the store.** Shopify allows up to 256 metafield definitions for each owner type, such as products or customers ([Help Center](https://help.shopify.com/en/manual/custom-data/metafields/metafield-definitions)).

**The limit of the plan.** On the free Starter plan, Altera imports up to 10 items of each data type per import, and each definition is one item. Altera Pro has no item limit.

## FAQ

### Can I copy metafield definitions to another Shopify store?

Yes, but not with a button in the Shopify admin. Install an import app such as Altera on both stores, export the metafield definitions from the first store, and import the file into the second store. The definitions keep their namespace, key, type, name, description, validations, and access settings.

### How do I export metafield definitions?

In Altera, click **New export**, select **Metafield definitions**, and click **Start export**. The file has one row per definition with the owner, handle (namespace and key), name, type, description, options, and validations. You can export metaobject definitions in the same file.

### Do I need to copy metaobject definitions first?

Yes, when a metafield definition references a metaobject, for example a product metafield of the type `metaobject_reference`. Shopify needs the metaobject definition before it can create the metafield definition. If both are sheets in one Excel file, Altera imports the metaobject definitions first.

### Does Shopify CLI copy definitions between stores?

Not the definitions that you made in the admin. The `shopify app import custom-data-definitions` command is for app developers. It reads the definitions that an app owns from a development store and turns them into TOML for the app's configuration file.

### Does copying the definitions also copy the metafield values?

No. A definition is only the structure. To copy the values, export the products, collections, or other objects with their metafield columns, and export the metaobject entries with the **Metaobjects** data type. Import the definitions first.

