|Language:||English • Deutsch • 日本語|
|MediaWiki version:||≥ 1.12|
To move a page, a move token is required. This token is equal to the edit token and the same for all pages, but changes at every login. Moves tokens can be obtained via action=tokens with type=move (MW 1.20+), or by using the following method:
Obtaining a move token
<?xml version="1.0" encoding="utf-8"?> <api> <query> <pages> <page pageid="1" ns="0" title="Main Page" touched="2007-09-03T20:32:21Z" lastrevid="20" counter="20" length="470" movetoken="58b54e0bab4a1d3fd3f7653af38e75cb+\" /> </pages> </query> </api>
Pages can be moved with action=move.
from: Title of the page you want to move. Cannot be used together with
fromid: Page ID of the page you want to move. Cannot be used together with
to: Title you want to rename the page to.
reason: Reason for the move (optional).
movetalk: Move the talk page, if it exists.
movesubpages: Move subpages, if applicable.
noredirect: Don't create a redirect. Requires the suppressredirect right, which by default is granted only to bots and sysops.
watch: Add the page and the redirect to your watchlist. Deprecated. Use the watchlist argument. (deprecated in 1.17)
unwatch: Remove the page and the redirect from your watchlist. Deprecated. Use the watchlist argument. (deprecated in 1.17)
watchlist: Unconditionally add or remove the page from your watchlist, use preferences or do not change watch (see API:Edit). 1.17+
ignorewarnings: Ignore any warnings.
Note: In this example, all parameters are passed in a GET request just for the sake of simplicity. However, action=move requires POST requests; GET requests will cause an error. Moving Main Pgae (sic) and its talk page to Main Page, without creating a redirect
<?xml version="1.0" encoding="utf-8"?> <api> <move from="Main Pgae" to="Main Page" reason="Oops, misspelling" talkfrom="Talk:Main Pgae" talkto="Talk:Main Page" /> </api>
All errors are formatted as:
<error code="code" info="info">
|nofrom||The from parameter must be set|
|noto||The to parameter must be set|
|notoken||The token parameter must be set|
|cantmove-anon||Anonymous users can't move pages|
|cantmove||You don't have permission to move pages|
|cantmovefile||You don't have permission to move files.
Note: If file moving is disabled altogether, you'll get an immobilenamespace error instead
|selfmove||Can't move a page to itself|
|immobilenamespace||You tried to move pages from or to a namespace that is protected from moving|
|articleexists||The destination article already exists and is not a redirect to the source article|
|protectedpage||You don't have permission to perform this move|
|protectedtitle||The destination article has been protected from creation|
|nonfilenamespace||Can't move a file to a non-file namespace|
|filetypemismatch||The new file extension doesn't match its type|
|mustbeposted||The move module requires a POST request|
NOTE: The Move API uses two additional error handling methods when the page move succeeded, but the talk page or sub-page move failed:
- Talk page: The relevant error will be returned in the
- Subpages: The relevant error will be returned as a standard
infostructure under the