Manual:namespaceDupes.php
MediaWiki file: namespaceDupes.php | |
---|---|
Location: | maintenance/ |
Source code: | master • 1.43.0 • 1.42.4 • 1.39.11 |
Classes: | NamespaceDupes |
namespaceDupes.php is a maintenance script located in the maintenance
directory that can be used to clean up inaccessible titles after adding a namespace (or interwiki prefix).
Usage
editGo to the maintenance directory and run:
php namespaceDupes.php --fix
Options since MediaWiki 1.25
editOption/Parameter | Description |
---|---|
--fix | Attempt to automatically fix errors. You must pass this option for the script to actually perform any change to the database. Otherwise, it will just print what would be done. The change instruction is a second option (e.g. --add-prefix ).
|
--merge | Instead of renaming conflicts, do a history merge with the correct title (in case a page with the valid title already exists). This option will refuse to work if the last revision of the inaccessible page is newer than the existing page where it would be merged, because it would require to refresh the search index, recent changes review, etc. In that case, |
--add-suffix=<text> | Dupes will be renamed with correct namespace with <text> appended after the article name |
--add-prefix=<text> | Dupes will be renamed with correct namespace with <text> prepended before the article name |
--source-pseudo-namespace=<namespace name> | Move all pages with the given source prefix (with an implied colon following it). If --dest-namespace is not specified, the colon will be replaced with a hyphen. |
--dest-namespace=<namespace number> | In combination with --source-pseudo-namespace, specify the namespace ID of the destination. |
--move-talk | If this is specified, pages in the Talk namespace that begin with a conflicting prefix will be renamed, for example Talk:File:Foo -> File_Talk:Foo |
Options before MediaWiki 1.25
editOption/Parameter | Description |
---|---|
--fix | Attempt to automatically fix errors. You must pass this option for the script to actually perform any change to the database. Otherwise, it will just print what would be done. |
--prefix=<text> | Do an explicit check for the given title prefix appended after the article name. |
--suffix=<text> | Dupes will be renamed with correct namespace with <text> appended after the article name |