メインコンテンツに移動

shirane lab

メインナビゲーション

  • ホーム
  • ブログ
  • Drush
  • 検索

パンくず

  • ホーム
  • ブログ
  • Drupal 9.0.9 から 9.1.0 へのアップデート

Drupal 9.0.9 から 9.1.0 へのアップデート

2020/12/03(木) - 14:52
shirane

Drupal 9.1.0 がリリースされた。
https://www.drupal.org/project/drupal/releases/9.1.0

このサイトは 9.0.9 で動いていたが、さっそく 9.1.0 に更新した。
以下そのときの手順をメモする。

リリースノートを見ると、drush は最新の dev バージョンに更新する必要があるようだ。このサイトでも drush を使っていたので、更新前にいったん削除しておく:

$ composer remove drush/drush
./composer.json has been updated
Running composer update drush/drush
Loading composer repositories with package information
Updating dependencies

…

次に Drupal の更新を行う。このサイトは drupal/core-recommended でインストールしたので、次のコマンドを実行する:

$ composer update drupal/core 'drupal/core-*' --with-all-dependencies
Loading composer repositories with package information
Updating dependencies

…

drush を再度インストールする。最新の dev バージョン(10.x-dev)を指定してインストールを実行した後、drush のバージョンを確認する。

$ composer require drush/drush:10.x-dev
./composer.json has been updated
Running composer update drush/drush
Loading composer repositories with package information
Updating dependencies

…

Generating autoload files
42 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

$ drush version
 Drush version : 10.3.7-dev

以上でファイルの更新は終了。

次にデータベースの更新が必要かどうかを確認する:

$ drush updbst
 -------- ------------------ --------------- ------------------------------------------
  Module   Update ID          Type            Description
 -------- ------------------ --------------- ------------------------------------------
  locale   9101               hook_update_n   Delete an unnecessary index on the
                                              locales_location table.
  system   claro_dropbutton   post-update     Clear caches due to trustedCallbacks
           _variants                          changing in ClaroPreRender.
  system   schema_version_i   post-update     Update schema version to integers.
           nt                                 @see
                                              https:www.drupal.orgprojectdrupalissues3
                                              143713
  views    configuration_en   post-update     Clear errors caused by relationships to
           tity_relationshi                   configuration entities.
           ps
 -------- ------------------ --------------- ------------------------------------------

必要とわかったので、更新を実行する:

$ drush updb -y
 -------- --------------- --------------- -------------------------------------
  Module   Update ID       Type            Description
 -------- --------------- --------------- -------------------------------------
  locale   9101            hook_update_n   Delete an unnecessary index on the
                                           locales_location table.
  system   claro_dropbut   post-update     Clear caches due to
           ton_variants                    trustedCallbacks changing in
                                           ClaroPreRender.
  system   schema_versio   post-update     Update schema version to integers.
           n_int                            @see
                                           https:www.drupal.orgprojectdrupalis
                                           sues3143713
  views    configuration   post-update     Clear errors caused by
           _entity_relat                   relationships to configuration
           ionships                        entities.
 -------- --------------- --------------- -------------------------------------


 // Do you wish to run the specified pending updates?: yes.

>  [notice] Update started: locale_update_9101
>  [notice] Update completed: locale_update_9101
>  [notice] Update started: system_post_update_claro_dropbutton_variants
>  [notice] Update completed: system_post_update_claro_dropbutton_variants
>  [notice] Update started: system_post_update_schema_version_int
>  [notice] Update completed: system_post_update_schema_version_int
>  [notice] Update started: views_post_update_configuration_entity_relationships
>  [notice] Update completed: views_post_update_configuration_entity_relationships
 [success] Finished performing updates.

最後にキャッシュをクリアする:

$ drush cr
 [success] Cache rebuild complete.

以上で完了。

ブラウザで管理画面を開いてサイトの状態を確認:

更新後のサイトの状態

大丈夫そう。サイトのログにも特にエラーは記録されていないので、これでしばらく運用してみることにする。

なお、今回の更新では .htaccess と robots.txt に変更があるが、このサイトは両ファイルともデフォルトのままなので調整作業は特に必要なし。

これから新機能を確認していこう。

参考資料

  • drupal 9.1.0 リリースノート
  • Updating Drupal core via Composer
Drupal9
Composer
Drush
‹ 前の記事次の記事 ›

書籍

『D9 おいしいレシピ集2』がパワーアップして商業誌に

『D9 おいしいレシピ集2』がパワーアップして商業誌に

 書籍の一覧はこちら

タグ一覧

DrushDrupal9Drupal6ffdsmVagrant開発環境Drupal7VirtualBoxComposerコミュニティDocker書籍MigrateDrupal5モジュール勉強会ubercartMariaDBDrupal4ArtisteerCKEditorWindowsDrupal ONSENVueNuxtヘッドレスデカップルドDruxtJSpsyshREPLAnalyticsインストールTomethemingデバッグTwigQuizテーマH5P仮想マシンCentOSMac

サイト運営

シナジークエスト

© shirane lab