wiki.techinc.nl/maintenance
Derick A fd02dc6aac maintenance: Add file extension as expected for PHP scripts
The example in the block comment above uses the .php file extension
in the example but the usage string omits it and it can be misleading.

If the extension (.php) is not given, `runScript.php` will think that
the script doesn't exist and trigger a different code path rather than
actually run the script in question.

Change-Id: I4d60f65629472f2243ead2c8768f597ae23b6beb
2020-01-29 11:44:06 +01:00
..
archives Replace deprecated IP class with IPUtils 2020-01-24 18:49:33 +01:00
benchmarks benchmarks: Exclude from PHPUnit test coverage 2019-12-18 01:24:42 +00:00
dev maintenance: Enable gzip in router.php for static files 2019-09-30 14:09:35 +01:00
includes Pass 1 always as string to IDatabase::select and friends 2020-01-11 00:36:13 +00:00
jsduck mediawiki.base: Remove mw.html.Cdata support 2019-10-04 02:29:36 +01:00
language Fix namespace for usage of StaticArrayWriter 2020-01-15 18:48:38 +01:00
locking
mediawiki.Title build: Update linters and fix errors 2019-10-23 11:22:41 +01:00
postgres Postgres: Add PK to redirect table 2019-11-27 08:24:49 +00:00
sqlite/archives Replace deprecated IP class with IPUtils 2020-01-24 18:49:33 +01:00
storage Upgrade phan to 0.9.1 2020-01-25 10:53:26 +00:00
term Set public for override of Maintenance functions 2019-10-09 20:41:33 +02:00
.htaccess
addChangeTag.php Do not output wikitext in maintenance script 2019-09-20 18:28:34 +02:00
addRFCandPMIDInterwiki.php
addSite.php Mark options as requiring parameters in addSite.php 2019-12-02 23:30:50 +00:00
attachLatest.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
categoryChangesAsRdf.php Add string casts when using array_keys() with SQL query conditions 2019-12-16 16:05:18 -05:00
cdb.php Expand cdb.php functionality 2019-11-11 23:40:37 -08:00
changePassword.php Do not output wikitext in maintenance script 2019-09-20 18:28:34 +02:00
checkBadRedirects.php
checkComposerLockUpToDate.php
checkDependencies.php Use Maintenance::getConfig in some maintenance scripts 2019-09-01 20:55:08 +02:00
checkImages.php
checkLess.php tests: Require PHPUnit 6, drop PHPUnit 4 as an option 2019-10-03 08:58:03 -07:00
checkUsernames.php Set public for override of Maintenance functions 2019-10-09 20:41:33 +02:00
cleanupAncientTables.php
cleanupBlocks.php Rename Block to MediaWiki\Block\DatabaseBlock 2019-05-28 12:20:48 +01:00
cleanupCaps.php Do not output wikitext in maintenance script 2019-09-20 18:28:34 +02:00
cleanupEmptyCategories.php Remove a few obscure "done" and "empty" comments 2019-01-30 20:35:14 +00:00
cleanupImages.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
cleanupInvalidDbKeys.php Migrate various callers away from wfWikiId() to WikiMap 2019-07-12 01:02:00 +00:00
cleanupPreferences.php Use Maintenance::getConfig in some maintenance scripts 2019-09-01 20:55:08 +02:00
cleanupRemovedModules.php resourceloader: Instantiate main class via ServiceWiring 2019-02-18 17:55:09 +00:00
cleanupRevActorPage.php MergeHistory: Update revactor_page too 2019-09-17 07:17:38 +00:00
cleanupSpam.php phan: Disable enable_class_alias_support 2019-09-15 08:26:52 +00:00
cleanupTable.inc Avoid uses of wfWikiId() in maintenance/ 2019-09-24 15:42:00 -07:00
cleanupTitles.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
cleanupUploadStash.php Handle null from FileBackend::getFileList 2019-12-04 20:55:42 +01:00
cleanupUsersWithNoId.php cleanupUsersWithNoId.php: Handle missing fields 2019-11-13 08:40:52 +00:00
cleanupWatchlist.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
clearInterwikiCache.php Remove usages of $wgMemc 2020-01-20 19:41:32 +01:00
CodeCleanerGlobalsPass.inc
commandLine.inc
compareParserCache.php Use RevisionRenderer for rendering ParserOutput 2018-09-11 15:25:39 +00:00
compareParsers.php Set method visibility on maintenance scripts 2019-11-16 22:54:17 +00:00
convertExtensionToRegistration.php Attempt to automatically fix start of config vars being __DIR__ 2019-11-04 16:21:04 +00:00
convertLinks.php Merge "Fix use of argument perfLogFilename in convertLinks.php" 2019-09-06 10:04:38 +00:00
convertUserOptions.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
copyFileBackend.php Convert FileBackendGroup to service 2019-10-25 10:46:20 +03:00
copyJobQueue.php Replace wfWiki() usage with WikiMap in some additional places 2019-07-04 21:58:42 +00:00
createAndPromote.php Do not output wikitext in maintenance script 2019-09-20 18:28:34 +02:00
createCommonPasswordCdb.php Remove Language::factory and getParentLanguage use 2019-10-27 12:34:28 +02:00
deduplicateArchiveRevId.php Pass 1 always as string to IDatabase::select and friends 2020-01-11 00:36:13 +00:00
deleteArchivedFiles.php filerepo: Use @method LocalRepo::newFile() to document the return type 2019-09-04 20:12:23 +02:00
deleteArchivedRevisions.php
deleteAutoPatrolLogs.php
deleteBatch.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
deleteDefaultMessages.php User: Allow newSystemUser() to create over anonymous actors 2019-11-01 10:36:59 -04:00
deleteEqualMessages.php
deleteLocalPasswords.php
deleteOldRevisions.php Set method visibility on maintenance scripts 2019-11-16 22:54:17 +00:00
deleteOrphanedRevisions.php Improve param docs 2019-11-28 19:08:59 +01:00
deleteSelfExternals.php Use new externallinks.el_index_60 field 2018-11-12 22:33:18 +00:00
deleteTag.php changetags: Change new canDeleteTag() boolean param to int flag 2019-11-17 10:22:02 -05:00
doMaintenance.php Make sure DBLoadBalancerFactory service is not disabled 2019-11-07 00:09:18 +08:00
Doxyfile Doxygen: Fix ignoring @phan notation, also ignore @return-taint 2019-12-30 00:03:49 +00:00
dumpBackup.php Set method visibility on maintenance scripts 2019-11-16 22:54:17 +00:00
dumpCategoriesAsRdf.php Update PHPDoc types in several maintenance scripts and related 2019-03-07 17:54:26 +00:00
dumpIterator.php Set method visibility on maintenance scripts 2019-11-16 22:54:17 +00:00
dumpLinks.php
dumpTextPass.php move most of dumpTextPass to an include file so it can be subclassed 2019-05-13 10:14:09 +03:00
dumpUploads.php Set method visibility on maintenance scripts 2019-11-16 22:54:17 +00:00
edit.php Do not output wikitext in maintenance script 2019-09-20 18:28:34 +02:00
emptyUserGroup.php Add a maintenance script to remove all users from a User Group 2018-09-25 00:57:16 +00:00
eraseArchivedFile.php Unsuppress another phan issue (part 7) 2019-09-03 17:19:21 +00:00
eval.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
exportSites.php
fetchText.php Make BackupDumper MCR compatible (main slot only) 2019-03-14 13:19:51 +00:00
fileOpPerfTest.php Convert FileBackendGroup to service 2019-10-25 10:46:20 +03:00
findDeprecated.php Suppress PhanUndeclaredProperty for custom properties and phan bugs 2019-09-14 13:22:54 +00:00
findHooks.php Fix new phan errors, part 7 2019-10-21 22:10:20 +00:00
findMissingFiles.php Add string casts when using array_keys() with SQL query conditions 2019-12-16 16:05:18 -05:00
findOrphanedFiles.php Set public for override of Maintenance functions 2019-10-09 20:41:33 +02:00
fixDefaultJsonContentPages.php maintenance: Avoid usage of deprecated Revision::* constants 2019-07-21 11:35:09 +01:00
fixDoubleRedirects.php
fixExtLinksProtocolRelative.php
fixTimestamps.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
fixUserRegistration.php
formatInstallDoc.php Set public for override of Maintenance functions 2019-10-09 20:41:33 +02:00
generateJsonI18n.php Add /** @var SplFileInfo $fileInfo */ docs where needed 2019-03-14 15:04:05 +01:00
generateLocalAutoload.php AutoloadGenerator: Filter PSR4-compliant classes instead of ignoring directories 2018-09-20 15:15:27 -04:00
generateSitemap.php Set method visibility on maintenance scripts 2019-11-16 22:54:17 +00:00
getConfiguration.php Allow extensions to add params to the update.php maintenance script 2019-03-26 21:12:49 -05:00
getLagTimes.php Use namespaced IPUtils class 2020-01-01 02:36:49 -08:00
getReplicaServer.php maintenance/getReplicaServer.php: Remove reference to long-deleted config var 2019-09-09 10:25:38 -04:00
getSlaveServer.php
getText.php phan: Disable enable_class_alias_support 2019-09-15 08:26:52 +00:00
importDump.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
importImages.php Do not output wikitext in maintenance script 2019-09-20 18:28:34 +02:00
importSites.php
importSiteScripts.php Deprecate the Http class 2019-05-06 12:07:26 +03:00
importTextFiles.php Remove unnecessary semi-colons 2019-06-12 14:35:59 +01:00
initEditCount.php Migrate various callers away from wfWikiId() to WikiMap 2019-07-12 01:02:00 +00:00
initSiteStats.php
initUserPreference.php
install.php Disable $wgServer autodetection to prevent cache poisoning attacks 2019-10-30 15:49:41 +11:00
interwiki.list
interwiki.sql
invalidateUserSessions.php
jsparse.php maintenance: Deprecate Maintenance::hasArg/getArg with no param 2019-03-29 14:37:46 +01:00
lag.php
Maintenance.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
Makefile
makeTestEdits.php
manageForeignResources.php resources: Improve foreign-resources docs and error messages 2019-03-24 20:57:46 +00:00
manageJobs.php Use DB domain in JobQueueGroup and make WikiMap domain ID methods stricter 2018-11-07 04:46:56 +00:00
mcc.php Fix new phan errors, part 7 2019-10-21 22:10:20 +00:00
mctest.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
mergeMessageFileList.php Set public for override of Maintenance functions 2019-10-09 20:41:33 +02:00
migrateActors.php Move migrateActors.php to includes 2019-02-09 11:42:38 +01:00
migrateArchiveText.php build: Upgrade phan to 0.9.0 2019-12-07 20:16:19 +00:00
migrateComments.php build: Upgrade phan to 0.9.0 2019-12-07 20:16:19 +00:00
migrateFileRepoLayout.php Fix new phan errors, part 4 2019-10-12 10:35:31 +00:00
migrateImageCommentTemp.php Migrate image descriptions from image_comment_temp 2018-10-02 10:30:00 -04:00
migrateUserGroup.php
minify.php resourceloader: Rewrite the minify.php maintenance script 2019-08-06 17:39:19 +01:00
moveBatch.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
mwdoc-filter.php docs: Factor out MWDoxygenFilter from mwdoc-filter.php with tests 2019-09-05 18:22:23 +01:00
mwdocgen.php docs: Ignore extensions/ and skins/ in mwdocgen.php by default 2019-09-14 21:58:03 +01:00
mwjsduck-gen
mysql.php Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
namespaceDupes.php Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
nukeNS.php Unsuppress another phan issue (part 7) 2019-09-03 17:19:21 +00:00
nukePage.php Avoid using deprecated SiteStatsUpdate constructor 2019-07-05 23:26:17 -07:00
orphans.php Normalize "LEFT OUTER JOIN" to "LEFT JOIN" in SQL queries 2019-03-06 14:01:20 -08:00
pageExists.php maintenance: Deprecate Maintenance::hasArg/getArg with no param 2019-03-29 14:37:46 +01:00
parse.php Use the ?: shortcut from PHP 5.3 where it makes sense 2019-01-12 21:56:41 +00:00
patchSql.php
populateArchiveRevId.php Fix new phan errors, part 7 2019-10-21 22:10:20 +00:00
populateBacklinkNamespace.php maintenance: Remove unused code from several maintenance scripts 2019-03-03 16:57:19 +00:00
populateCategory.php Pass options as array to IDatabase::insert 2019-06-07 19:12:35 +02:00
populateChangeTagDef.php maintenance/populateChangeTagDef.php: Handle missing valid_tags table 2019-08-14 11:57:12 -04:00
populateContentModel.php Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
populateContentTables.php NameTableStore: ensure consistency upon rollback. 2019-10-10 12:03:29 +02:00
populateExternallinksIndex60.php DatabasePostgres: Ignore "IGNORE" option to update() 2019-02-20 10:39:45 -05:00
populateFilearchiveSha1.php
populateImageSha1.php Unsuppress another phan issue (part 7) 2019-09-03 17:19:21 +00:00
populateInterwiki.php Pass options as array to IDatabase::insert 2019-06-07 19:12:35 +02:00
populateIpChanges.php Use namespaced IPUtils class 2020-01-01 02:36:49 -08:00
populateLogSearch.php Replace deprecated IP class with IPUtils 2020-01-24 18:49:33 +01:00
populateLogUsertext.php
populateParentId.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
populatePPSortKey.php Use array for 'ORDER BY' 2019-11-29 23:01:07 +01:00
populateRecentChangesSource.php
populateRevisionLength.php phan: Disable enable_class_alias_support 2019-09-15 08:26:52 +00:00
populateRevisionSha1.php Unsuppress more phan issues (part 3) 2019-08-31 16:38:55 +00:00
preprocessDump.php Remove all traces of preprocessorClass from $wgParserConf 2020-01-25 13:15:16 -05:00
preprocessorFuzzTest.php Set method visibility on maintenance scripts 2019-11-16 22:54:17 +00:00
protect.php maintenance: Deprecate Maintenance::hasArg/getArg with no param 2019-03-29 14:37:46 +01:00
pruneFileCache.php No yoda conditions 2018-11-21 17:54:39 +01:00
purgeChangedFiles.php maintenance: Add missing limit parameters to some explode() 2019-03-01 17:17:40 +00:00
purgeChangedPages.php Unsuppress PhanParamsTooMany 2019-10-10 12:44:08 -07:00
purgeExpiredUserrights.php
purgeList.php maintenance: Rename purgeList.php --purge to --db-touch 2019-10-04 00:02:36 +00:00
purgeModuleDeps.php Remove @author Timo Tijhof from various file headers 2019-07-08 21:56:24 +00:00
purgeOldText.php
purgePage.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
purgeParserCache.php Remove Language::factory and getParentLanguage use 2019-10-27 12:34:28 +02:00
README
reassignEdits.php Improve param docs 2019-11-28 19:08:59 +01:00
rebuildall.php
rebuildFileCache.php Setup: Move MWDebug logic to MWDebug.php 2019-09-04 16:33:25 +00:00
rebuildImages.php Set method visibility on maintenance scripts 2019-11-16 22:54:17 +00:00
rebuildLocalisationCache.php Add option to override storeClass in rebuildLocalisationCache 2019-12-23 19:56:18 +01:00
rebuildmessages.php maintenance: Remove cross-wiki purging from rebuildmessages.php 2019-08-31 14:53:19 +01:00
rebuildrecentchanges.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
rebuildtextindex.php maintenance: Fix bad method call in RebuildTextIndex 2019-08-24 19:53:27 +00:00
recountCategories.php maintenance: Explicitly declare all used properties 2019-09-09 09:47:41 +00:00
refreshExternallinksIndex.php Use new externallinks.el_index_60 field 2018-11-12 22:33:18 +00:00
refreshFileHeaders.php Set public for override of Maintenance functions 2019-10-09 20:41:33 +02:00
refreshImageMetadata.php Set method visibility on maintenance scripts 2019-11-16 22:54:17 +00:00
refreshLinks.php phan: Disable enable_class_alias_support 2019-09-15 08:26:52 +00:00
removeInvalidEmails.php Remove "Squiz.WhiteSpace.FunctionSpacing" from phpcs exclusions 2019-05-11 02:44:26 +01:00
removeUnusedAccounts.php Mostly drop old pre-actor user schemas 2019-09-09 11:38:36 -04:00
renameDbPrefix.php Various fixes for phan-taint-check 2019-03-16 21:12:40 +00:00
renameRestrictions.php Add renameRestrictions.php maintenance script 2019-11-07 22:29:25 +01:00
renderDump.php maintenance: Explicitly declare all used properties 2019-09-09 09:47:41 +00:00
resetAuthenticationThrottle.php Use namespaced IPUtils class 2020-01-01 02:36:49 -08:00
resetPageRandom.php Provide a script to reset the page_random column 2018-11-09 15:07:48 -07:00
resetUserEmail.php maintenance: Remove arguments that match their default values 2019-02-27 21:13:57 +00:00
resetUserTokens.php Simplify some code by changing single-scope properties to local variables 2019-09-07 16:59:20 +00:00
rollbackEdits.php rollbackEdits.php: Cosmetic changes of outputs 2019-01-10 13:56:21 +00:00
runBatchedQuery.php
runJobs.php Refactor edit stashing into a PageEditStash service 2019-04-17 12:53:03 -07:00
runScript.php maintenance: Add file extension as expected for PHP scripts 2020-01-29 11:44:06 +01:00
shell.php Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
showJobs.php
showSiteStats.php
sql.php Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
sqlite.inc
sqlite.php maintenance: Fix bogus IDatabase method calls in sqlite.php 2019-08-24 19:54:50 +00:00
syncFileBackend.php Convert FileBackendGroup to service 2019-10-25 10:46:20 +03:00
tables.sql Use namespaced IPUtils class 2020-01-01 02:36:49 -08:00
tidyUpT39714.php Replace some oldskool @see with @inheritDoc 2019-11-08 18:00:27 +00:00
undelete.php maintenance: Deprecate Maintenance::hasArg/getArg with no param 2019-03-29 14:37:46 +01:00
update-keys.sql
update.php Set method visibility on maintenance scripts 2019-11-16 22:54:17 +00:00
updateArticleCount.php
updateCollation.php Set method visibility on maintenance scripts 2019-11-16 22:54:17 +00:00
updateCredits.php Check for intl extension in updateCredits.php 2019-02-01 19:57:56 +01:00
updateDoubleWidthSearch.php Write Latin and other scripts with captial letter 2018-10-05 18:49:08 +02:00
updateExtensionJsonSchema.php Upgrade phan to 0.9.1 2020-01-25 10:53:26 +00:00
updateRestrictions.php Refactor the updateRestrictions.php maintenance script 2019-10-04 20:22:58 +02:00
updateSearchIndex.php Migrate various callers away from wfWikiId() to WikiMap 2019-07-12 01:02:00 +00:00
updateSpecialPages.php Add a run mode to $wgDisableQueryPageUpdate 2019-09-26 22:33:53 +00:00
uppercaseTitlesForUnicodeTransition.php Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull 2020-01-10 14:17:13 -08:00
userDupes.inc Avoid uses of wfWikiId() in maintenance/ 2019-09-24 15:42:00 -07:00
userOptions.php Fix typo in userOptions.php help text 2019-10-22 14:52:14 +08:00
validateRegistrationFile.php Remove "Squiz.WhiteSpace.FunctionSpacing" from phpcs exclusions 2019-05-11 02:44:26 +01:00
view.php maintenance: Avoid usage of deprecated Revision::* constants 2019-07-21 11:35:09 +01:00
wrapOldPasswords.php Add --update option to wrapOldPasswords.php 2019-10-14 08:16:49 +00:00

== MediaWiki Maintenance ==

The .sql scripts in this directory are not intended to be run standalone,
although this is appropriate in some cases, e.g. manual creation of blank tables
prior to an import.

Most of the PHP scripts need to be run from the command line. Prior to doing so,
ensure that the LocalSettings.php file in the directory above points to the
proper installation.

Certain scripts will require elevated access to the database. In order to
provide this, first create a MySQL user with "all" permissions on the wiki
database, and then set $wgDBadminuser and $wgDBadminpassword in your
LocalSettings.php

=== Brief explanation of files ===

A lot of the files in this directory are PHP scripts used to perform various
maintenance tasks on the wiki database, e.g. rebuilding link tables, updating
the search indices, etc. The files in the "archives" directory are used to
upgrade the database schema when updating the software. Some schema definitions
for alternative (as yet unsupported) database management systems are stored
here too.

The "storage" directory contains scripts and resources useful for working with
external storage clusters, and are not likely to be particularly useful to the
vast majority of installations. This directory does contain the compressOld
scripts, however, which can be useful for compacting old data.

=== Maintenance scripts ===

As noted above, these should be run from the command line. Not all scripts are
listed, as some are Wikimedia-specific, and some are not applicable to most
installations.

	changePassword.php
	Reset the password of a specified user

	cleanupSpam.php
	Mass-revert insertion of linkspam

	createAndPromote.php
	Create a user with administrator (and optionally, bureaucrat) permissions

	deleteOldRevisions.php
	Erase old revisions of pages from the database

	dumpBackup.php
	Backup dump script

	edit.php
	Edit a page to change its content

	findHooks.php
	Find hooks that aren't documented in docs/hooks.txt

	importDump.php
	XML dump importer

	importImages.php
	Import images into the wiki

	moveBatch.php
	Move a batch of pages

	namespaceDupes.php
	Check articles name to see if they conflict with new/existing namespaces

	nukePage.php
	Wipe a page and all revisions from the database

	reassignEdits.php
	Reassign edits from one user to another

	rebuildImages.php
	Update image metadata records

	rebuildmessages.php
	Update the MediaWiki namespace after changing site language

	rebuildtextindex.php
	Rebuild the fulltext search indices

	refreshLinks.php
	Rebuild the link tables

	removeUnusedAccounts.php
	Remove user accounts which have made no edits

	runJobs.php
	Immediately complete all jobs in the job queue

	undelete.php
	Undelete all revisions of a page

	update.php
	Check and upgrade the database schema to the current version

	updateRestrictions.php
	Update pages restriction to the new schema

	userOptions.php
	Change user options