0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Drupal の各ディレクトリ

Posted at

Drupal の各ディレクトリ

tarohida@tarohida-l13:~/projects/drupal11$ ls -lp
total 4100
-rw-r--r--  1 tarohida tarohida    4662 Sep 17 22:46 composer.json
-rw-r--r--  1 tarohida tarohida  564898 Sep 17 22:45 composer.lock
drwxr-xr-x  2 tarohida tarohida    4096 Aug  2 03:57 recipes/
drwxr-xr-x  3 tarohida tarohida    4096 Sep  4 20:25 sites/
drwxr-xr-x 69 tarohida tarohida    4096 Sep 17 22:46 vendor/
drwxr-xr-x  8 tarohida tarohida    4096 Sep 10 15:41 web/

web

ドキュメントルートおよび、主要コンテンツが格納されたディレクトリ

tarohida@tarohida-l13:~/projects/drupal11$ ls -lp web/#total 52
-rw-r--r--  1 tarohida tarohida   87 Aug  2 03:57 INSTALL.txt
-rw-r--r--  1 tarohida tarohida 3205 Aug  2 03:57 README.md
-rw-r--r--  1 tarohida tarohida  268 Aug  2 03:57 autoload.php
drwxr-xr-x 14 tarohida tarohida 4096 Aug 13 21:26 core/
-rw-r--r--  1 tarohida tarohida 1495 Aug  2 03:57 example.gitignore
-rw-r--r--  1 tarohida tarohida  549 Aug  2 03:57 index.php
drwxr-xr-x  4 tarohida tarohida 4096 Aug 12 21:29 modules/
drwxr-xr-x  2 tarohida tarohida 4096 Aug  2 03:57 profiles/
-rw-r--r--  1 tarohida tarohida 2005 Aug  2 03:57 robots.txt
drwxr-xr-x  4 tarohida tarohida 4096 Sep 18 00:16 sites/
drwxr-xr-x  3 tarohida tarohida 4096 Sep 18 16:23 themes/
-rw-r--r--  1 tarohida tarohida  804 Aug  2 03:57 update.php

core/ ディレクトリ

Drupal コアのライブラリ等が格納されたディレクトリ。

配下は例として以下。

  • 共通関数を提供する core/include/ ディレクトリ
  • JavaScript のライブラリや Icon を提供する core/misc/ ディレクトリ

index.php

リクエストのエントリーポイントとなるファイル。

.htaccess

index.php にリクエストをルーティングする。

modules/ ディレクトリ

コアモジュール群が格納されるディレクトリ。

インストールされたコントリビュートモジュールもここに格納される。

自作のモジュールを格納したい場合は、配下に custom/ のディレクトリを作成し、さらにその配下にディレクトリを作成する。

profiles/ ディレクトリ

default とかのやつ。インストールプロファイル。

このサブディレクトリに例えば「e-commerse」とかがあったら、どのプロファイルをインストールするか質問される。

ディストリビューションから Drupal をインストールすると、この「profiles」の形でディストリビューションが提供される。

sites/ ディレクトリ

Drupal に加える変更内容が、設定、モジュール、テーマの形で格納されるディレクトリ。

マルチサイト利用の場合は、この配下の default をサイト名にリネームして利用する。

配下のディレクトリ:

  • web/sites/default/files: キャッシュファイルなどが作成されるディレクトリ。 Git 管理から外すことを推奨
  • web/sites/default/settings.php: 設定ファイル。これを削除すると再度インストーラが起動する

themes/ ディレクトリ

テンプレートエンジンと、 Drupal のデフォルトテーマが格納される。

自作のテーマを格納する場合は配下に custom/ ディレクトリを作成する。

update.php

バージョンアップ後にデータベーススキーマを更新。

install.php

インストーラの主要なエンドポイント

xmlrpc.php

XML-RPC のリクエストを受信する

robots.txt

ロボットに対し、ウェブサイトの登録禁止指定

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?