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
 * attachLatest.php
 * attribute.php
 * backup.inc
 * backupPrefetch.inc
 * benchmarkPurge.php
 * changePassword.php
 * checkUsernames.php
 * cleanupCaps.php
 * cleanupDupes.inc
 * cleanupImages.php
 * cleanupSpam.php
 * cleanupTable.inc
 * cleanupTitles.php
 * cleanupWatchlist.php
 * clear_interwiki_cache.php
 * clear_stats.php
 * commandLine.inc
 * convertLinks.inc
 * convertLinks.php
 * counter.php
 * createAndPromote.php creates a user (and makes it a sysop)
 * deleteArchivedFiles.inc
 * deleteArchivedFiles.php
 * deleteArchivedRevisions.inc
 * deleteArchivedRevisions.php
 * deleteBatch.php
 * deleteDefaultMessages.php
 * deleteImageMemcached.php
 * deleteOldRevisions.inc
 * deleteOldRevisions.php
 * deleteOrphanedRevisions.inc.php
 * deleteOrphanedRevisions.php
 * deleteRevision.php
 * dumpBackup.php
 * dumpHTML.inc
 * dumpHTML.php
 * dumpInterwiki.inc
 * dumpInterwiki.php
 * dumpLinks.php
 * dumpSisterSites.php
 * dumpTextPass.php
 * dumpUploads.php
 * edit.php edits a page and creates a user, on demand and creates the page, if needed
 * eval.php
 * findhooks.php
 * FiveUpgrade.inc
 * fixSlaveDesync.php
 * fixTimestamps.php
 * fixUserRegistration.php
 * fuzz-tester.php
 * generateSitemap.php
 * getLagTimes.php
 * getSlaveServer.php
 * importDump.php
 * importImages.inc.php
 * importImages.php
 * importLogs.inc
 * importLogs.php
 * importTextFile.php
 * importUseModWiki.php
 * initEditCount.php
 * initStats.inc
 * initStats.php
 * installExtension.php
 * mcc.php
 * mctest.php
 * moveBatch.php
 * mwdocgen.php
 * namespace2sql.php
 * namespaceDupes.php
 * nextJobDB.php
 * nukeNS.php
 * nukePage.inc
 * nukePage.php delete a page
 * orphans.php
 * ourusers.php
 * parserTests.inc
 * parserTests.php
 * parserTestsParserHook.php
 * parserTestsParserTime.php
 * parserTestsStaticParserHook.php
 * purgeList.php
 * purgeOldText.inc
 * purgeOldText.php
 * reassignEdits.inc.php
 * reassignEdits.php
 * rebuildall.php
 * rebuildImages.php
 * rebuildInterwiki.inc
 * rebuildInterwiki.php
 * rebuildrecentchanges.inc
 * rebuildrecentchanges.php
 * rebuildtextindex.inc
 * rebuildtextindex.php
 * refreshImageCount.php
 * refreshLinks.inc
 * refreshLinks.php
 * removeUnusedAccounts.inc
 * removeUnusedAccounts.php
 * renamewiki.php
 * renderDump.php
 * runJobs.php
 * showJobs.php
 * showStats.php
 * sql.php
 * stats.php
 * undelete.php
 * update.php
 * updateArticleCount.inc.php
 * updateArticleCount.php
 * updateRestrictions.php
 * updaters.inc
 * updateSearchIndex.inc
 * updateSearchIndex.php
 * updateSpecialPages.php
 * Manual:upgrade1_5.php
 * userDupes.inc
 * userOptions.inc
 * userOptions.php
 * 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
 * rebuildRecentchanges.inc
 * upgradeWatchlist.php

/maintenance/dtrace/

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

/maintenance/language/

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

/maintenance/storage/

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