Manual:update.php

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:Update.php and the translation is 33% complete.
Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎magyar • ‎polski • ‎português • ‎português do Brasil • ‎čeština • ‎русский • ‎中文 • ‎日本語

詳細

update.phpMediawikiデータベーススキーマ が新しいバージョンのMediawikiに対応させるためのアップデートが必要かどうかを確認します。Mediawikiのアップグレードや、スキーマのアップデートを必要とする拡張機能のインストールまたはアップデートを行った際には、update.phpを実行すべきです。スキーマのアップデートを必要とする拡張機能のほとんどはドキュメンテーションの中でそのことに言及しています。

ブラウザーで

自分のサーバーのコマンドラインへのアクセス権がない場合は、アップデートスクリプトを実行するためにウェブ アップデーターを使用して下さい。

ウェブ アップデーター

コマンドラインで

From the command line, or an SSH shell or similar:

  • Change to the maintenance directory
  • Run the update script:
$ php update.php
警告 警告: update.php may exit with errors, leaving the database in an inconsistent state. Always backup the database before running the script!
This maintenance script can be disabled via $wgAllowSchemaUpdates (in 1.18.0 by $wgMiserMode ). People with extremely large and busy wikis may need to do upgrades with care, but if you're not sure if that applies to you, then it probably doesn't.
Use the following on Vagrant instances (from within your vagrant ssh).
$ mwscript update.php

パラメーター

This script offers several parameters (generic, script dependent and script specific) which may be required in some wiki environments.

Generic maintenance parameters
--help
used to get a prompt of all available script parameters (generic, script dependent and script specific) together with short explanations of their usage. These are less often used parameters.
--wiki wikiId
update wiki family if database name depends on virtual host, where wikiId - database name (e.g. enwiki, dewiki ...)
スクリプト固有のパラメーター
--quick
skip countdown sequence
--nopurge
do not purge objectcache table. Normally update.php purges the objectcache table (generally contains the parser cache and the messages cache), msg_resource and msg_resource_links (these are used for ResourceLoader message caching and are cleared in 1.21 and later) tables in the database, if you don't want to purge this table, use the --nopurge option.
--doshared
Update shared tables as well.
--force
Run this script even if it is disabled by configuration options.
--conf
Specifies the config file (the LocalSettings.php file for the specific wiki). Used for wiki families.
--skip-compat-checks
Skips compatibility checks
--skip-external-dependencies
when using composer.local.json to let Composer install extensions and their dependencies, you may see an error message saying that there is a mismatch between the installed and required version (e.g. "mediawiki/semantic-breadcrumb-links: 1.3.0 installed, ~1.3 required"). You can use this parameter to ignore the message and run update.php regardless.
警告 警告: Only recommended for use by developers.

Extensions can install/update their schemas using LoadExtensionSchemaUpdates hook.

関連項目