moveBatch.php file is a maintenance script to move (rename) a batch of pages. If the target page already exist it will fail with an error message.


Option/Parameter Description
-u ‎<user> Username that will be shown in the log entries. If left empty, moves will be attributed to the user called Move page script.
-r ‎<reason> Reason for moves, enclose in "…" if it contains spaces. If empty, no reason will be shown in the logs.
-i ‎<interval> Number of seconds to sleep after each move. If empty, defaults to 0.
--noredirects Suppress creation of redirects
‎<listfile> File should contain lines of text in the following format:
existing name 1|new name 1
existing name 2|new name 2
existing name 3|new name 3


php /path/to/moveBatch.php --u=user --r=reason --noredirects /path/to/listfile.txt
Parameters need to be addressed with -- and filled with = as shown in the example above.

Suppose, A page called Manual:Wiki Edit was created in main namespace and we want to move it to Help: namespace. How to do that using moveBatch.php?

Command Code for batch moving will be like this:

\path\to\php.exe \path\to\moveBatch.php --u=user --r=reason --noredirects \path\to\listfiles.txt
  • If you have local server, Run Apache+MySQL
  • Make list of pages you want to move and save as xxx.txt file. Pages name should be arranged like this:
Manual:Wiki Edit|Help:Wiki Edit
Manual:How to use moveBatch.php|Help:How to use moveBatch.php
  • Open your CMD (Command Prompt window). To open do this press windows key+R key then write cmd and press Enter
  • In CMD show where is your php.exe located, then show where is your moveBatch.php located and finally give where is your list file location

Command will be look e.g. like this:

C:\xampp\core\php55\php.exe C:\xampp\htdocs\mw\maintenance\moveBatch.php --u=user --r=reason --noredirects C:\xxx.txt

That's it!