---
url: 'https://dxpr.com/ja/hc/documentation/learn-dxpr-builder/reusable-templates/importing-exporting'
title: 'サイト間でテンプレートを複写する | DXPR'
author:
  name: Jurriaan
  url: 'https://dxpr.com/users/jurriaan'
date: '2026-10-24T08:50:34+00:00'
updated: '2026-10-24T09:09:48+00:00'
copyright: 'Copyright DXPR. All rights reserved.'
type: article
summary: |-
  ページテンプレートと保存済みセクションを別サイトへ移します。例: ステージングから
  本番へ。最後にはChoose a template下とSaved templatesタブに
  並びます。両種ともDrupal設定です。ブラウザーで1つずつ複写するか、サイト設定ごと
  デプロイします。
  動画ではStoryページテンプレートをあるサイトから複写し、別サイトに取り込みます。
tags:
  - 'Lay-outs hergebruiken'
image: 'https://dxpr.com/themes/custom/dxpr_com/images/dxpr-share-card.jpg'
published: true
og:
  site_name: DXPR
  updated_time: '2026-10-24T09:09:48+0000'
  'image:alt': 'DXPR, powered by Drupal: AI-powered Drupal for marketers.'
schema:
  '@context': 'https://schema.org'
  '@graph':
    -
      mainEntity: {  }
    -
      '@type': TechArticle
      headline: サイト間でテンプレートを複写する
      description: |-
        ページテンプレートと保存済みセクションを別サイトへ移します。例: ステージングから
        本番へ。最後にはChoose a template下とSaved templatesタブに
        並びます。両種ともDrupal設定です。ブラウザーで1つずつ複写するか、サイト設定ごと
        デプロイします。
        動画ではStoryページテンプレートをあるサイトから複写し、別サイトに取り込みます。
      image:
        '@type': ImageObject
        url: 'https://dxpr.com/themes/custom/dxpr_com/images/dxpr-share-card.jpg'
        width: '1200'
        height: '630'
      datePublished: '2026-10-24T08:50:34+0000'
      dateModified: '2026-10-24T09:09:48+0000'
      author:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
        url: 'https://dxpr.com/'
        logo:
          '@type': ImageObject
          url: 'https://dxpr.com/themes/custom/dxpr_com/dxpr-logo-dark.svg'
          width: '1348'
          height: '501'
      publisher:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
        url: 'https://dxpr.com/'
        logo:
          '@type': ImageObject
          url: 'https://dxpr.com/themes/custom/dxpr_com/dxpr-logo-dark.svg'
          width: '1348'
          height: '501'
      mainEntityOfPage: 'https://dxpr.com/ja/hc/documentation/learn-dxpr-builder/reusable-templates/importing-exporting'
      articleSection: 'Lay-outs hergebruiken'
    -
      '@type': WebPage
      '@id': 'https://dxpr.com/ja/hc/documentation/learn-dxpr-builder/reusable-templates/importing-exporting'
      description: |-
        ページテンプレートと保存済みセクションを別サイトへ移します。例: ステージングから
        本番へ。最後にはChoose a template下とSaved templatesタブに
        並びます。両種ともDrupal設定です。ブラウザーで1つずつ複写するか、サイト設定ごと
        デプロイします。
        動画ではStoryページテンプレートをあるサイトから複写し、別サイトに取り込みます。
      breadcrumb:
        '@type': BreadcrumbList
        itemListElement:
          -
            '@type': ListItem
            position: 1
            name: ホーム
            item: 'https://dxpr.com/ja'
      publisher:
        '@type': Organization
        '@id': 'https://dxpr.com/#organization'
        name: DXPR
      inLanguage: ja
---
[Help Center](/ja/node/75)/[Documentation](/ja/hc/documentation) /[Learn DXPR Builder](/hc/documentation/learn-dxpr-builder) /[Build pages](/hc/documentation/learn-dxpr-builder/build) /[Lay-outs hergebruiken](/hc/documentation/learn-dxpr-builder/reusable-templates) # サイト間でテンプレートを複写する.

 Learn DXPR BuilderBuild pagesLay-outs hergebruiken

   ## In this guide

 Related guides

- [テンプレートからページをはじめる](/ja/hc/documentation/learn-dxpr-builder/reusable-templates/page-templates)
- [保存済みテンプレートを探して挿入する](/ja/hc/documentation/learn-dxpr-builder/reusable-templates/saved-templates-tab)

ページテンプレートと保存済みセクションを別サイトへ移します。例: ステージングから 本番へ。最後には**Choose a template**下と**Saved templates**タブに 並びます。両種ともDrupal設定です。ブラウザーで1つずつ複写するか、サイト設定ごと デプロイします。

動画ではStoryページテンプレートをあるサイトから複写し、別サイトに取り込みます。

  ## はじめる前に

- 両サイトで**Administer site configuration**権限が必要です。
- ブラウザーで個別テンプレートを複写するには、コアの**Configuration Manager**モジュールが有効で、**Export configuration**と**Import configuration**が 必要です。

## ブラウザーでテンプレートを1つ複写する

1. 移行元サイトで**Configuration** &gt; **Development** &gt; **Configuration synchronization**を開き、**Export** &gt; **Single item** (`/admin/config/development/configuration/single/export`) を開きます。
2. フォームの**Configuration type**で**DXPR Builder Page Template**または **DXPR Builder User Templates**を選びます。
3. テンプレートは**Configuration name**下で選び、現れたテキストを複写します。
4. 移行先サイトで**Import** &gt; **Single item**(`/admin/config/development/configuration/single/import`) を開きます。
5. 同じ**Configuration type**を選び、テキストを**Paste your configuration here**に 貼り付けます。
6. クリックして確認するのは**Import**です。

複写にはマークアップ、画像、ユーザーテンプレートの場合はグローバル設定が入ります。

## 手で複写する

Configuration Managerがない場合は、フィールドを1つずつ複写します。

1. 移行元サイトでテンプレートを**DXPR Studio** &gt; **DXPR Builder** &gt; **Page Templates** (`/admin/dxpr_studio/dxpr_builder/page_template`) または **User Templates** (`/admin/dxpr_studio/dxpr_builder/user_templates`) で開きます。
2. 複写するのは**Template**フィールドの中身です。
3. 移行先サイトの同じページで**Add page template**または**Add user template**を クリックします。
4. マークアップを**Template**に貼り、他のフィールドを入力します。ユーザーテンプレートには **UID**も必要です。移行先サイトでの所有者のユーザーIDです。
5. サムネイルを**Image**で再度アップロードします。マークアップの一部ではないからです。
6. クリックするのは**Save**です。

## サイト設定ごと全テンプレートをデプロイする

完全な設定書き出しには全テンプレートが入ります。`dxpr_builder.page_template.<id>.yml`と `dxpr_builder.user_template.<id>.yml`としてです。チームがDrushで設定デプロイするなら、 テンプレートも一緒に付いてきます。

```bash
drush config:export
drush config:import

```

移行元サイトで書き出しを実行し、ファイルをコミットまたは複写して、移行先サイトで取り込みを 実行します。

## 表示結果

取り込んだページテンプレートは空ページの**Layouts**ダイアログに出ます。 ユーザーテンプレートは**Saved templates**タブに出ます。グローバルは **Global Templates**下、私物は所有者にだけ見えます。

## テンプレートが表示されない場合

- **インポートしたユーザーテンプレートがピッカーにありません。** **UID**が新サイトに 存在しないユーザーのもので、ピッカーは作者なしテンプレートを飛ばします。 `/admin/dxpr_studio/dxpr_builder/user_templates`でテンプレートを編集し、 存在するユーザーIDを入力します。
- **インポートしたページテンプレートがLayoutsダイアログにありません。** 有効でないか、 ユーザープロファイルが使えるページテンプレートを制限しています。テンプレートで **Enabled**にチェックし、**Page templates**下でもチェックします (`/admin/dxpr_studio/dxpr_builder/profile`)。
- **テンプレート内の画像が壊れています。** テンプレートは移行元サイトの filesフォルダー内画像ファイルを指し、設定はファイルを複写しません。ファイルを新サイトの 同じフォルダーへ複写するか、画像を選び直します。

## 次はこちら

- [テンプレートからページをはじめる](/ja/hc/documentation/learn-dxpr-builder/reusable-templates/page-templates): 取り込んだレイアウトを使います。
- [保存済みテンプレートを探して挿入する](/ja/hc/documentation/learn-dxpr-builder/reusable-templates/saved-templates-tab): 取り込んだセクションを使います。