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  user right to access the special page.

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)

To add the  right to all sysops, so they can access the special page, you can use:

$wgGroupPermissions['sysop']['maintenance'] = true;

You probably want to add a new group, add that right to the new group, and add members to this group separately, in case not all sysops are trusted to run those scripts.

List of supported maintenance scripts
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
 * createAndPromote
 * runJobs (currently does not support localization)
 * showJobs (currently does not support localization)
 * sql
 * sql

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 array.

Changelog

 * Verion 2.2.0 (1 April 2014)
 * Migrated to MW 1.23+ I18n handling


 * Version 2.1.1 (12 April 2012)
 * If metadata.ini doesn't get parsed correctly (due to syntax errors, etc.), an error page is now displayed stating the fact.


 * 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.