Extension:Maintenance

The Maintenance extension adds a special page for running various maintenance scripts (see below for the list of currently supported scripts). The user needs the 'maintenance' right to access the special page.

Installation

 * Download the correct package for your version of MediaWiki from the Extension Distributor according to the chart below:
 * {| class="datatable"

!MediaWiki Version!!Get this version from the distributor!!Maintenance extension version
 * 1.12 and earlier
 * colspan=2|Maintenance will not work on your version of MediaWiki
 * 1.13 to 1.15||1.15.x||1.0.3
 * 1.16 and later||Development version (trunk)||2.1.0
 * }
 * Upload and unpack the extension to your wiki's extension directory
 * Add the following near the end of your wiki's LocalSettings.php:
 * }
 * Upload and unpack the extension to your wiki's extension directory
 * Add the following near the end of your wiki's LocalSettings.php:
 * Installation can now be verified through Special:Version on your wiki

Configuration
The following are all of the configuration variables that Maintenance supports. To configure these, add them after the require_once call in LocalSettings.php


 * $wgMaintenanceDebug
 * Whether or not to show the "Output globals at the end of processing for debugging" checkbox (default false)

2.x branch (current)
This extension supports currently the following scripts as of version 2.1.0. Please note that not all of the features of the following scripts may be implemented in the extension:
 * attachLatest
 * benchmarkPurge
 * changePassword
 * checkAutoLoader
 * checkBadRedirects
 * checkImages
 * checkSyntax
 * checkUsernames
 * cleanupCaps
 * cleanupSpam
 * clear_interwiki_cache
 * createAndPromote
 * runJobs (currently does not support localization)
 * showJobs (currently does not support localization)
 * sql

1.x branch (legacy)
This extension supports currently the following scripts as of version 1.0.3. Please note that not all of the features of the following scripts may be implemented in the extension:
 * changePassword
 * createAndPromote
 * deleteBatch
 * deleteRevision
 * eval
 * initEditCount
 * initStats
 * moveBatch
 * reassignEdits
 * runJobs
 * showJobs
 * sql
 * stats

Extending the list of scripts
As of version 2.0.0, it is possible to extend the list of scripts with a little work. The metadata.ini file bundled with the Maintenance extension contains a list of every supported script. This file holds relational data in order to translate the output of English-only scripts, as well as data stating what sort of options the script has.

Below is an example of a custom script that can be inserted into the file. The script is named scriptName.php, and is either a default script (in the maintenance/ directory), or a script added to the $wgMaintenanceScripts array.

Changelog

 * Version 2.1.0 (21 March 2012)
 * Added $wgMaintenanceDebug global, fixed missing script parsing (no longer fails upon encountering a missing script), added cleanupSpam, clear_interwiki_cache, and createAndPromote scripts.


 * Version 2.0.0 (5 March 2011)
 * Updated Maintenance extension to work with MediaWiki 1.16. This change breaks compatibility with MediaWiki 1.15 and below. Now supports adding scripts via an ini file so that expansion upon the script list is somewhat easier.


 * Version 1.0.3 (28 December 2008)
 * Added reassignEdits script.


 * Version 1.0.2 (22 December 2008)
 * Added eval and sql scripts.


 * Version 1.0.1 (22 November 2008)
 * Fixed moveBatch script. Page deletions done by deleteBatch or deleteRevision scripts are now logged to the user called 'Delete page script'.


 * Version 1.0 (28 April 2008)
 * Initial release, supports 10 maintenance scripts.