Jump to content

Manual:run.php

From mediawiki.org
This page is a translated version of the page Manual:Run.php and the translation is 75% complete.

詳細

run.php ファイルは、メンテナンス スクリプトおよびインストール スクリプト を実行するためのコマンドライン エントリ ポイントであり、2022年に導入されました。 これは php ./maintenance/run.php で呼び出す必要があり、または 実行可能ファイル ./maintenance/run をサポートするシステムではそれを介して呼び出すこともできます。 MediaWiki 1.40 以降、メンテナンス スクリプトを run.php を使用せずに実行することは非推奨 (廃止予定) となっています。

使用法

php ./maintenance/run.php <script>

‎<script> - 実行するメンテナンス スクリプトの名前。 クラス名またはファイル パスとして渡せます。 .php 拡張子は省略可能です。 ./ または ../ で始まるパスは現在の作業ディレクトリからの相対パスと解釈されます。 他の相対パスは、メンテナンス スクリプトのディレクトリを基準に解釈されます。 クラス名では、ドット (.) を標準名前空間の区切り文字として使用できます。 拡張機能名は接頭辞として指定でき、その後にコロンを付けます。例: MyExtension:exampleScript。この指定により、パスやクラス名は拡張機能を基準に解釈されます。

高度な使用法

php ./maintenance/run.php <script> [--conf|--globals|--memory-limit|--profiler|--server|--wiki]

汎用保守パラメータ

オプション/パラメーター 説明
--conf Location of "LocalSettings.php", if not default
--globals Output globals at the end of processing for debugging
--memory-limit Set a specific memory limit for the script, "max" for no limit or "default" to avoid changing it
--profiler The output format of the profiler, usually "text".
--server The protocol and server name to use in URLs, e.g. https://en.wikipedia.org. This is sometimes necessary because server name detection may fail in command line scripts.
--wiki For specifying the wiki ID

関連項目