wiki.techinc.nl/maintenance
Umherirrender 1eb5d8e44d Do not output wikitext in maintenance script
Also remove print_r with a string
Always use english for maintenance scripts

Bug: T229843
Change-Id: I539a1ac1f6a201dd8ee9ce89599cc34bebfba79f
2019-09-20 18:28:34 +02:00
..
archives phan: Disable enable_class_alias_support 2019-09-15 08:26:52 +00:00
benchmarks Upgrade phan config to 0.7.1 2019-09-04 08:20:53 +00:00
dev Use https://www.php.net/ instead of https://secure.php.net/ 2019-04-12 06:44:48 +02:00
hhvm Replace deprecated function wfEscapeShellArg with Shell::escape() 2019-04-07 20:17:39 +01:00
includes Merge "maintenance: Explicitly declare all used properties" 2019-09-09 19:11:52 +00:00
jsduck Deprecate mediawiki.RegExp; move only function to mw.util 2019-09-07 15:34:21 +00:00
language Chinese Conversion Table Update 2019-3 2019-09-16 22:30:52 +08:00
locking
mediawiki.Title generatePhpCharToUpperMappings: Die if fopen fails 2019-09-19 09:38:23 +02:00
postgres Mostly drop old pre-actor user schemas 2019-09-09 11:38:36 -04:00
sqlite/archives Mostly drop old pre-actor user schemas 2019-09-09 11:38:36 -04:00
storage externalstore: deprecate getLBInfo() dependency in ExternalStoreDB 2019-09-10 11:34:52 +00:00
term
.htaccess
addChangeTag.php Do not output wikitext in maintenance script 2019-09-20 18:28:34 +02:00
addRFCandPMIDInterwiki.php
addSite.php Unsuppress another phan issue (part 7) 2019-09-03 17:19:21 +00:00
attachLatest.php Migrate various callers away from wfWikiId() to WikiMap 2019-07-12 01:02:00 +00:00
categoryChangesAsRdf.php Use Maintenance::getConfig in some maintenance scripts 2019-09-01 20:55:08 +02:00
cdb.php
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 Unsuppress another phan issue (part 7) 2019-09-03 17:19:21 +00:00
checkUsernames.php
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 maintenance: Explicitly declare all used properties 2019-09-09 09:47:41 +00: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 Update PHPDoc types in several maintenance scripts and related 2019-03-07 17:54:26 +00:00
cleanupTitles.php Move callers away from Title::GAID_FOR_UPDATE 2019-09-09 13:19:08 -07:00
cleanupUploadStash.php Unsuppress another phan issue (part 7) 2019-09-03 17:19:21 +00:00
cleanupUsersWithNoId.php Remove superfluous cast to int 2019-04-30 14:57:18 +00:00
cleanupWatchlist.php
clearInterwikiCache.php Replace wfWiki() usage with WikiMap in some additional places 2019-07-04 21:58:42 +00:00
CodeCleanerGlobalsPass.inc
commandLine.inc
compareParserCache.php
compareParsers.php maintenance: Explicitly declare all used properties 2019-09-09 09:47:41 +00:00
convertExtensionToRegistration.php Upgrade phan config to 0.7.1 2019-09-04 08:20:53 +00:00
convertLinks.php Merge "Fix use of argument perfLogFilename in convertLinks.php" 2019-09-06 10:04:38 +00:00
convertUserOptions.php Type hint against IResultWrapper in maintenance classes 2019-06-19 21:42:32 +02:00
copyFileBackend.php Do not output wikitext in maintenance script 2019-09-20 18:28:34 +02: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
deduplicateArchiveRevId.php Only attempt to deduplicate if there is data in archive and revision 2019-06-16 19:00:52 -04: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 Replace some uses of deprecated wfFindFile() and wfLocalFile() 2019-06-11 13:26:37 +00:00
deleteDefaultMessages.php
deleteEqualMessages.php
deleteLocalPasswords.php
deleteOldRevisions.php Remove a few obscure "done" and "empty" comments 2019-01-30 20:35:14 +00:00
deleteOrphanedRevisions.php Update PHPDoc types in several maintenance scripts and related 2019-03-07 17:54:26 +00:00
deleteSelfExternals.php
doMaintenance.php doMaintenance: Try to print errors to stderr 2019-07-16 13:15:57 +02:00
Doxyfile docs: Ignore README.md by default 2019-09-14 19:35:45 +01:00
dumpBackup.php allow xml page content or metadata dumps to target specific namespaces 2019-04-18 14:42:50 +03:00
dumpCategoriesAsRdf.php Update PHPDoc types in several maintenance scripts and related 2019-03-07 17:54:26 +00:00
dumpIterator.php maintenance: Explicitly declare all used properties 2019-09-09 09:47:41 +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 Simplify maintenance/dumpUploads 2019-09-07 16:39:48 +00:00
edit.php Do not output wikitext in maintenance script 2019-09-20 18:28:34 +02:00
emptyUserGroup.php
eraseArchivedFile.php Unsuppress another phan issue (part 7) 2019-09-03 17:19:21 +00:00
eval.php eval.php: write error messages to stderr 2018-12-22 07:08:31 +00:00
exportSites.php
fetchText.php Make BackupDumper MCR compatible (main slot only) 2019-03-14 13:19:51 +00:00
fileOpPerfTest.php
findDeprecated.php Suppress PhanUndeclaredProperty for custom properties and phan bugs 2019-09-14 13:22:54 +00:00
findHooks.php Define unit and integration test suites 2019-06-28 12:18:18 -04:00
findMissingFiles.php Normalize use of "INNER JOIN" to "JOIN" in database queries 2019-03-06 09:17:30 -08:00
findOrphanedFiles.php rdbms: add IDatabase::UNION_* constants for readability 2019-03-28 11:01:02 -07:00
fixDefaultJsonContentPages.php maintenance: Avoid usage of deprecated Revision::* constants 2019-07-21 11:35:09 +01:00
fixDoubleRedirects.php
fixExtLinksProtocolRelative.php
fixTimestamps.php
fixUserRegistration.php
formatInstallDoc.php maintenance: Replace deprecated global $wgParser with getParser() service 2019-03-10 00:35:42 +01:00
generateJsonI18n.php Add /** @var SplFileInfo $fileInfo */ docs where needed 2019-03-14 15:04:05 +01:00
generateLocalAutoload.php
generateSitemap.php Unsuppress other phan issues (part 4) 2019-08-31 17:13:39 +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
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 Do not output wikitext in maintenance script 2019-09-20 18:28:34 +02: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 Do not output wikitext in maintenance script 2019-09-20 18:28:34 +02: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 maintenance/Maintenance.php: Fix MW_ENTRY_POINT definition (followup I24099f4c) 2019-09-09 11:56:57 -04:00
Makefile
makeTestEdits.php
manageForeignResources.php resources: Improve foreign-resources docs and error messages 2019-03-24 20:57:46 +00:00
manageJobs.php
mcc.php
mctest.php Prime connections and update description of McTest script 2019-08-17 20:49:52 +00:00
mergeMessageFileList.php Remove dead properties 2019-09-07 16:34:55 +00:00
migrateActors.php Move migrateActors.php to includes 2019-02-09 11:42:38 +01:00
migrateArchiveText.php Use Maintenance::getConfig in some maintenance scripts 2019-09-01 20:55:08 +02:00
migrateComments.php Mostly drop old comment schemas 2019-02-07 16:59:27 +11:00
migrateFileRepoLayout.php
migrateImageCommentTemp.php
migrateUserGroup.php
minify.php resourceloader: Rewrite the minify.php maintenance script 2019-08-06 17:39:19 +01:00
moveBatch.php Do not output wikitext in maintenance script 2019-09-20 18:28:34 +02: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 Make use of the list() feature where it makes sense 2019-03-24 20:12:23 +00:00
namespaceDupes.php Use Maintenance::getConfig in some maintenance scripts 2019-09-01 20:55:08 +02: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 Unsuppress more phan issues (part 5) 2019-09-01 09:48:31 +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 Normalize use of "INNER JOIN" to "JOIN" in database queries 2019-03-06 09:17:30 -08:00
populateContentTables.php Use Maintenance::getConfig in some maintenance scripts 2019-09-01 20:55:08 +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 Pass options as array to IDatabase::insert 2019-06-07 19:12:35 +02:00
populateLogSearch.php Revert actor changes to populateLogSearch.php 2019-08-26 15:24:49 -04:00
populateLogUsertext.php
populateParentId.php
populatePPSortKey.php Fix/suppress misc phan errors (#5) 2019-04-05 15:53:37 -07: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 phan: Disable enable_class_alias_support 2019-09-15 08:26:52 +00:00
preprocessorFuzzTest.php maintenance: Explicitly declare all used properties 2019-09-09 09:47:41 +00:00
protect.php maintenance: Deprecate Maintenance::hasArg/getArg with no param 2019-03-29 14:37:46 +01:00
pruneFileCache.php
purgeChangedFiles.php maintenance: Add missing limit parameters to some explode() 2019-03-01 17:17:40 +00:00
purgeChangedPages.php Type hint against IResultWrapper in maintenance classes 2019-06-19 21:42:32 +02:00
purgeExpiredUserrights.php
purgeList.php Make purgeList.php use getCdnUrls() 2019-09-18 23:25:45 +02:00
purgeModuleDeps.php Remove @author Timo Tijhof from various file headers 2019-07-08 21:56:24 +00:00
purgeOldText.php
purgePage.php
purgeParserCache.php
README
reassignEdits.php Mostly drop old pre-actor user schemas 2019-09-09 11:38:36 -04:00
rebuildall.php
rebuildFileCache.php Setup: Move MWDebug logic to MWDebug.php 2019-09-04 16:33:25 +00:00
rebuildImages.php maintenance: Explicitly declare all used properties 2019-09-09 09:47:41 +00:00
rebuildLocalisationCache.php Revert "Make LocalisationCache a service" 2019-08-26 18:28:26 +02:00
rebuildmessages.php maintenance: Remove cross-wiki purging from rebuildmessages.php 2019-08-31 14:53:19 +01:00
rebuildrecentchanges.php Remove deprecated User groups/permission static calls. 2019-08-21 19:42:01 -07: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
refreshFileHeaders.php phan: Enable PhanTypeMismatchArgument issue 2019-09-19 20:11:42 +02:00
refreshImageMetadata.php
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
renderDump.php maintenance: Explicitly declare all used properties 2019-09-09 09:47:41 +00:00
resetAuthenticationThrottle.php
resetPageRandom.php
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 Fix typo "maintainance" 2018-12-24 15:51:11 +01:00
shell.php Convert maintenance scripts to LoadBalancer::getMaintenanceConnectionRef() 2019-08-02 22:29:43 +00:00
showJobs.php
showSiteStats.php
sql.php Add string cast when outputting exceptions in sql.php 2019-09-01 20:43:18 +02:00
sqlite.inc
sqlite.php maintenance: Fix bogus IDatabase method calls in sqlite.php 2019-08-24 19:54:50 +00:00
syncFileBackend.php Migrate various callers away from wfWikiId() to WikiMap 2019-07-12 01:02:00 +00:00
tables.sql Mostly drop old pre-actor user schemas 2019-09-09 11:38:36 -04:00
tidyUpT39714.php
undelete.php maintenance: Deprecate Maintenance::hasArg/getArg with no param 2019-03-29 14:37:46 +01:00
update-keys.sql
update.php Unsuppress another phan issue (part 7) 2019-09-03 17:19:21 +00:00
updateArticleCount.php
updateCollation.php Use Maintenance::getConfig in some maintenance scripts 2019-09-01 20:55:08 +02:00
updateCredits.php Check for intl extension in updateCredits.php 2019-02-01 19:57:56 +01:00
updateDoubleWidthSearch.php
updateExtensionJsonSchema.php Unsuppress another phan issue (part 7) 2019-09-03 17:19:21 +00:00
updateRestrictions.php maintenance: Add missing limit parameters to some explode() 2019-03-01 17:17:40 +00:00
updateSearchIndex.php Migrate various callers away from wfWikiId() to WikiMap 2019-07-12 01:02:00 +00:00
updateSpecialPages.php maintenance: Remove unused code from several maintenance scripts 2019-03-03 16:57:19 +00:00
uppercaseTitlesForUnicodeTransition.php maintenance: Script to rename titles for Unicode uppercasing changes 2019-07-09 13:53:43 -04:00
userDupes.inc phan: Disable enable_class_alias_support 2019-09-15 08:26:52 +00:00
userOptions.php maintenance: Fix broken userOptions maintenance script 2019-09-10 10:46:46 +02: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 Unsuppress another phan issue (part 7) 2019-09-03 17:19:21 +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