Manual:index.php のパラメーター

This page is a translated version of the page Manual:Parameters to index.php and the translation is 46% complete.

このページは MediaWiki ソフトウェアのメイン スクリプトである index.php へのパラメーターの一部の一覧であり、MediaWiki 自身が提供したものです。 これらの多くの引数は、通常 URL の GET パラメーターで渡されますが、POST データとして渡せる場合があります。 POST は実際、purge (キャッシュ破棄) 操作など、一部のケースで必須です。



index.php に与えられたパラメータは通常、適用され、適用されたページに関連する意味を持ちます。 ページ (またはその版の 1 つ) は、以下のパラメーターを 1 つ以上入力して指定します:

名前 説明
title ページ名です。 通常 wikiページですが、指定された他のパラメータによってはspecial pageとなる場合があります。 ウィキ設定で特定のページを無効にするには SpecialPage_initList フックを使用します。
curid wikiページのidです; 指定された場合、titleの値より優先されます。


名前 説明
oldid 版 ID
direction oldid で指定される版の代わりに以下を使えます。
  • direction=prev: oldid の1つ前の版です
  • direction=next: oldid の1つ後の版です


以下は、action パラメーターの値の一覧です:

これらの action には LocalSettings.php で割り当てられた設定の指定を使って有効/無効を切り替えるものがあります。その場合、ローカル設定の一覧が表示されます。[2]

Name 機能
view view は既定の action です; view はaction が明示的に指定されない場合に使用される唯一の action です。
watch ページを利用者のウォッチリストに追加します
unwatch ページを利用者のウォッチリストから除去します
delete ページを削除します

delete は既定で削除を確認するフォームを返し、利用者は理由を特定して削除を確認します。[3]
revert 特定の imageの以前の特定版へ差し戻します。以下に示す2件のパラメータも必要です。
  • oldimage, the id of the version to revert to;
  • wpEditToken - 有効な編集トークン;
rollback そのページを直近で変更した編集者の編集をすべて巻き戻します。言い換えるなら、直近の編集者が変更する以前の特定版を回復させます。このときの編集そのものは細部としてマークし、編集要約欄には既定の要約を使います。[4]


  • fromは編集を差し戻す対象の利用者名
  • token はロールバック・トークンです; 以前は利用者が意図しないロールバックを未然に防いでいました(リンクをたどったり外部のサイトでボタンをクリックしたことが原因で発生)。\
protect ページの保護レベルを表示または変更します:
  • 既定ではこのスクリプトはそのページの現状の保護レベルを返し、利用者が保護レベルを変更できるようにします。[5]
unprotect Same page as protect (unprotect and protect are the same page, and do the same thing).
markpatrolled Marks an edit as patrolled; see Help:Patrolled edit on Meta.

rcid is the id of an edit in the recentchanges table

render Outputs the HTML rendering of the entire page content; similar to the view action, but only the unstyled article text is output, not any part of the user interface (additional toolboxes, search box, stylesheets, etc.).
For more stable programmatic access or to retrieve the HTML of only a piece of page content, you should use the parse API with page or pageid parameters.
purge ページのキャッシュをクリアし、強制的にソースのデータを用いてページの再表示を行います。
  • この操作は、POST リクエストで要求された場合のみ実行されます。それ以外の場合は、purge (キャッシュを破棄) するかどうかを確認するフォームが表示されます (OK ボタンを押すと purge リクエストが送信され、それが実行されます)。

submit ページ変更に関する様々な action を実行します (詳細下記):
  • 既定では編集ボックスを持った編集形式でページを表示します。
  • それ以外にも各種引数を使うことができます:
  1. ページを変更します
  2. ページの新版をプレビューするか、または
  3. 新版との差分を表示します (詳細は次の編集と投稿の節を参照);
  4. If the default editor is set to VisualEditor, action=submit will force showing the source code editor. VisualEditor can be selected with veaction=edit URL parameter.
  5. The #/editor/… overlay of the mobile front end on Skin:Minerva does not appear with action=submit. Instead, the default submission form is shown, which allows marking edits as "minor".
edit 編集形式でページを表示、 "edit" の動作はほぼsubmit.と同様
editredlink edit と同じです。[6]
history ページの履歴を表示します。 (以下の履歴を参照)
historysubmit 履歴のページで「選択した版を比較」をクリックして版の差分を見ます。このとき"diff"と/または"oldid"パラメータが必要で、指定しないと現在のページを表示します。
raw ページの生の内容を表示します(See Raw, below) ポップアップ・ウインドウが開いて index.php 内のページを保存したいか否か聞いてきます。[7]
ajax (1.27 で廃止予定); (1.38 で除去) 有効のとき $wgAjaxExportList 経由で登録された php 関数を呼出します。Manual:Ajax を参照。[8]
credits Shows a list of people who contributed to the page in question using the real name specified in the user's preferences. Currently disabled on Wikimedia wikis, but is enabled by default on vanilla MediaWiki.
info Shows information about the page, such as the number of users having it in their watchlist, the number of edits, the number of authors. See the Reimplement info action RfC for context.
revisiondelete Set visibility restrictions on revision text, edit summary, and editor's username/IP address (requires deleterevision user right)



名前 機能
useskin 外装を指定します
uselang Specify a language for the UI elements (such as the "my talk" link, etc.), i.e. the user interface language; this is especially useful for creating an account, because at that stage no preference settings apply.

The special language code "qqx " can be used to display the ids of all system messages used on a page.
variant Specify a language variant for the UI elements (this is used for example in the Chinese Wikipedia, as the Chinese language has variants);
printable When set to yes, the page is shown in a form that is suitable for printing
debug When set to true (e.g. 1 or true), the ResourceLoader serves non-minified JavaScript and CSS. See ResourceLoader/Features#Debug mode.
safemode When enabled (e.g. set to 1 or true), user-provided CSS and JS will not be loaded. This disables personal scripts and styles (e.g. "User:" common.js and css), and site-wide scripts and styles (e.g. "MediaWiki:Common.js" and "MediaWiki:Common.css"), and all gadgets.[9] It is possible to mark site-wide styles ("MediaWiki:Common.css") as safe via $wgAllowSiteCSSOnRestrictedPages , which permits them in safemode.
useskinversion Specify a skin version[10]


view は既定の action です。URLに他の action が加えられなければaction=viewが使われます。単一のページや単一の変更の表示、あるいは同一もしくは別の2ページの変更前後の差分を表示します。その一覧は以下のとおり (省略版)。

the value of this parameter identifies a revision; the difference between another revision and this one is returned:
  • if oldid is not passed, the difference between this revision and the previous one on the same article is shown;
  • otherwise, the difference between the revision given by oldid/direction and this one is shown; the value of this parameter can be a revision id, the values prev or next to identify a revision relative to the one given by oldid/direction, and the value cur to identify the latest revision of the page;
Note that oldid and diff need not be two revisions of the same article, allowing two revisions of two different pages to be compared
if the value of this parameter is 'no' and the page is a redirect, the page itself is shown and not the target of the redirect; this parameter has effect only on action=view and action=render and only if neither oldid nor diff is given, as this is the only case where the target article is shown instead of the redirect;
when the page is the result of following a redirect from an external wiki, this parameter tells which wiki that was, so that the "Redirected from ..." line can be shown
override the user's preference on whether to render the page when a diff is requested, eg. diffonly=yes
if non-blank (and if searches are enabled), override all other parameters and perform a search

The following parameters apply only to categories.

if the page is a category, only list entries whose sortkey are equal or follows the value of this parameter;
Links to a log of all the images uploaded on August 14, 2007 from 23:35:20 until 23:36:25
if the page is a category, only list entries whose sortkey precedes the value of this parameter; only used if from is not passed;

The following parameter apply only to images.

a page number in a multi-page media; it currently only applies to DjVu and PDF files; first page is numbered 1;


The number of page edits to list, the maximum is 5000 edits.
例: - 1 ページあたり編集 13 件を列挙します。
the relative order of edit history pages.
page edits are sorted in decreasing timestamp.
uses a timestamp to specify which part of the history is displayed;
Returns the edits which occurred before the timestamp;
Shows the edits which occurred immediately before the timestamp 20090815195334 (20090815195334 is not shown).
Parameter format is yyyymmddhhmmss. So 20090815195334 was created on August 15, 2009 [20090815] at 19:53 (UTC) and 34 seconds [195334].
See Wikipedia:Complete diff and link guide.
if dir=prev is added, it works the other way around, listing all edits after the timestamp[11]
Shows the edits which occurred immediately after the timestamp 20090815195334 (20090815195334 is not shown).
Example to show only the very first edit on a page:
a feed for the changes in the history is returned; allowed values are atom and rss. $wgFeed で無効化できます。
(deprecated - should be avoided, because it has been superseded) go=first the first (earliest) page of history is shown


Passing action=raw returns the source code of a page or revision. For caching and security reasons, this should generally only be used via the script path, that is, index.php?title=...]]. While "short urls" like /wiki/ are only meant for action=view, they unofficially tend to work for other actions as well. This is expressly discouraged for action=raw as it leads to less effective caching and bypasses automatic purging after edits.

if passed with value expand, templates within the page are expanded;
the content-type value to be used in the HTTP header when returning the raw content, instead of the default text/x-wiki; this can only be one of the allowed types, which currently are text/x-wiki, text/javascript, text/css, and application/x-zope-edit
the value of max-age in the Cache-Control HTTP header field to be used when returning the raw page (client cache)
the value of s-maxage in the Cache-Control HTTP header field to be used when returning the raw page (cache-server cache)
the id of a specific revision to return
either next, prev, or cur; instead of the revision specified by oldid, returns the one following it, the one preceding it, or the current (last) one;
Limits output to a particular section or subsections of the document. Sections are specified with non-negative integers : section 0 being the section before any named sections, section one being the first named section or subsection and so on. The numbering scheme treats sections and subsections as identical. A list of the sections and subsections can be obtained via API with api.php?action=parse&text={{:My_page}}__TOC__&prop=sections.


The edit and submit actions perform almost the same action. By default, they return an "edit page" form for the page. Different results can be obtained by passing other arguments; some results (such as saving the new version of a page) can only be obtained using POST. This action takes the standard arguments for specifying a page or a page revision.


The following options produce an effect on the edit form. (Note: 'section' also affects how the page is saved. Additionally, 'preload' and 'preloadparams' only work on wikitext contentmodel)

specifies the index of a section within a document to preload and edit; sections are numbered sequentially from 0 on; section 0 is the part of the article before the first section header; value new is used to append a new section to the document;
specifies a page, of which the wikitext is used as the initial value of the textarea in the edit form if the page or section to be edited does not exist; if it exists the preload command is ignored; also see Manual:テキストをプリロードしてページを作る ;
preloadparams[] (or preloadparams%5B%5D): Replace $1 style parameters in preload text. For example would cause Manual:Creating pages with_preloaded text/param demo to be preloaded into the edit form, but with $1 replaced by first value and $2 replaced by second value. (1.23 で導入)
title of an existing article or template to be rendered above the edit form;
in the case of section=new, provides initial content of the "Subject/headline" box; it can be edited before saving;
Example with both preloadtitle and preload: invite&preloadtitle=Invitation
Do not show the "headline" box when doing section=new.
its value is used as the edit summary in place of the default one.
if set to yes or no, overrides user preference "編集開始時にもプレビューを表示" (タスク T11936);
internaledit/externaledit (1.22 で除去)
overrides user preference on external editors;
mode (1.22 で除去)
this parameter affects the result page if passed with value file and using an external editor;
undo, undoafter
attempts to undo a sequence of edits, from the undoafter revision up to the undo revision; technically, this is done by trying to merge the inverse of these edits with the sequence of all subsequent edits; the values of these parameters are ids of old revisions of a page; if merge is not possible, a regular edit form for that revision is returned


The following options tell the software what to do when submitting: saving, showing a preview, or showing the difference with the current version.

this argument is generated when saving the content of an edit form returned by the server, but is not actually used nor required when submitting (see below for required arguments to save);
set in a POST request to request a preview of the page or section as if the value of wpTextbox1 were saved;
  • by default, returns an edit form with a preview of the value of wpTextbox1;
  • if the additional live argument is passed, only the rendering of the value of wpTextbox1 is shown, not the form and the other GUI element; this is similar to the result of saving and then viewing with action=render; see Manual:ライブ プレビュー for more info;
  • the argument wpLivePreview is identical to wpPreview; therefore, a regular preview is returned if live is not passed;
set in a POST request to request a table showing the changes between the current version of the page or section and the version as if value of wpTextbox1 were saved;


The following parameters are required when a user saves a page. The edit summary field may also be required if so configured (see below).

the new page/section content;
the timestamp of when the user started editing the page; used to check whether the page has been deleted between this moment and the submission time (in this case, the user is asked to confirm saving);
in case the page was deleted after wpStarttime, this field confirms that the page is to be saved;
for new pages, it is equal to wpStarttime; otherwise, it is the timestamp of the last revision of the page; used to check edit conflicts;
an edit token; this is used to avoid users from being tricked into saving a page by following a link or pressing a button in an external site. For non-logged-in users, wpEditToken is required since phab:rSVN18112; it currently contains only the characters +\ rather than a random string (see edit token suffix).

For the page to be saved, wpStarttime, wpEdittime, wpTextbox1 and wpEditToken are required in a POST request, and neither wpPreview nor wpDiff are passed. If the page was deleted after wpStarttime, the boolean option wpRecreate is also required.

Optional additional data

The edit summary or the "ignore blank" parameter may be mandatory if "warn on blank summaries" is configured.

the edit summary;
if set in a save request, the edit is marked as minor; for preview and diff, it is the initial value of "this is a minor edit" checkbox in the edit form;
if passed on a save request, the page is added to the user's watchlist; if it is not passed in a save request, the page is removed from the user's watchlist; for preview or diff, this is the initial value of the "watch this page" checkbox of the edit form;
specify the index of a section within a document to submit to; sections are numbered sequentially from 0 on; section 0 is the part of the article before the first section header; value new is used to append a new section to the document;
編集に加えるための tags をコンマ区切りした任意の表 マニュアル操作のとき、それらのタグがひとつでも有効でなければ、編集は拒否されます。
contains the MD5-hashing of the edit summary field as initially presented to the user in the edit form; this field is used to check if the user has modified that field before submitting: if the MD5 hashing of the value of wpEditSummary is the same as this field, the edit summary has not been modified;
save page even if user has not modified the edit summary, while they were supposed to;
in case of an edit conflict, it contains the value of wpTextbox1 of the save request that generated the conflict;
used to preserve the scrollbar position in the edit textbox when loading a preview.
if the user does not have permission to edit the page, redirect to the empty article page (e.g., "Wikipedia does not have an article with this exact name") instead of showing the permission error notice; this parameter is used on red links.
hidden input to modify after save URL and is not used by actual edit form. Intended to be used by gadgets and such.


Most special pages have additional parameters, specific to the function they perform. As an example, the parameters for Special:Export are outlined in Manual:Special:Export のパラメーター

The following URL parameters provide initial values for some input fields; they can be edited before submitting the form.


text field with reason.
text field with new title.
whether to select the "Leave a redirect behind" checkbox.


whether to select the "メール送信" checkbox.
whether to select the "自身のトークページの編集" checkbox.
initially selected item in the drop-down box, value should match a row in the MediaWiki:Ipbreason-dropdown.
text field with custom reason; require wpReason=other
whether to select the "この利用者が最後に使用したIPアドレスと、ブロック後に編集を試みた際のIPアドレスを$1の期間、自動的にブロック" checkbox.
whether to select the "この利用者の利用者ページとトークページをウォッチ" checkbox.


text field with reason.


MediaWiki バージョン:
1.10 – 1.27

The maxlag parameter is used only if the software is running on a replicated database cluster.

The maxlag parameter makes it so a request is not served if there is high server traffic. maxlag parameter applies to all actions. maxlag parameter value is a number; the lower this value, the lower the traffic that causes the request not to be served. Zero is not allowed.


  1. フォームを投稿するクライアントは、HTML 内に存在するフォーム パラメーターをすべて送信するはずです。静的なリストを当てにすることは将来の破損につながるかもしれません。 MediaWiki をインストールして新しく操作を登録する手順は、$wgActions を参照してください。
  2. さらに 'view' 以外の操作の無効化には $wgActions の変数を使います。 またさらに $wgActions はこのたびすべての操作に使えるようになりました。 あるいはsearchを有効にしてsearchパラメータを補うと (空白でなくなる) その他の action を無視してsearch を実行します。
  3. 削除はwpEditToken値として有効な編集トークンが通されたとき、POST 要求によって実行されます。利用者が削除を確認したときに、この手順が発生します。 削除の理由は引数wpReasonの値として渡され、この文字列は削除ログ (logging テーブルのlog_comment_id欄) に記録されます 特定の画像の特定版を削除したときも、削除が実行されるタイミングです。実施するには、パラメータoldimageに渡す特定版の識別子 (id) とwpEditTokenに渡す有効な編集トークンが必要です。この場合、GET 経由でも削除を要求できます。
    • もしオプションのsummary引数を渡すと、編集要約欄には既定の要約ではなく、その値が使われます
    • もしオプションのbot引数を渡すと、その編集はぼっとによるものとしてマークされます (recentchanges テーブルにrc_bot=1として記録)
    • bot引数は、[rollback]リンクが表示されるどのページでも使用でき、生成されたすべての巻き戻しリンクに&bot=1をカスケードします
    • もしオプションのhidediff引数を渡すと、変更の差分の代わりに成功メッセージを表示します (これはユーザー設定により強制可能)
  4. これらのレベルは、要求が POST 経由であり有効な編集トークンをwpEditTokenとして渡した場合、mwProtect-level-editmwProtect-level-moveの値に合わせて調整されます。mwProtect-reasonパラメータにより保護もしくは保護解除の理由を与え、ページのログに記録されます。もし合わせてmwProtect-cascadeも渡した場合、保護のカスケードが適用されます (参照読み込みされたページはすべて同等の保護レベルに統一されます)
    • more generally, the actions that can be limited are those listed in the $wgRestrictionTypes array; this array is initialized to array('edit','move') and can be changed in LocalSettings.php ; the protection action then accept a parameter mwProtect-level-$action for each action in that array
  5. セキュリティ上の理由で MediaWiki のバージョンによっては Raw は「一次スクリプト アクセスポイント」つまり index.php?title=... の「美的でない」URL 形式のときに使用が制限されます。
    • $wgUseAjax を true にします。呼び出し可能な唯一の関数は $wgAjaxExportList 配列内に限定
    • additional parameters: rs is the function name (e.g., rs=wfSajaxSearch); the rsargs[] array is the list of arguments of this function (e.g., rsargs[]=abcd passes the abcd string to the function).
    • the JavaScript function sajax_do_call for calling Ajax functions is defined in ajax.js .
  6. Project:Tech News/2017#Tech News: 2017-16
  7. Reading/Web/Desktop Improvements#May 2020: First deployment - officewiki and testwiki
  8. For performance reasons, the value of this field is not actually an offset (the index of the first entry to show)