Manual:Maintenance scripts

The maintenance scripts are located in the maintenance subdirectory of a MediaWiki installation.

Executing the maintenance scripts
In order to run the maintenance scripts, you must first rename the file AdminSettings.sample located in the root directory of your wiki to AdminSettings.php and fill in the required connection instructions modifying; to an existing administration user allowed to modify the appropriate database of your MediaWiki instance within MySQL.

The maintenance scripts must then be executed from the command line. $ ssh username@your.domain.com $ cd maintenance $ php rebuildall.php
 * Step 1: Open a command line connection to your server using a terminal emulator
 * Step 2: Change the current directory to the maintenance subdirectory:
 * Step 3: Execute the maintenance script that needs to be run:
 * If you get an error (for example: php.exe is no valid Win32 application), try the following:

$ php-cgi rebuildall.php

List of maintenance scripts
Here is the list of files included in the maintenance subdirectory located at the root of a MediaWiki installation. This list was created from the documentation located in the Documentation trunk and may not acurately reflect the contents of the maintenance subdirectory of the current release of the software.

You can contribute to this manual by keeping this list up to date, adding a description of theses files' specific purpose and of how an administrator should use them (command line examples, etc.).

/maintenance/

 * addwiki.php
 * Manual:attachLatest.php
 * Manual:attribute.php
 * Manual:backup.inc
 * Manual:backupPrefetch.inc
 * Manual:benchmarkPurge.php
 * Manual:changePassword.php
 * Manual:checkUsernames.php
 * Manual:cleanupCaps.php
 * Manual:cleanupDupes.inc
 * Manual:cleanupImages.php
 * Manual:cleanupSpam.php
 * Manual:cleanupTable.inc
 * Manual:cleanupTitles.php
 * Manual:cleanupWatchlist.php
 * Manual:clear_interwiki_cache.php
 * Manual:clear_stats.php
 * Manual:commandLine.inc
 * Manual:convertLinks.inc
 * Manual:convertLinks.php
 * Manual:counter.php
 * Manual:createAndPromote.php
 * Manual:deleteArchivedFiles.inc
 * Manual:deleteArchivedFiles.php
 * Manual:deleteArchivedRevisions.inc
 * Manual:deleteArchivedRevisions.php
 * Manual:deleteBatch.php
 * Manual:deleteDefaultMessages.php
 * Manual:deleteImageMemcached.php
 * Manual:deleteOldRevisions.inc
 * Manual:deleteOldRevisions.php
 * Manual:deleteOrphanedRevisions.inc.php
 * Manual:deleteOrphanedRevisions.php
 * Manual:deleteRevision.php
 * Manual:dumpBackup.php
 * Manual:dumpHTML.inc
 * dumpHTML.php
 * Manual:dumpInterwiki.inc
 * Manual:dumpInterwiki.php
 * Manual:dumpLinks.php
 * Manual:dumpSisterSites.php
 * Manual:dumpTextPass.php
 * Manual:dumpUploads.php
 * Manual:edit.php
 * Manual:eval.php
 * Manual:findhooks.php
 * Manual:FiveUpgrade.inc
 * Manual:fixSlaveDesync.php
 * Manual:fixTimestamps.php
 * Manual:fixUserRegistration.php
 * Manual:fuzz-tester.php
 * Manual:generateSitemap.php
 * getLagTimes.php
 * Manual:getSlaveServer.php
 * Manual:importDump.php
 * Manual:importImages.inc.php
 * importImages.php
 * Manual:importLogs.inc
 * Manual:importLogs.php
 * Manual:importTextFile.php
 * Manual:importUseModWiki.php
 * Manual:initEditCount.php
 * Manual:initStats.inc
 * Manual:initStats.php
 * Manual:installExtension.php
 * Manual:mcc.php
 * Manual:mctest.php
 * Manual:moveBatch.php
 * Manual:mwdocgen.php
 * Manual:namespace2sql.php
 * Manual:namespaceDupes.php
 * Manual:nextJobDB.php
 * Manual:nukeNS.php
 * Manual:nukePage.inc
 * Manual:nukePage.php
 * Manual:orphans.php
 * Manual:ourusers.php
 * Manual:parserTests.inc
 * Manual:parserTests.php
 * Manual:parserTestsParserHook.php
 * Manual:parserTestsParserTime.php
 * Manual:parserTestsStaticParserHook.php
 * Manual:purgeList.php
 * Manual:purgeOldText.inc
 * Manual:purgeOldText.php
 * Manual:reassignEdits.inc.php
 * Manual:reassignEdits.php
 * rebuildall.php
 * Manual:rebuildImages.php
 * Manual:rebuildInterwiki.inc
 * Manual:rebuildInterwiki.php
 * Manual:rebuildrecentchanges.inc
 * Manual:rebuildrecentchanges.php
 * Manual:rebuildtextindex.inc
 * rebuildtextindex.php
 * Manual:refreshImageCount.php
 * Manual:refreshLinks.inc
 * refreshLinks.php
 * Manual:removeUnusedAccounts.inc
 * Manual:removeUnusedAccounts.php
 * Manual:renamewiki.php
 * Manual:renderDump.php
 * Manual:runJobs.php
 * Manual:showJobs.php
 * Manual:showStats.php
 * Manual:sql.php
 * Manual:stats.php
 * Manual:undelete.php
 * update.php
 * Manual:updateArticleCount.inc.php
 * Manual:updateArticleCount.php
 * Manual:updateRestrictions.php
 * Manual:updaters.inc
 * Manual:updateSearchIndex.inc
 * Manual:updateSearchIndex.php
 * Manual:updateSpecialPages.php
 * Manual:upgrade1_5.php
 * Manual:userDupes.inc
 * Manual:userOptions.inc
 * Manual:userOptions.php
 * Manual:waitForSlave.php

/maintenance/archives/
The scripts included in the archive subdirectory have been designed for updating databases from older versions of the software.
 * Manual:populateSha1.php
 * Manual:rebuildRecentchanges.inc
 * Manual:upgradeWatchlist.php

/maintenance/dtrace/

 * Manual:counts.d
 * Manual:tree.d

/maintenance/language/

 * Manual:alltrans.php
 * Manual:checkExtensions.php
 * Manual:checkLanguage.inc
 * Manual:checkLanguage.php
 * Manual:date-formats.php
 * Manual:diffLanguage.php
 * Manual:digit2html.php
 * Manual:dumpMessages.php
 * Manual:function-list.php
 * Manual:lang2po.php
 * Manual:langmemusage.php
 * Manual:languages.inc
 * Manual:messages.inc
 * Manual:messageTypes.inc
 * Manual:rebuildLanguage.php
 * Manual:splitLanguageFiles.inc
 * Manual:splitLanguageFiles.php
 * Manual:transstat.php
 * Manual:validate.php
 * Manual:writeMessagesArray.inc

/maintenance/storage/

 * Manual:checkStorage.php
 * Manual:compressOld.inc
 * Manual:compressOld.php
 * Manual:dumpRev.php
 * Manual:moveToExternal.php
 * Manual:resolveStubs.php