---
url: 'https://dxpr.com/ja/hc/documentation/learn-drupal/getting-started/updating-drupal-modules-and-themes-composer'
title: 'ComposerでDrupalモジュールとテーマを更新する | DXPR'
author:
  name: Jurriaan
  url: 'https://dxpr.com/users/jurriaan'
date: '2026-10-24T08:35:47+00:00'
copyright: 'Copyright DXPR. All rights reserved.'
type: article
summary: 'Drupal 10サイトのインストールと更新に推奨される方法は、Composerを使うことです。コア、更新が必要なすべてのモジュールとテーマを更新し、データベースを更新して、キャッシュをクリアするには、次のコマンドを実行します。'
tags:
  - 'Aan de slag'
image: 'https://dxpr.com/themes/custom/dxpr_com/images/dxpr-share-card.jpg'
published: true
og:
  site_name: DXPR
  updated_time: '2026-10-24T08:35:47+0000'
  'image:alt': 'DXPR, powered by Drupal: AI-powered Drupal for marketers.'
schema:
  '@context': 'https://schema.org'
  '@graph':
    -
      mainEntity: {  }
    -
      '@type': TechArticle
      headline: ComposerでDrupalモジュールとテーマを更新する
      description: 'Drupal 10サイトのインストールと更新に推奨される方法は、Composerを使うことです。コア、更新が必要なすべてのモジュールとテーマを更新し、データベースを更新して、キャッシュをクリアするには、次のコマンドを実行します。'
      image:
        '@type': ImageObject
        url: 'https://dxpr.com/themes/custom/dxpr_com/images/dxpr-share-card.jpg'
        width: '1200'
        height: '630'
      datePublished: '2026-10-24T08:35:47+0000'
      dateModified: '2026-10-24T08:35:47+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-drupal/getting-started/updating-drupal-modules-and-themes-composer'
      articleSection: 'Aan de slag'
    -
      '@type': WebPage
      '@id': 'https://dxpr.com/ja/hc/documentation/learn-drupal/getting-started/updating-drupal-modules-and-themes-composer'
      description: 'Drupal 10サイトのインストールと更新に推奨される方法は、Composerを使うことです。コア、更新が必要なすべてのモジュールとテーマを更新し、データベースを更新して、キャッシュをクリアするには、次のコマンドを実行します。'
      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 Drupal](/hc/documentation/learn-drupal) /[Aan de slag](/hc/documentation/learn-drupal/aan-de-slag) # ComposerでDrupalモジュールとテーマを更新する.

 Learn DrupalAan de slag

   ## In this guide

Drupal 10サイトのインストールと更新に推奨される方法は、Composerを使うことです。

1. コア、更新が必要なすべてのモジュールとテーマを更新し、データベースを更新して、キャッシュをクリアするには、次のコマンドを実行します。

    ```plaintext
    composer update "drupal/" --with-all-dependencies
    drush updatedb
    drush cache:rebuild
    ```
2. 更新の一覧を表示するには、Composerの組み込みコマンドを使います。

    ```plaintext
    composer outdated "drupal/*"
    ```
3. セキュリティアップデートの一覧を表示するには、Drushを使います。

    ```plaintext
    drush pm:security
    ```
4. 特定のモジュールやテーマを更新するには、次のComposerコマンドを使います。

    ```plaintext
    composer update drupal/modulename --with-all-dependencies
    ```
5. メジャーバージョンのアップグレード(1.xから2.xなど)では、必要に応じて新しいメジャーバージョン番号に置き換えて、次のComposerコマンドを使います。

    ```plaintext
    composer require drupal/modulename:^2.0
    ```
6. 更新後は、データベース更新を実行し、キャッシュを再構築して、変更の可能性がある設定をエクスポートし、`--diff`で変更を確認します。

    ```plaintext
    drush updatedb
    drush cache:rebuild
    drush config:export --diff
    ```