wiki.techinc.nl/maintenance
James D. Forrester 060a1b1668 Replace last remaining wfGetDB() calls in core, except ResourceLoader
Bug: T330641
Change-Id: I6d30af6ff9f667e367d39befb80c2bb0bf5fb29e
2024-02-14 11:02:01 -05:00
..
abstractSchemaChanges Schema: Drop iwl_prefix_from_title from iwlinks 2024-02-08 17:01:26 +01:00
archives Merge "Schema: Drop iwl_prefix_from_title from iwlinks" 2024-02-09 16:39:59 +00:00
benchmarks Merge "maintenance: Introduce getReplicaDB() and getPrimaryDB()" 2024-01-20 17:22:48 +00:00
includes Update name & email for bvibber 2024-02-08 17:02:16 -08:00
language Chinese Conversion Table Update 2024-1 2024-02-13 17:26:18 +00:00
mediawiki.Title maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
postgres Schema: Drop iwl_prefix_from_title from iwlinks 2024-02-08 17:01:26 +01:00
sqlite Schema: Drop iwl_prefix_from_title from iwlinks 2024-02-08 17:01:26 +01:00
storage Replace last remaining wfGetDB() calls in core, except ResourceLoader 2024-02-14 11:02:01 -05:00
.htaccess
addChangeTag.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
addRFCandPMIDInterwiki.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
addSite.php Namespace remaining files in includes/site 2023-12-14 14:57:34 -05:00
attachLatest.php Update name & email for bvibber 2024-02-08 17:02:16 -08:00
blockUsers.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
categoryChangesAsRdf.php Fix casing of Mediawiki to MediaWiki 2024-01-29 17:15:04 +00:00
changePassword.php
checkBadRedirects.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
checkComposerLockUpToDate.php libs/composer: Namespace under Wikimedia\Composer 2024-01-13 20:10:25 +00:00
checkDependencies.php Fix some PHPStorm inspections (#1) 2023-03-25 00:19:33 +00:00
checkImages.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
CheckSignatures.php Add maintenance script to list users with invalid signatures 2024-01-30 11:25:43 +00:00
checkUsernames.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
cleanupBlocks.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
cleanupCaps.php Update name & email for bvibber 2024-02-08 17:02:16 -08:00
cleanupEmptyCategories.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
cleanupImages.php Update name & email for bvibber 2024-02-08 17:02:16 -08:00
cleanupInvalidDbKeys.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
cleanupPageLang.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
cleanupPreferences.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
cleanupRemovedModules.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
cleanupSpam.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
cleanupTitles.php Update name & email for bvibber 2024-02-08 17:02:16 -08:00
cleanupUploadStash.php maintenance: Migrate to expression builders 2024-01-17 20:27:08 +01:00
cleanupWatchlist.php Update name & email for bvibber 2024-02-08 17:02:16 -08:00
clearInterwikiCache.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
CodeCleanerGlobalsPass.php
CommandLineInc.php Maintenance: use getArgs instead of mArgs. 2023-04-03 09:18:38 +00:00
compareLanguageConverterOutput.php Namespace ParserOutput 2023-12-14 14:57:34 -05:00
compareParserCache.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
compareParsers.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
convertExtensionToRegistration.php libs/composer: Namespace under Wikimedia\Composer 2024-01-13 20:10:25 +00:00
copyFileBackend.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
copyJobQueue.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
createAndPromote.php Replace unchecked MWException with SPL exceptions 2024-01-28 22:41:46 +01:00
createBotPassword.php createBotPassword: Use plain text for rights info 2024-02-04 18:36:46 -08:00
deleteArchivedFiles.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
deleteArchivedRevisions.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
deleteAutoPatrolLogs.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
deleteBatch.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
deleteDefaultMessages.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
deleteEqualMessages.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
deleteLocalPasswords.php
deleteOldRevisions.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
deleteOrphanedRevisions.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
deleteSelfExternals.php maintenance: Use getServiceContainer() when in instances of Maintenance 2024-02-13 19:25:23 +00:00
deleteTag.php maintenance: Replace unnecessary uses of LBFactory and LoadBalancer 2024-01-23 16:48:36 +00:00
deleteUserEmail.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
doMaintenance.php MaintenanceRunner: load script file early if possible 2023-03-14 10:18:29 +01:00
Doxyfile build: Ignore param-taint and return-taint in Doxyfile 2023-11-08 14:54:24 +00:00
dumpBackup.php Update name & email for bvibber 2024-02-08 17:02:16 -08:00
dumpCategoriesAsRdf.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
dumpIterator.php Make Maintenance::finalSetup require a SettingsBuilder 2024-01-08 09:40:18 -05:00
dumpLinks.php Update name & email for bvibber 2024-02-08 17:02:16 -08:00
dumpTextPass.php Update name & email for bvibber 2024-02-08 17:02:16 -08:00
dumpUploads.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
edit.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
emptyUserGroup.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
eraseArchivedFile.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
eval.php Replace last remaining wfGetDB() calls in core, except ResourceLoader 2024-02-14 11:02:01 -05:00
expireTemporaryAccounts.php maintenance: Use getServiceContainer() when in instances of Maintenance 2024-02-13 19:25:23 +00:00
exportSites.php Namespace remaining files in includes/site 2023-12-14 14:57:34 -05:00
fetchText.php Make Maintenance::finalSetup require a SettingsBuilder 2024-01-08 09:40:18 -05:00
fileOpPerfTest.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
findBadBlobs.php maintenance: Replace unnecessary uses of LBFactory and LoadBalancer 2024-01-23 16:48:36 +00:00
findClasses.php
findDeprecated.php maintenance: Fix broken strpos in findDeprecated script 2024-01-25 15:46:09 +00:00
findMissingActors.php maintenance: Replace unnecessary uses of LBFactory and LoadBalancer 2024-01-23 16:48:36 +00:00
findMissingFiles.php maintenance: Migrate to expression builders 2024-01-17 20:27:08 +01:00
findOrphanedFiles.php Migrate away from $db->makeList in favor of expression builder 2023-11-02 16:40:48 +00:00
fixDefaultJsonContentPages.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
fixDoubleRedirects.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
fixInconsistentRedirects.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
fixMergeHistoryCorruption.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
fixTimestamps.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
fixUserRegistration.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
formatInstallDoc.php installer: Namespace more installer classes 2024-01-13 23:42:08 +00:00
generateAutoload.php generateConfigSchema.php: Enable canExecuteWithoutLocalSettings() 2023-07-24 20:25:52 +01:00
generateConfigSchema.php Update references to config-vars.php 2023-09-23 03:37:44 +00:00
generateJsonI18n.php maintenance: Check return of preg_match_all in generateJsonI18n.php 2022-03-29 00:32:10 +00:00
generateLocalAutoload.php generateLocalAutoload.php: Fix typo 2023-06-26 23:15:19 +01:00
generateSchemaChangeSql.php db: Allow describing table creation via abstract schema change 2023-10-10 20:06:53 -07:00
generateSchemaSql.php db: Allow describing table creation via abstract schema change 2023-10-10 20:06:53 -07:00
generateSitemap.php Update name & email for bvibber 2024-02-08 17:02:16 -08:00
getConfiguration.php Replace usages of MWException 2023-01-29 15:06:26 +01:00
getLagTimes.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
getReplicaServer.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
getText.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
grep.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
importDump.php Update name & email for bvibber 2024-02-08 17:02:16 -08:00
importImages.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
importSites.php Namespace remaining files in includes/site 2023-12-14 14:57:34 -05:00
importSiteScripts.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
importTextFiles.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
initEditCount.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
initSiteStats.php Update name & email for bvibber 2024-02-08 17:02:16 -08:00
initUserPreference.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
install.php installer: Namespace more installer classes 2024-01-13 23:42:08 +00:00
interwiki.list
invalidateBotPasswords.php Namespace remaining User-related classes under \MediaWiki\User 2023-09-20 09:12:08 +01:00
invalidateUserSessions.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
jsparse.php ResourceLoader: Switch validateScriptFile() from JSMinPlus to Peast 2024-01-06 22:33:46 +00:00
lag.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
Maintenance.php Fix even more PHPStorm inspections (#3) 2023-03-25 00:30:15 +00:00
Makefile
makeTestEdits.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
manageForeignResources.php Add ForeignResourceDirs extension/skin attribute 2023-04-25 09:27:35 -04:00
manageJobs.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
mcc.php Fix some typos 2023-03-21 15:58:09 +01:00
mctest.php Maintenance scripts: replace most globals with Config 2022-07-12 21:13:19 +02:00
mergeMessageFileList.php Make Maintenance::finalSetup require a SettingsBuilder 2024-01-08 09:40:18 -05:00
migrateBlocks.php MigrateBlocks: maintenance script for migrating to multiblocks schema 2024-01-11 14:45:29 +11:00
migrateExternallinks.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
migrateFileRepoLayout.php maintenance: Migrate to expression builders 2024-01-17 20:27:08 +01:00
migrateLinksTable.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
migrateRevisionActorTemp.php maintenance: Migrate to expression builders 2024-01-17 20:27:08 +01:00
migrateRevisionCommentTemp.php Migrate some usages of Database::update() to UpdateQueryBuilder 2024-01-17 15:24:45 +00:00
migrateUserGroup.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
moveBatch.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
mwdoc-filter.php
mwdocgen.php Update name & email for bvibber 2024-02-08 17:02:16 -08:00
mwjsduck-gen
mysql.php Update references to renamed DatabaseMySQL class 2023-11-01 11:30:29 -04:00
namespaceDupes.php Merge "namespaceDupes: Fix fatals caused by READ_NEW and WRITE_BOTH" 2024-02-10 21:36:07 +00:00
nukeNS.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
nukePage.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
pageExists.php Reorg: Namespace the Title class 2023-03-02 08:46:53 -05:00
parse.php Namespace ParserOutput 2023-12-14 14:57:34 -05:00
patchSql.php installer: Namespace remaining classes 2024-01-13 23:45:14 +00:00
populateBacklinkNamespace.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
populateChangeTagDef.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
populateFilearchiveSha1.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
populateImageSha1.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
populateInterwiki.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
populateIpChanges.php Migrate remaining Database::insert calls to InsertQueryBuilder 2023-12-22 14:53:17 +01:00
populatePPSortKey.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
populateRecentChangesSource.php maintenance: Migrate another batch to SelectQueryBuilder 2023-09-21 14:15:42 +02:00
populateRevisionLength.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
populateRevisionSha1.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
populateUserIsTemp.php Add a maintenance script to populate user_is_temp column 2024-01-24 14:16:39 +00:00
prewarmParsoidParserCache.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
protect.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
pruneFileCache.php Remove or replace usages of "sanity" 2021-11-19 23:19:42 +00:00
pruneUnusedLinkTargetRows.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
purgeChangedFiles.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
purgeChangedPages.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
purgeExpiredBlocks.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
purgeExpiredUserrights.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
purgeExpiredWatchlistItems.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
purgeList.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
purgeMessageBlobStore.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
purgeModuleDeps.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
purgeOldText.php
purgePage.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
purgeParserCache.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
README Update maintenance/README 2023-03-03 10:10:59 -05:00
reassignEdits.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
rebuildall.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
rebuildFileCache.php Namespace includes/context 2024-02-08 11:07:01 -05:00
rebuildImages.php Update name & email for bvibber 2024-02-08 17:02:16 -08:00
rebuildLocalisationCache.php Make Maintenance::finalSetup require a SettingsBuilder 2024-01-08 09:40:18 -05:00
rebuildmessages.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
rebuildrecentchanges.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
rebuildtextindex.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
recountCategories.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
refreshFileHeaders.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
refreshImageMetadata.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
refreshLinks.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
removeInvalidEmails.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
removeUnusedAccounts.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
renameDbPrefix.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
renameRestrictions.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
renameUser.php Namespace remaining User-related classes under \MediaWiki\User 2023-09-20 09:12:08 +01:00
renameUsersMatchingPattern.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
renderDump.php Update name & email for bvibber 2024-02-08 17:02:16 -08:00
resetAuthenticationThrottle.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
resetPageRandom.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
resetUserEmail.php Maintenance: use getServiceContainer() method 2023-10-13 10:19:26 +02:00
rollbackEdits.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
run Fix shebang in maintenance/run: /bin/env -> /usr/bin/env 2023-01-13 14:57:42 +01:00
run.php MaintenanceRunner: load script file early if possible 2023-03-14 10:18:29 +01:00
runBatchedQuery.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
runJobs.php Make Maintenance::finalSetup require a SettingsBuilder 2024-01-08 09:40:18 -05:00
runScript.php Make runScript.php an alias for run.php 2023-01-09 22:44:05 +01:00
shell.php Merge "psysh: Reset ObjectCache instances when custom logging is used" 2024-02-02 12:16:23 +00:00
showJobs.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
showSiteStats.php Update name & email for bvibber 2024-02-08 17:02:16 -08:00
sql.php installer: Namespace remaining classes 2024-01-13 23:45:14 +00:00
Sqlite.php Replace more usages of deprecated MWException 2023-06-08 21:37:07 +00:00
SqliteMaintenance.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
TableCleanup.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
tables-generated.sql Schema: Drop iwl_prefix_from_title from iwlinks 2024-02-08 17:01:26 +01:00
tables.json Schema: Drop iwl_prefix_from_title from iwlinks 2024-02-08 17:01:26 +01:00
tables.sql
undelete.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
update-keys.sql
update.php Namespace includes/context 2024-02-08 11:07:01 -05:00
updateArticleCount.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
updateCollation.php updateCollation: Fix output of spacing text 2024-01-30 15:47:49 +00:00
updateCredits.php Replace substr with cleaner string methods 2023-05-20 15:40:21 +02:00
updateExtensionJsonSchema.php phan: Disable null_casts_as_any_type setting 2022-03-21 18:25:07 +00:00
updateRestrictions.php maintenance: Migrate to expression builders 2024-01-17 20:27:08 +01:00
updateSearchIndex.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
updateSpecialPages.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
uppercaseTitlesForUnicodeTransition.php maintenance: Replace unnecessary uses of LBFactory and LoadBalancer 2024-01-23 16:48:36 +00:00
userOptions.php Replace last remaining wfGetDB() calls in core, except ResourceLoader 2024-02-14 11:02:01 -05:00
validateRegistrationFile.php
Version.php maintenance/version: Namespace and rename 2023-12-21 11:50:44 +00:00
view.php maintenance: Begin using Maintenance::getServiceContainer() 2023-09-04 10:39:58 +00:00
wikiBirthday.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00
wrapOldPasswords.php maintenance: Introduce getReplicaDB() and getPrimaryDB() 2024-01-18 15:12:04 +01:00

MediaWiki's maintenance scripts are PHP scripts that perform maintenance tasks,
and are designed to be run from the command line.

See also: https://www.mediawiki.org/wiki/Manual:Maintenance_scripts

== Running Maintenance Scripts ==

Maintenance scripts are generally executed using the maintenance runner, calling
''php maintenance/run.php'' followed by the script's name. On most systems, the
shorthand ''maintenance/run'' can also be used. For instance, to run the script
that displays the MediaWiki version, use ''maintenance/run version''.

Maintenance scripts can be called by their simple name, class name, or path.

The simple name corresponds to a file in the maintenance directory:
* ''maintenance/run version'' runs the file ''maintenance/version.php''.

For the class name:
* ''maintenance/run Version'' runs the Version class (using auto-loading from
''./maintenance/version.php'').

For the path:
* ''maintenance/run ./maintenance/version.php'' runs the file
''./maintenance/version.php''.

Note that relative file paths must start with "./". Using this form allows for
the use of tab-completion.

Maintenance scripts defined by extensions may also be called by giving their
full class name or full relative path, such as:
* ''maintenance/run ./extension/AbuseFilter/maintenance/SearchFilters.php''
* ''maintenance/run MediaWiki.Extension.AbuseFilter.Maintenance.SearchFilters''

Note how the dot (".") can be used as a namespace separator instead of the
backslash ("\").

If the extension follows the MediaWiki coding conventions for the location and
namespacing of maintenance scripts, they can be invoked using the name of the
extension, followed by a colon (":") and the name of the script file or class:
* ''maintenance/run AbuseFilter:SearchFilters''

For more details on using the script runner, call ''maintenance/run --help''.

For about an individual script, call ''maintenance/run <script> --help ''.

=== Running Maintenance Scripts before MW 1.40 ===

The maintenance runner described above was introduced in MediaWiki 1.40. In
MediaWiki version 1.39 and earlier, maintenance scripts had to be run as
standalone PHP scripts, by passing the path the the script to the php interpreter.
For instance:

* ''php maintenance/version.php''

This is still possible for most scripts in 1.40, but it will show a deprecation
warning.

== Creating Maintenance Scripts ==

To create a maintenance script, add a PHP file to the maintenance directory that
contains a class that extends the ''Maintenance'' base class and implement
the ''execute()'' method. At the end of the file, add a return statement that
returns the name of the class.

For example, if your class is called ''Frobnify'', place it in a file called
''maintenance/Frobnify.php'' and at the end of the file, put the following
statement:
<pre>
return Frobnify::class;
</pre>

You can now run your script by calling ''maintenance/run Frobnify''.

With this, it will however not be possible to run Frobnify.php as a PHP command
line script. ''php maintenance/Frobnify.php'' will fail with an error.

=== Supporting direct execution of maintenance scripts ===
Since MediaWiki version 1.40, invoking maintenance scripts directly is now
deprecated, and will show a warning even for scripts that support it.

If you need to support direct invocation for your script, this can be
achieved as follows:

At the top of the script file, place the statement:
<pre>
require_once __DIR__ . '/Maintenance.php';
</pre>.

For maintenance scripts defined in extensions, this is slightly more complex:
<pre>
require_once getenv( 'MW_INSTALL_PATH' ) !== false
	? getenv( 'MW_INSTALL_PATH' ) . '/maintenance/Maintenance.php'
	: __DIR__ . '/../../../maintenance/Maintenance.php';
</pre>

Then, at the bottom of the file, replace the return statement with the
following lines:
<pre>
$maintClass = Frobnify::class;
require_once RUN_MAINTENANCE_IF_MAIN;
</pre>

This will allow your script to be executed directly on the PHP command line.
Note however that it will show a warning.