Skip to content

mw wiki page move

Releasev0.35.0 · cfeceb67

mw wiki page move FROM TO [flags]

Move a page to a new title, preserving its history and leaving a redirect at the old title. Pages already redirecting directly to their intended existing destination are skipped. Other existing destinations are refused.

With –prefix, FROM and TO are literal title prefixes: every matching page keeps its suffix. Omit wildcards. Prefix moves include matching redirects and work across namespaces. Use –dry-run to inspect the complete plan without moving pages.

–limit N selects at most N pending source pages, sorted by title. Already-moved pages do not count towards the limit, so rerunning a limited batch advances to the next pages. The default, 0, selects all pending matches. The same limit applies to dry runs. Associated talk pages requested with –move-talk are additional to this limit. For an already-moved content page, an outstanding talk-page move must be handled explicitly.

MediaWiki automatically bot-marks move log entries when the authenticated session has the bot right. –bot requires that right on every request after login, including during a dry run, and fails if it is unavailable. Bot-marked entries can still be shown in Recent Changes. Bot passwords must include the high-volume editing grant as well as permission to move pages.

Batches stop on the first error; earlier moves remain in place. Inspect the reported results before retrying a partial batch. –move-talk also asks MediaWiki to move associated talk pages; talk-page errors are reported even if the content page moved successfully.

--bot
Require the bot right so MediaWiki bot-marks the move log entries
--dry-run
Read and display the move plan without moving pages
--interval <duration>
Delay between moves to respect wiki rate limits (for example, 10s) Default: 0s.
--limit <int>
Maximum number of pending source pages to move; already-moved pages are skipped (0 means all)
--move-talk
Also move associated talk pages when present
--prefix
Move every page with the literal FROM prefix, replacing it with TO
--reason <string>
Reason recorded in the move log Default: a Wikimedia CLI page move.
--anon
Use anonymous access instead of saved credentials
--help
Help for this command
--no-interaction
Do not ask any interactive questions
--password <string>
Wiki login password (or bot password)
--password-file <string>
Read the login password from a file
--profile <string>
Saved profile name or REALM/NAME
--realm <string>
Shared-login realm (wikimedia and wikibase-world are built in)
--username <string>
Wiki login username (use Name@bot for a bot password)
-v, --verbose <count>
Increase output verbosity. Example: --verbose=2 or -vv
--wiki <string>
Wiki URL or API endpoint
Terminal window
mw wiki page move 'Old title' 'New title' --profile wikimedia/addshore --wiki www.mediawiki.org
mw wiki page move --prefix 'Cli/ref/mw_docker' 'Cli/ref/mw_dev' --wiki www.mediawiki.org --dry-run
Report an issue with this page

Report a documentation issue

The report includes this page’s link, section and documentation version.

Review and submit on Phabricator, or run the command using your saved CLI profile. The command asks before creating the task.