매뉴얼:index.php 매개변수

This page is a translated version of the page Manual:Parameters to index.php and the translation is 30% complete.
Outdated translations are marked like this.

이 페이지는 미디어위키 소프트웨어의 메인 스크립트인 index.php 로의 매개변수의 부분적인 목록입니다. 이 매개변수 대부분은 대개 URL내에서 GET 매개변수로 전달되지만, POST 데이터로 전달할 수도 있습니다. purge 요청과 같은 몇몇 경우에는 POST가 요구됩니다.

이 문서의 정보는 완전하지 않습니다.[1]

페이지 개정 또는 버전

index.php의 매개 변수는 일반적으로 적용되며 적용되는 페이지와 관련된 의미를 갖습니다. 페이지 (또는 그 버전)는 다음 매개 변수 중 하나 이상을 입력하여 지정할 수 있습니다. https://en.wikipedia.org/w/index.php?title=Ferengi&curid=177126&diff=304901009&oldid=304764764

이름 설명
title 문서 페이지 다른 매개 변수에 따라 위키 페이지 또는 특수 문서일 수 있습니다. 위키 구성에서 특정 페이지를 사용하지 않으려면 SpecialPage_initList hook을 사용할 수 있습니다.
curid 위키 페이지의 ID입니다. title 값을 무시합니다.

(view와 edit처럼) 일부 동작은 문서의 튿정 판에 사용될 수도 있습니다. 문서의 특정 판은 다음 두 가지 매개변수로 지정하며, title과 문서 id를 생략할 수 있습니다.

이름 설명
oldid 판 ID
direction oldid로 지정되는 판 대신에 다음을 사용할 수 있습니다:
  • direction=prev: oldid의 1개 전 판입니다.
  • direction=next: oldid의 1개 후 판입니다.


다음은 action 매개 변수의 목록입니다.

이러한 동작은 LocalSettings.php 구성 설정을 통해 활성화/비활성화 시킬 수 있습니다. 사용 가능하다면 이 로컬 설정의 목록이 표시됩니다.[2]

이름 함수 예시
view view는 기본 동작입니다. view는 동작이 명시적으로 정해지지 않을 때 사용되는 동작입니다. www.mediawiki.org/w/index.php?title=Project:Sandbox&action=view
watch 문서를 사용자의 주시 목록에 추가합니다 www.mediawiki.org/w/index.php?title=Project:Sandbox&action=watch
unwatch 문서를 사용자의 주시 목록에서 제거합니다 www.mediawiki.org/w/index.php?title=Project:Sandbox&action=unwatch
delete 문서 삭제하기

기본적으로, delete는 사용자에게 사유를 명시하고 의사를 한번 더 묻는 양식을 반환합니다.[3]

revert 이미지의 이전 버전으로 되돌립니다. 다음 두 개의 추가 매개변수가 필요합니다:
  • oldimage - 되돌아갈 판 번호;
  • wpEditToken - 유효한 편집 토큰;
rollback 해당 문서의 마지막 편집자가 수정한 최근 편집들을 되돌립니다. 즉, 마지막 편집자가 편집하기 이전의 판으로 되돌립니다. 이 편집은 사소한 편집으로 표시되고 기본 편집 요약이 사용됩니다.[4]

다음 두개의 다른 매개변수가 필요합니다:

  • from은 기여가 되돌려질 사용자 이름입니다.
  • token은 되돌리기 토큰입니다. 사용자가 외부 사이트에서 링크나 버튼을 눌러 원치않는 되돌리기를 수행하는 것을 방지합니다.
protect 문서의 보호 수준을 표시하거나 변경합니다:
  • By default, this script returns a form showing the current protection levels of the page, allowing the user to change the protection levels of the page.[5]
unprotect Same page as protect (unprotect and protect are the same page, and do the same thing). www.mediawiki.org/w/index.php?title=Project:Sandbox&action=unprotect
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 Clears the page's cache, forcing the page to be redisplayed from its source.
  • This action is performed only if requested via a POST request; otherwise, a form to confirm purging is shown (pressing the OK button posts the purge request, which is then executed).


edit Shows the editor for the page.

The editor shown depends on the user preferences. See Editor.

submit When viewed directly (HTTP GET), shows the editor, like "edit".

When viewing by submitting a form (HTTP POST), performs various actions related to changing the page (see #What to do below for more details):

  • 문서 바꾸기,
  • preview a new version of the page, or
  • show the difference with a new version.
editredlink Same as edit.[6] www.mediawiki.org/w/index.php?title=Project:Sandbox&action=editredlink
history Shows the history of the page. (See history, below) www.mediawiki.org/w/index.php?title=Project:Sandbox&action=history
historysubmit When viewing the difference between revisions, after clicking "compare selected revisions" on the history page. This requires a "diff" and/or "oldid" parameter, otherwise it just shows the page itself. www.mediawiki.org/w/index.php?title=Project:Sandbox&action=historysubmit&diff=456290&oldid=456270
raw Shows the raw content of the page. (See Raw, below) A pop up window will open up, asking whether you would like to save the page in index.php.[7] www.mediawiki.org/w/index.php?title=Project:Sandbox&action=raw
ajax (1.27에서 구식화됨); (1.38 에서 제거됨) If enabled, calls a php function registered via $wgAjaxExportList ; see 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. translatewiki.net/w/i.php?title=Translating:MediaWiki&action=credits
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. www.mediawiki.org/w/index.php?title=Project:Sandbox&action=info
revisiondelete Set visibility restrictions on revision text, edit summary, and editor's username/IP address (requires deleterevision user right)

사용자 환경 설정 재설정

다음 매개변수는 일부 사용자 환경 설정을 재설정합니다. 다른 문단에서 설명하는 다른 매개변수는 "diffonly", "internaledit", "externaledit"입니다. 다음 파라미터는 "render"와 "raw"를 제외한 모든 동작에 영향을 줍니다.

이름 함수 예시
useskin Specify a skin www.mediawiki.org/w/index.php?useskin=modern
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 (1.35에서 구식화됨) 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. www.mediawiki.org/w/index.php?title=Project:Sandbox&debug=true
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. www.mediawiki.org/w/index.php?title=MediaWiki&safemode=1
useskinversion Specify a skin version[10] www.mediawiki.org/w/index.php?title=MediaWiki&useskinversion=2

읽기 및 렌더

View is the default action. If no other action is added to the URL, action=view is used. This action shows a page, a revision, or the difference between two revisions of the same or two different pages. Below is a (partial) list.

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;
예시: https://en.wikipedia.org/w/index.php?title=Special:Log&type=upload&from=20070814233520&until=20070814233625
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.
예시: https://en.wikipedia.org/w/index.php?title=Special:Contributions&limit=13&contribs=user&target=Atlgirl052005 - lists 13 edits per page.
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;
예시: https://en.wikipedia.org/w/index.php?title=Special:Contributions&offset=20090815195334&contribs=user&target=Atlgirl052005
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]
예시: https://en.wikipedia.org/w/index.php?title=Special:Contributions&offset=20090815195334&dir=prev&contribs=user&target=Atlgirl052005
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: https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&action=history&dir=prev&limit=1
a feed for the changes in the history is returned; allowed values are atom and rss. Can be disabled with $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 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:Creating pages with preloaded text ;
예시: https://en.wikipedia.org/wiki/Talk:Main_Page?action=edit&section=new&preload=Project:Sandbox
preloadparams[] (or preloadparams%5B%5D): Replace $1 style parameters in preload text. For example https://mediawiki.org/wiki/Project:Sandbox?action=edit&section=new&preload=Manual:Creating_pages_with_preloaded_text/param_demo&preloadparams%5b%5d=first%20value&preloadparams%5b%5d=second%20value 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;
예시: https://en.wikipedia.org/w/index.php?title=User_talk:5dsddddd&action=edit&section=new&preloadtitle=The+%5B%5BWP%3AARS%7CArticle+Rescue+Squadron%5D%5D
Example with both preloadtitle and preload: https://en.wikipedia.org/wiki/User_Talk:Ikip?action=edit&section=new&preload=Template:Article_Rescue_Squadron_ 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

What to do

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:Live preview 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.

선택적 추가 정보

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;
an optional comma-separated list of tags to be added to the edit. If any of the provided tags are not activated for manual use, the edit will be rejected.
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. If the target page exists, ignore the edit parameter and display the (now-)existing page instead. 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:Parameters to Special:Export

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

text field with new title.
reason to pre-select in the dropdown.
text field with reason.
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를 $1 동안 자동으로 막기" checkbox.
whether to select the "이 사용자 문서와 사용자 토론 문서를 주시하기" checkbox.
text field with reason.

Maxlag 매개변수

미디어위키 버전:
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에있는 모든 양식 매개 변수를 제출해야합니다. 어떤 종류의 정적 목록에 의존하면 미래의 파손을 초래할 수 있습니다. 미디어위키의 설치에 새 매개 변수를 등록하려면 $wgActions 을 참조하십시오.
  2. 추가로 ‘view’ 외의 동작을 비활성화할 때는 $wgActions 변수를 사용합니다. 그리고 $wgActions 는 모든 동작에 사용할 수 있게 됐습니다.

    또한 검색이 활성화되어 (공백이 아닌) search 매개변수가 제공되면 모든 동작이 무시되고 검색이 수행됩니다.

  3. wpEditToken의 값을 통해 유효한 편집 토큰이 보내진다면, 삭제는 POST 요청을 통해 수행됩니다. 이것은 사용자가 삭제를 승인할 때 발생하는 일입니다. 삭제 사유는 wpReason 인자의 값으로 보내집니다. 이 문자열은 삭제 기록에 기록됩니다. (logging 테이블의 log_comment_id 필드) 삭제는 이미지의 특정판을 삭제할 때도 수행됩니다. 이 때 oldimage 매개변수를 통해 판 번호를, wpEditToken 매개변수를 통해 유효한 편집 토큰을 전달해야 합니다. 이 경우 GET 요청을 통해서도 수행될 수 있습니다.
    • 만약 선택적 summary 인자가 주어진다면, 해당 값은 기본값 대신 편집 요약으로 사용됩니다.
    • 만약 bot 인자가 주어진다면, 해당 편집은 봇의 편집으로 표시됩니다. (recentchanges 테이블에 rc_bot=1로 기록됨)
    • bot 인자는 모든 [되돌리기] 링크에 &bot=1을 상속받도록 되돌리기 링크가 표시되는 모든 페이지에서도 사용됩니다.
    • 만약 hidediff 인자가 주어진다면, 수정사항의 차이 대신 성공 메시지가 표시됩니다. (이것은 사용자 환경 설정으로 강제할 수 있습니다.)
  4. These levels are changed to the values of mwProtect-level-edit and mwProtect-level-move if the request is a POST one and a valid edit token is passed as wpEditToken; parameter mwProtect-reason gives the reason for protection or unprotection which will be recorded in the page log; if mwProtect-cascade is also passed, cascading protection is applied (all transcluded pages are set to the same protection levels)
    • 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. For security reasons, in some versions of MediaWiki Raw is only allowed when using the "primary script access point", that is, when using the "ugly" URL form with index.php?title=...
    • requires $wgUseAjax to be true; the only callable functions are those in the array $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)

같이 보기