wiki.techinc.nl/maintenance
Timo Tijhof e0f6f8f527 objectcache: Move RedisConnRef.php to /libs/objectcache/
Change-Id: I4c6a349afcc4039bec27413af9511639f8c0c4b0
(cherry picked from commit 72338de32b249a7cff0b758746c0896fd649e53b)
2024-11-07 08:40:54 +00:00
..
abstractSchemaChanges Searchindex primary key, title length and utf8mb4 2024-11-02 11:14:37 +00:00
archives Searchindex primary key, title length and utf8mb4 2024-11-02 11:14:37 +00:00
benchmarks maintenance: Use namespaced classes 2024-10-21 19:08:08 +02:00
includes objectcache: Move RedisConnRef.php to /libs/objectcache/ 2024-11-07 08:40:54 +00:00
language maintenance: Use namespaced classes 2024-10-21 19:08:08 +02:00
mediawiki.Title maintenance: Use more of namespaced Maintenance class 2024-10-16 01:09:19 +00:00
postgres Searchindex primary key, title length and utf8mb4 2024-11-02 11:14:37 +00:00
sqlite Searchindex primary key, title length and utf8mb4 2024-11-02 11:14:37 +00:00
storage externalstore: cleanup ExternalStoreDB::getTable() and fix callers 2024-09-18 15:21:35 -07:00
.htaccess Update Apache config syntax in .htaccess files 2024-03-23 23:36:31 -04:00
addChangeTag.php maintenance: Use more of namespaced Maintenance class 2024-10-16 01:09:19 +00:00
addSite.php maintenance: Use more of namespaced Maintenance class 2024-10-16 01:09:19 +00:00
attachLatest.php maintenance: Use more of namespaced Maintenance class 2024-10-16 01:09:19 +00:00
blockUsers.php maintenance: Use more of namespaced Maintenance class 2024-10-16 01:09:19 +00:00
categoryChangesAsRdf.php Make $fname mandatory on private functions 2024-09-19 20:09:20 +02:00
changePassword.php maintenance: Use more of namespaced Maintenance class 2024-10-16 01:09:19 +00:00
checkBadRedirects.php maintenance: Use more of namespaced Maintenance class 2024-10-16 01:09:19 +00:00
checkComposerLockUpToDate.php maintenance: Use more of namespaced Maintenance class 2024-10-16 01:09:19 +00:00
checkDependencies.php maintenance: Add missing documentation to class properties 2024-09-13 19:29:24 +02:00
checkImages.php maintenance: Use more of namespaced Maintenance class 2024-10-16 01:09:19 +00:00
CheckSignatures.php maintenance: Use namespaced classes 2024-10-21 19:08:08 +02:00
checkUsernames.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
cleanupCaps.php maintenance: Add missing documentation to class properties 2024-09-13 19:29:24 +02:00
cleanupEmptyCategories.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
cleanupImages.php maintenance: Add missing documentation to class properties 2024-09-13 19:29:24 +02:00
cleanupInvalidDbKeys.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
cleanupPageLang.php Switch over a bunch of class_alias uses to actuals 2024-10-03 17:09:36 +00:00
cleanupPreferences.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
cleanupRemovedModules.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
cleanupSpam.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
cleanupTitles.php Add namespace to IDBAccessObject and DBAccessObjectUtils 2024-09-27 16:19:10 -04:00
cleanupUploadStash.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
cleanupWatchlist.php maintenance: Add missing documentation to class properties 2024-09-13 19:29:24 +02:00
clearInterwikiCache.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
CodeCleanerGlobalsPass.php Use const keyword for constant list of strings or ints 2024-09-11 23:16:24 +02:00
CommandLineInc.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
compareLanguageConverterOutput.php maintenance: Use namespaced classes 2024-10-21 19:08:08 +02:00
compareParserCache.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
compareParsers.php maintenance: Use namespaced classes 2024-10-21 19:08:08 +02:00
convertExtensionsMessagesToTranslationAlias.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
convertExtensionToRegistration.php Use const keyword for constant list of strings or ints 2024-09-11 23:16:24 +02:00
copyFileBackend.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
copyJobQueue.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
createAndPromote.php Use const keyword for constant list of strings or ints 2024-09-11 23:16:24 +02:00
createBotPassword.php Fully test createBotPassword.php 2024-08-30 19:18:23 +01:00
deleteArchivedFiles.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
deleteArchivedRevisions.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
deleteAutoPatrolLogs.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
deleteBatch.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
deleteDefaultMessages.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
deleteEqualMessages.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
deleteLocalPasswords.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
deleteOldRevisions.php Test deleteOldRevisions.php 2024-08-29 18:54:19 +00:00
deleteOrphanedRevisions.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
deleteSelfExternals.php Fix broken deleteSelfExternals.php and test it 2024-09-11 18:23:40 +00:00
deleteTag.php Replace uses of deprecated ChangeTags static methods 2024-10-16 13:30:12 -04:00
deleteUserEmail.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
doMaintenance.php
Doxyfile docs: Set SORT_GROUP_NAMES=YES in Doxyfile 2024-08-23 22:43:29 +00:00
dumpBackup.php Add namespace to maintenance/includes classes 2024-10-09 11:02:09 -04:00
dumpCategoriesAsRdf.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
dumpIterator.php maintenance: Use namespaced classes 2024-10-21 19:08:08 +02:00
dumpLinks.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
dumpTextPass.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
dumpUploads.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
edit.php maintenance: Use namespaced classes 2024-10-21 19:08:08 +02:00
emptyUserGroup.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
eraseArchivedFile.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
eval.php build: Use inline ignore for Generic.CodeAnalysis.AssignmentInCondition 2024-09-01 00:15:10 +02:00
expireTemporaryAccounts.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
exportSites.php Test exportSites.php and importSites.php 2024-09-16 11:51:34 +00:00
fetchText.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
fileOpPerfTest.php build: Use inline ignore for Generic.CodeAnalysis.AssignmentInCondition 2024-09-01 00:15:10 +02:00
findBadBlobs.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
findClasses.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
findDeprecated.php Test findDeprecated.php 2024-10-15 17:08:23 +00:00
findMissingActors.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
findMissingFiles.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
findOrphanedFiles.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
fixAutoblockLogTitles.php Fix old autoblock unblock log entries with namespace in log_title 2024-09-13 12:18:32 +00:00
fixDoubleRedirects.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
fixInconsistentRedirects.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
fixMergeHistoryCorruption.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
fixTimestamps.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
fixUserRegistration.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
formatInstallDoc.php maintenance: Use namespaced classes 2024-10-21 19:08:08 +02:00
generateAutoload.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
generateConfigSchema.php Remove meaningless @var documentation from constants 2024-10-09 09:33:12 +02:00
generateJsonI18n.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
generateLocalAutoload.php generateLocalAutoload.php: Fix typo 2023-06-26 23:15:19 +01:00
generateSchemaChangeSql.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
generateSchemaSql.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
generateSitemap.php Hard deprecating wfGetServerUrl 2024-09-06 16:54:31 +03:30
getConfiguration.php Merge "maintenance: Add missing documentation to class properties" 2024-09-13 18:15:35 +00:00
getLagTimes.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
getReplicaServer.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
getText.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
grep.php maintenance: Use namespaced classes 2024-10-21 19:08:08 +02:00
importDump.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
importImages.php Replace uses of deprecated ChangeTags static methods 2024-10-16 13:30:12 -04:00
importSites.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
importSiteScripts.php Switch over a bunch of class_alias uses to actuals 2024-10-03 17:09:36 +00:00
importTextFiles.php maintenance: Use namespaced classes 2024-10-21 19:08:08 +02:00
initEditCount.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
initSiteStats.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
initUserPreference.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
install.php Merge "maintenance: Replace deprecated Maintenance::$mOptions" 2024-08-30 21:32:39 +00:00
interwiki.list Propagate changes to Meta map to interwiki.list 2024-05-03 12:59:59 -04:00
invalidateBotPasswords.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
invalidateUserSessions.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
jsparse.php maintenance: Add missing documentation to class properties 2024-09-13 19:29:24 +02:00
lag.php maintenance: Add missing documentation to class properties 2024-09-13 19:29:24 +02:00
Maintenance.php
Makefile Remove manpage generation from Makefile 2024-09-29 11:06:48 +02:00
makeTestEdits.php maintenance: Use namespaced classes 2024-10-21 19:08:08 +02:00
manageForeignResources.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
manageJobs.php Use $this->getServiceContainer() in maintenance 2024-09-04 13:03:09 +00:00
mcc.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
mctest.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
mergeMessageFileList.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
migrateBlocks.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
migrateExternallinks.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
migrateFileRepoLayout.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
migrateLinksTable.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
migrateRevisionActorTemp.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
migrateRevisionCommentTemp.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
migrateUserGroup.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
moveBatch.php Test moveBatch.php 2024-08-29 20:51:19 +00:00
mwdoc-filter.php
mwdocgen.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
mysql.php maintenance: Use namespaced classes 2024-10-21 19:08:08 +02:00
namespaceDupes.php Add namespace to IDBAccessObject and DBAccessObjectUtils 2024-09-27 16:19:10 -04:00
nukeNS.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
nukePage.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
pageExists.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
parse.php maintenance: Use namespaced classes 2024-10-21 19:08:08 +02:00
patchSql.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
populateChangeTagDef.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
populateInterwiki.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
populateUserIsTemp.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
prewarmParsoidParserCache.php maintenance: Use namespaced classes 2024-10-21 19:08:08 +02:00
protect.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
pruneFileCache.php maintenance: Add missing documentation to class properties 2024-09-13 19:29:24 +02:00
pruneUnusedLinkTargetRows.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
purgeChangedFiles.php maintenance: Replace deprecated Maintenance::$mOptions 2024-08-29 22:08:23 +02:00
purgeChangedPages.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
purgeExpiredBlocks.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
purgeExpiredUserrights.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
purgeExpiredWatchlistItems.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
purgeList.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
purgeMessageBlobStore.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
purgeModuleDeps.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
purgeOldText.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
purgePage.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
purgeParserCache.php maintenance: Add missing documentation to class properties 2024-09-13 19:29:24 +02:00
purgeRecentChanges.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
README Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
reassignEdits.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
rebuildall.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
rebuildFileCache.php maintenance: Add missing documentation to class properties 2024-09-13 19:29:24 +02:00
rebuildImages.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
rebuildLocalisationCache.php maintenance: Replace deprecated Maintenance::$mOptions 2024-08-29 22:08:23 +02:00
rebuildmessages.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
rebuildrecentchanges.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
rebuildtextindex.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
recountCategories.php build: Use inline ignore for Generic.CodeAnalysis.AssignmentInCondition 2024-09-01 00:15:10 +02:00
refreshFileHeaders.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
refreshImageMetadata.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
refreshLinks.php maintenance: Use more of namespaced Maintenance class 2024-10-16 01:09:19 +00:00
removeInvalidEmails.php maintenance: Add missing documentation to class properties 2024-09-13 19:29:24 +02:00
removeUnusedAccounts.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
renameDbPrefix.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
renameRestrictions.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
renameUser.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
renameUsersMatchingPattern.php Expand tests for rename user maintenance scripts 2024-10-08 21:51:59 +01:00
renderDump.php maintenance: Use namespaced classes 2024-10-21 19:08:08 +02:00
resetAuthenticationThrottle.php Use $this->getServiceContainer() in maintenance 2024-09-04 13:03:09 +00:00
resetPageRandom.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
resetUserEmail.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
rollbackEdits.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
run
run.php
runBatchedQuery.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
runJobs.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
runScript.php
shell.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
showJobs.php Use const keyword for constant list of strings or ints 2024-09-11 23:16:24 +02:00
showSiteStats.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
sql.php build: Use inline ignore for Generic.CodeAnalysis.AssignmentInCondition 2024-09-01 00:15:10 +02:00
Sqlite.php Replace more usages of deprecated MWException 2023-06-08 21:37:07 +00:00
SqliteMaintenance.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
TableCleanup.php maintenance: Add missing documentation to class properties 2024-09-13 19:29:24 +02:00
tables-generated.sql Searchindex primary key, title length and utf8mb4 2024-11-02 11:14:37 +00:00
tables.json Searchindex primary key, title length and utf8mb4 2024-11-02 11:14:37 +00:00
tables.sql
undelete.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
update.php Move update-keys.sql to a PHP array 2024-09-13 12:02:07 +10:00
updateArticleCount.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
updateCollation.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
updateCredits.php Replace substr with cleaner string methods 2023-05-20 15:40:21 +02:00
updateExtensionJsonSchema.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
updateRestrictions.php Pass function name to IDatabase functions 2024-09-19 21:02:52 +02:00
updateSearchIndex.php Add namespace to IDBAccessObject and DBAccessObjectUtils 2024-09-27 16:19:10 -04:00
updateSpecialPages.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
uppercaseTitlesForUnicodeTransition.php maintenance: Use more of namespaced Maintenance class 2024-10-16 01:09:19 +00:00
userOptions.php userOptions: make --old a multi option 2024-10-17 11:59:12 +02:00
validateRegistrationFile.php Exclude boilerplate maintenance code from code coverage reports 2024-08-27 13:22:29 +01:00
Version.php maintenance: Use more of namespaced Maintenance class 2024-10-16 01:09:19 +00:00
view.php maintenance: Use more of namespaced Maintenance class 2024-10-16 01:09:19 +00:00
wikiBirthday.php maintenance: Use more of namespaced Maintenance class 2024-10-16 01:09:19 +00:00
wrapOldPasswords.php maintenance: Use more of namespaced Maintenance class 2024-10-16 01:09:19 +00: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>
// @codeCoverageIgnoreStart
require_once __DIR__ . '/Maintenance.php';
// @codeCoverageIgnoreEnd
</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>
// @codeCoverageIgnoreStart
$maintClass = Frobnify::class;
require_once RUN_MAINTENANCE_IF_MAIN;
// @codeCoverageIgnoreEnd
</pre>

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