1 # This file is automatically generated using maintenance/generateConfigSchema.php.
2 # Do not modify this file manually, edit includes/MainConfigSchema.php instead.
6 main: 'GlobalVarConfig::newInstance'
9 Registry of factory functions to create config objects:
10 The 'main' key must be set, and the value should be a valid
15 description: 'Name of the site. It must be changed in LocalSettings.php'
22 $wgServer = 'http://example.com';
24 This must be set in LocalSettings.php. The MediaWiki installer does this
25 automatically since 1.18.
26 If you want to use protocol-relative URLs on your wiki, set this to a
27 protocol-relative URL like '//example.com' and set $wgCanonicalServer
28 to a fully qualified URL.
32 Canonical URL of the server, to use in IRC feeds and notification e-mails.
33 Must be fully qualified, even if $wgServer is protocol-relative.
34 Defaults to $wgServer, expanded to a fully qualified http:// URL if needed.
39 Server name. This is automatically computed by parsing the bare
40 hostname out of $wgCanonicalServer. It should not be customized.
42 AssumeProxiesUseDefaultProtocolPorts:
46 When the wiki is running behind a proxy and this is set to true, assumes that the proxy
47 exposes the wiki on the standard ports (443 for https and 80 for http).
52 For installations where the canonical server is HTTP but HTTPS is optionally
53 supported, you can specify a non-standard HTTPS port here. $wgServer should
54 be a protocol-relative URL.
55 If HTTPS is always used, just specify the port number in $wgServer.
56 @see https://phabricator.wikimedia.org/T67184
62 If this is true, when an insecure HTTP request is received, always redirect
63 to HTTPS. This overrides and disables the preferhttps user preference, and it
64 overrides $wgSecureLogin.
65 $wgServer may be either https or protocol-relative. If $wgServer starts with
66 "http://", an exception will be thrown.
67 If a reverse proxy or CDN is used to forward requests from HTTPS to HTTP,
68 the request header "X-Forwarded-Proto: https" should be sent to suppress
70 In addition to setting this to true, for optimal security, the web server
71 should also be configured to send Strict-Transport-Security response headers.
76 The path we should point to.
77 It might be a virtual path in case with use apache mod_rewrite for example.
78 This *needs* to be set correctly.
79 Other paths will be set to defaults based on it unless they are directly
80 set in LocalSettings.php
83 callback: [MediaWiki\MainConfigSchema, getDefaultUsePathInfo]
85 Whether to support URLs like index.php/Page_title.
86 The effective default value is determined at runtime:
87 it will be enabled in environments where it is expected to be safe.
88 Override this to false if $_SERVER['PATH_INFO'] contains unexpectedly
89 incorrect garbage, or to true if it is really correct.
90 The default $wgArticlePath will be set based on this value at runtime, but if
91 you have customized it, having this incorrectly set to true can cause
92 redirect loops when "pretty URLs" are used.
99 callback: [MediaWiki\MainConfigSchema, getDefaultScript]
101 The URL path to index.php.
102 Defaults to "{$wgScriptPath}/index.php".
107 callback: [MediaWiki\MainConfigSchema, getDefaultLoadScript]
109 The URL path to load.php.
110 Defaults to "{$wgScriptPath}/load.php".
116 callback: [MediaWiki\MainConfigSchema, getDefaultRestPath]
118 The URL path to the REST API
119 Defaults to "{$wgScriptPath}/rest.php"
124 use: [ResourceBasePath]
125 callback: [MediaWiki\MainConfigSchema, getDefaultStylePath]
127 The URL path of the skins directory.
128 Defaults to "{$wgResourceBasePath}/skins".
134 callback: [MediaWiki\MainConfigSchema, getDefaultLocalStylePath]
136 The URL path of the skins directory. Should not point to an external domain.
137 Defaults to "{$wgScriptPath}/skins".
142 use: [ResourceBasePath]
143 callback: [MediaWiki\MainConfigSchema, getDefaultExtensionAssetsPath]
145 The URL path of the extensions directory.
146 Defaults to "{$wgResourceBasePath}/extensions".
154 Extensions directory in the file system.
155 @note Set to "{$IP}/extensions" by Setup.php before loading local settings.
156 @note this configuration variable is used to locate extensions while loading settings.
164 Skins directory in the file system.
165 @note Set to "{$IP}/skins" by Setup.php before loading local settings.
166 @note this configuration variable is used to locate skins while loading settings.
171 Absolute filesystem path of the root directory of the MediaWiki installation.
172 The MW_INSTALL_PATH environment variable can be used to set this.
173 @note Automatically set in Setup.php before loading local settings.
174 @note Do not modify in settings files! Must remain equal to the MW_INSTALL_PATH constant
175 defined in Setup.php.
180 use: [Script, UsePathInfo]
181 callback: [MediaWiki\MainConfigSchema, getDefaultArticlePath]
183 The URL path for primary article page views. This path should contain $1,
184 which is replaced by the article title.
185 Defaults to "{$wgScript}/$1" or "{$wgScript}?title=$1",
186 depending on $wgUsePathInfo.
191 callback: [MediaWiki\MainConfigSchema, getDefaultUploadPath]
193 The URL path for the images directory.
194 Defaults to "{$wgScriptPath}/images".
198 The base path for img_auth.php. This is used to interpret the request URL
199 for requests to img_auth.php that do not match the base upload path. If
200 false, "{$wgScriptPath}/img_auth.php" is used.
201 Normally, requests to img_auth.php have a REQUEST_URI which matches
202 $wgUploadPath, and in that case, setting this should not be necessary.
203 This variable is used in case img_auth.php is accessed via a different path
209 The base path for thumb_handler.php. This is used to interpret the request URL
210 for requests to thumb_handler.php that do not match the base upload path.
216 callback: [MediaWiki\MainConfigSchema, getDefaultUploadDirectory]
217 description: 'The filesystem path of the images directory. Defaults to "{$IP}/images".'
221 use: [UploadDirectory]
222 callback: [MediaWiki\MainConfigSchema, getDefaultFileCacheDirectory]
224 Directory where the cached page will be saved.
225 Defaults to "{$wgUploadDirectory}/cache".
229 use: [ResourceBasePath]
230 callback: [MediaWiki\MainConfigSchema, getDefaultLogo]
232 The URL path of the wiki logo. The logo size should be 135x135 pixels.
233 Defaults to "$wgResourceBasePath/resources/assets/change-your-logo.svg".
234 Developers should retrieve this logo (and other variants) using
235 the static function MediaWiki\ResourceLoader\SkinModule::getAvailableLogos
236 Ignored if $wgLogos is set.
243 Specification for different versions of the wiki logo.
244 This is an array which should have the following k/v pairs:
245 All path values can be either absolute or relative URIs
246 The `1x` key is a path to the 1x version of square logo (should be 135x135 pixels)
247 The `1.5x` key is a path to the 1.5x version of square logo
248 The `2x` key is a path to the 2x version of square logo
249 The `svg` key is a path to the svg version of square logo
250 The `icon` key is a path to the version of the logo without wordmark and tagline
251 The `wordmark` key may be null or an array with the following fields
252 - `src` path to wordmark version
253 - `1x` path to svg wordmark version (if you want to
254 support browsers with SVG support with an SVG logo)
255 - `width` width of the logo in pixels
256 - `height` height of the logo in pixels
257 The `tagline` key may be null or array with the following fields
258 - `src` path to tagline image
259 - `width` width of the tagline in pixels
260 - `height` height of the tagline in pixels
264 '1x' => 'path/to/1x_version.png',
265 '1.5x' => 'path/to/1.5x_version.png',
266 '2x' => 'path/to/2x_version.png',
267 'svg' => 'path/to/svg_version.svg',
268 'icon' => 'path/to/icon.png',
270 'src' => 'path/to/wordmark_version.png',
271 '1x' => 'path/to/wordmark_version.svg',
276 'src' => 'path/to/tagline_version.png',
282 Defaults to [ "1x" => $wgLogo ],
283 or [ "1x" => "$wgResourceBasePath/resources/assets/change-your-logo.svg" ] if $wgLogo is not set.
291 since 1.35. Developers should retrieve this logo (and other variants) using
292 the static function MediaWiki\ResourceLoader\SkinModule::getAvailableLogos.
293 $wgLogos should be used instead.
295 Array with URL paths to HD versions of the wiki logo. The scaled logo size
296 should be under 135x155 pixels.
297 Only 1.5x and 2x versions are supported.
301 "1.5x" => "path/to/1.5x_version.png",
302 "2x" => "path/to/2x_version.png"
305 SVG is also supported but when enabled, it
306 disables 1.5x and 2x as svg will already
307 be optimised for screen resolution.
311 "svg" => "path/to/svg_version.svg",
315 @deprecated since 1.35. Developers should retrieve this logo (and other variants) using
316 the static function MediaWiki\ResourceLoader\SkinModule::getAvailableLogos.
317 $wgLogos should be used instead.
319 default: /favicon.ico
321 The URL path of the icon.
326 The URL path of the icon for iPhone and iPod Touch web app bookmarks.
336 Value for the referrer policy meta tag.
337 One or more of the values defined in the Referrer Policy specification:
338 https://w3c.github.io/webappsec-referrer-policy/
339 ('no-referrer', 'no-referrer-when-downgrade', 'same-origin',
340 'origin', 'strict-origin', 'origin-when-cross-origin',
341 'strict-origin-when-cross-origin', or 'unsafe-url')
342 Setting it to false prevents the meta tag from being output
343 (which results in falling back to the Referrer-Policy header,
344 or 'no-referrer-when-downgrade' if that's not set either.)
345 Setting it to an array (supported since 1.31) will create a meta tag for
346 each value, in the reverse of the order (meaning that the first array element
347 will be the default and the others used as fallbacks for browsers which do not
353 The local filesystem path to a temporary directory. This must not be web accessible.
354 When this setting is set to false, its value will automatically be decided
355 through the first call to wfTempDir(). See that method's implementation for
356 the actual detection logic.
357 To find the temporary path for the current wiki, developers must not use
358 this variable directly. Use the global function wfTempDir() instead.
359 The temporary directory is expected to be shared with other applications,
360 including other MediaWiki instances (which might not run the same version
361 or configution). When storing files here, take care to avoid conflicts
362 with other instances of MediaWiki. For example, when caching the result
363 of a computation, the file name should incorporate the input of the
364 computation so that it cannot be confused for the result of a similar
365 computation by another MediaWiki instance.
367 @note Default changed to false in MediaWiki 1.20.
371 If set, this URL is added to the start of $wgUploadPath to form a complete
374 UploadStashScalerBaseUrl:
376 deprecated: 'since 1.36 Use thumbProxyUrl in $wgLocalFileRepo'
378 To enable remote on-demand scaling, set this to the thumbnail base URL.
379 Full thumbnail URL will be like $wgUploadStashScalerBaseUrl/e/e6/Foo.jpg/123px-Foo.jpg
380 where 'e6' are the first two characters of the MD5 hash of the file name.
381 @deprecated since 1.36 Use thumbProxyUrl in $wgLocalFileRepo
382 If $wgUploadStashScalerBaseUrl and thumbProxyUrl are both false, thumbs are
383 rendered locally as needed.
389 To set 'pretty' URL paths for actions other than
390 plain page views, add to this array.
392 Set pretty URL for the edit action:
394 'edit' => "$wgScriptPath/edit/$1"
396 There must be an appropriate script or rewrite rule in place to handle these URLs.
398 MainPageIsDomainRoot:
402 Option to whether serve the main page as the domain root
403 @warning EXPERIMENTAL!
408 Allow users to upload files.
409 Use $wgLocalFileRepo to control how and where uploads are stored.
410 Disabled by default as for security reasons.
411 See <https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads>.
415 description: 'The maximum age of temporary (incomplete) uploaded files'
419 Enable deferred upload tasks that use the job queue.
420 Only enable this if job runners are set up for both the
421 'AssembleUploadChunks' and 'PublishStashedFile' job types.
424 description: 'To disable file delete/restore temporarily'
427 deprecated: 'since 1.41; no longer customizable'
429 Additional characters that are not allowed in filenames. They are replaced with '-' when
430 uploading. Like $wgLegalTitleChars, this is a regexp character class.
431 Slashes and backslashes are disallowed regardless of this setting, but included here for
433 @deprecated since 1.41; no longer customizable
437 use: [UploadDirectory]
438 callback: [MediaWiki\MainConfigSchema, getDefaultDeletedDirectory]
440 What directory to place deleted uploads in.
441 Defaults to "{$wgUploadDirectory}/deleted".
444 description: 'Set this to true if you use img_auth and want the user to see details on why access failed.'
449 Map of relative URL directories to match to internal mwstore:// base storage paths.
450 For img_auth.php requests, everything after "img_auth.php/" is checked to see
451 if starts with any of the prefixes defined here. The prefixes should not overlap.
452 The prefix that matches has a corresponding storage path, which the rest of the URL
453 is assumed to be relative to. The file at that path (or a 404) is send to the client.
455 $wgImgAuthUrlPathMap['/timeline/'] = 'mwstore://local-fs/timeline-render/';
456 The above maps ".../img_auth.php/timeline/X" to "mwstore://local-fs/timeline-render/".
457 The name "local-fs" should correspond by name to an entry in $wgFileBackends.
458 @see self::FileBackends
465 use: [UploadDirectory, ScriptPath, Favicon, UploadBaseUrl, UploadPath, HashedUploadDirectory, ThumbnailScriptPath, GenerateThumbnailOnParse, DeletedDirectory, UpdateCompatibleMetadata]
466 callback: [MediaWiki\MainConfigSchema, getDefaultLocalFileRepo]
468 File repository structures
469 $wgLocalFileRepo is a single repository structure, and $wgForeignFileRepos is
470 an array of such structures. Each repository structure is an associative
471 array of properties configuring the repository.
472 Properties required for all repos:
473 - class The class name for the repository. May come from the core or an extension.
474 The core repository classes are FileRepo, LocalRepo, ForeignDBRepo.
475 - name A unique name for the repository (but $wgLocalFileRepo should be 'local').
476 The name should consist of alpha-numeric characters.
477 Optional common properties:
478 - backend A file backend name (see $wgFileBackends). If not specified, or
479 if the name is not present in $wgFileBackends, an FSFileBackend
480 will automatically be configured.
481 - lockManager If a file backend is automatically configured, this will be lock
482 manager name used. A lock manager named in $wgLockManagers, or one of
483 the default lock managers "fsLockManager" or "nullLockManager". Default
485 - favicon URL to a favicon. This is exposed via FileRepo::getInfo and
486 ApiQueryFileRepoInfo. Originally for use by MediaViewer (T77093).
488 - zones Associative array of zone names that each map to an array with:
489 container : backend container name the zone is in
490 directory : root path within container for the zone
491 url : base URL to the root of the zone
492 urlsByExt : map of file extension types to base URLs
493 (useful for using a different cache for videos)
494 Zones default to using "<repo name>-<zone name>" as the container name
495 and default to using the container root as the zone's root directory.
496 Nesting of zone locations within other zones should be avoided.
497 - url Public zone URL. The 'zones' settings take precedence.
498 - hashLevels The number of directory levels for hash-based division of files.
499 Set this to 0 if you do not want MediaWiki to divide your images
500 directory into many subdirectories.
501 It is recommended to leave this enabled. In previous versions of
502 MediaWiki, some users set this to false to allow images to be added to
503 the wiki by copying them into $wgUploadDirectory and then running
504 maintenance/rebuildImages.php to register them in the database.
505 This is no longer supported, use maintenance/importImages.php instead.
508 Optional 'hashLevels' override for the 'deleted' zone.
509 - thumbScriptUrl The URL for thumb.php (optional, not recommended)
510 - transformVia404 Whether to skip media file transformation on parse and rely on a 404
512 - thumbProxyUrl Optional. URL of where to proxy thumb.php requests to. This is
513 also used internally for remote thumbnailing of upload stash files.
514 Example: http://127.0.0.1:8888/wiki/dev/thumb/
515 - thumbProxySecret Optional value of the X-Swift-Secret header to use in requests to
517 - disableLocalTransform
518 If present and true, local image scaling will be disabled -- it will
519 throw an exception if attempted. thumbProxyUrl must be set for this
520 to work, as well as either transformVia404 (preferred) or thumbScriptUrl.
521 - initialCapital Equivalent to $wgCapitalLinks (or $wgCapitalLinkOverrides[NS_FILE],
522 determines whether filenames implicitly start with a capital letter.
523 The current implementation may give incorrect description page links
524 when the local $wgCapitalLinks and initialCapital are mismatched.
525 - pathDisclosureProtection
526 May be 'paranoid' to remove all parameters from error messages, 'none' to
527 leave the paths in unchanged, or 'simple' to replace paths with
528 placeholders. Default for LocalRepo is 'simple'.
529 - fileMode This allows wikis to set the file mode when uploading/moving files. Default
531 - directory The local filesystem directory where public files are stored. Not used for
533 - thumbDir The base thumbnail directory. Defaults to "<directory>/thumb".
534 - thumbUrl The base thumbnail URL. Defaults to "<url>/thumb".
535 - isPrivate Set this if measures should always be taken to keep the files private.
536 One should not trust this to assure that the files are not web readable;
537 the server configuration should be done manually depending on the backend.
538 - useJsonMetadata Whether handler metadata should be stored in JSON format. Default: true.
539 - useSplitMetadata Whether handler metadata should be split up and stored in the text table.
541 - splitMetadataThreshold
542 If the media handler opts in, large metadata items will be split into a
543 separate blob in the database if the item is larger than this threshold.
545 - updateCompatibleMetadata
546 When true, image metadata will be upgraded by reloading it from the original
547 file, if the handler indicates that it is out of date.
548 By default, when purging a file or otherwise refreshing file metadata, it
549 is only reloaded when the metadata is invalid. Valid data originally loaded
550 by a current or older compatible version is left unchanged. Enable this
551 to also reload and upgrade metadata that was stored by an older compatible
552 version. See also MediaHandler::isMetadataValid, and RefreshImageMetadata.
554 - reserializeMetadata
555 If true, image metadata will be automatically rewritten to the database
556 if its serialization format is out of date. Default: false
557 These settings describe a foreign MediaWiki installation. They are optional, and will be ignored
558 for local repositories:
559 - descBaseUrl URL of image description pages, e.g. https://en.wikipedia.org/wiki/File:
560 - scriptDirUrl URL of the MediaWiki installation, equivalent to $wgScriptPath, e.g.
561 https://en.wikipedia.org/w
562 - articleUrl Equivalent to $wgArticlePath, e.g. https://en.wikipedia.org/wiki/$1
563 - fetchDescription Fetch the text of the remote file description page and display them
565 - abbrvThreshold File names over this size will use the short form of thumbnail names.
566 Short thumbnail names only have the width, parameters, and the extension.
568 - dbType, dbServer, dbUser, dbPassword, dbName, dbFlags
569 equivalent to the corresponding member of $wgDBservers
570 - tablePrefix Table prefix, the foreign wiki's $wgDBprefix
571 - hasSharedCache Set to true if the foreign wiki's $wgMainCacheType is identical to,
572 and accessible from, this wiki.
574 - apibase Use for the foreign API's URL
575 - apiThumbCacheExpiry How long to locally cache thumbs for
576 If you leave $wgLocalFileRepo set to false, Setup will fill in appropriate values.
577 Otherwise, set $wgLocalFileRepo to a repository structure as described above.
578 If you set $wgUseInstantCommons to true, it will add an entry for Commons.
579 If you set $wgForeignFileRepos to an array of repository structures, those will
580 be searched after the local file repo.
581 Otherwise, you will only have access to local media files.
582 @see \FileRepo::__construct for the default options.
583 @see Setup.php for an example usage and default initialization.
588 Enable the use of files from one or more other wikis.
589 If you operate multiple wikis, you can declare a shared upload path here.
590 Uploads to the local wiki will NOT be stored here - See $wgLocalFileRepo
591 and $wgUploadDirectory for that.
592 The wiki will only consider the foreign repository if no file of the given name
593 is found in the local repository (e.g. via `[[File:..]]` syntax).
595 @see self::LocalFileRepo
599 Use Wikimedia Commons as a foreign file repository.
600 This is a shortcut for adding an entry to $wgForeignFileRepos
601 for https://commons.wikimedia.org, using ForeignAPIRepo with the
608 Shortcut for adding an entry to $wgForeignFileRepos.
609 Uses the following variables:
610 - directory: $wgSharedUploadDirectory.
611 - url: $wgSharedUploadPath.
612 - hashLevels: Based on $wgHashedSharedUploadDirectory.
613 - thumbScriptUrl: $wgSharedThumbnailScriptPath.
614 - transformVia404: Based on $wgGenerateThumbnailOnParse.
615 - descBaseUrl: $wgRepositoryBaseUrl.
616 - fetchDescription: $wgFetchCommonsDescriptions.
617 If $wgSharedUploadDBname is set, it uses the ForeignDBRepo
618 class, with also the following variables:
619 - dbName: $wgSharedUploadDBname.
621 - dbServer: $wgDBserver.
623 - dbPassword: $wgDBpassword.
624 - dbFlags: Based on $wgDebugDumpSql.
625 - tablePrefix: $wgSharedUploadDBprefix,
626 - hasSharedCache: $wgCacheSharedUploads.
628 SharedUploadDirectory:
634 Shortcut for the 'directory' setting of $wgForeignFileRepos.
635 Only used if $wgUseSharedUploads is enabled.
643 Shortcut for the 'url' setting of $wgForeignFileRepos.
644 Only used if $wgUseSharedUploads is enabled.
646 HashedSharedUploadDirectory:
650 Shortcut for the 'hashLevels' setting of $wgForeignFileRepos.
651 Only used if $wgUseSharedUploads is enabled.
654 default: 'https://commons.wikimedia.org/wiki/File:'
656 Shortcut for the 'descBaseUrl' setting of $wgForeignFileRepos.
657 Only used if $wgUseSharedUploads is enabled.
659 FetchCommonsDescriptions:
663 Shortcut for the 'fetchDescription' setting of $wgForeignFileRepos.
664 Only used if $wgUseSharedUploads is enabled.
672 Shortcut for the ForeignDBRepo 'dbName' setting in $wgForeignFileRepos.
673 Set this to false if the uploads do not come from a wiki.
674 Only used if $wgUseSharedUploads is enabled.
676 SharedUploadDBprefix:
680 Shortcut for the ForeignDBRepo 'tablePrefix' setting in $wgForeignFileRepos.
681 Only used if $wgUseSharedUploads is enabled.
687 Shortcut for the ForeignDBRepo 'hasSharedCache' setting in $wgForeignFileRepos.
688 Only used if $wgUseSharedUploads is enabled.
690 ForeignUploadTargets:
695 Array of foreign file repo names (set in $wgForeignFileRepos above) that
696 are allowable upload targets. These wikis must have some method of
697 authentication (i.e. CentralAuth), and be CORS-enabled for this wiki.
698 The string 'local' signifies the default local file repository.
700 $wgForeignUploadTargets = [ 'shared' ];
703 fields: { description: true, date: false, categories: false }
704 licensemessages: { local: generic-local, foreign: generic-foreign }
705 comment: { local: '', foreign: '' }
706 format: { filepage: $DESCRIPTION, description: $TEXT, ownwork: '', license: '', uncategorized: '' }
709 Configuration for file uploads using the embeddable upload dialog
710 (https://www.mediawiki.org/wiki/Upload_dialog).
711 This applies also to foreign uploads to this wiki (the configuration is loaded by remote
712 wikis using the action=query&meta=siteinfo API).
713 See below for documentation of each property. None of the properties may be omitted.
718 File backend structure configuration.
719 This is an array of file backend configuration arrays.
720 Each backend configuration has the following parameters:
721 - name : A unique name for the backend
722 - class : The file backend class to use
723 - wikiId : A unique string that identifies the wiki (container prefix)
724 - lockManager : The name of a lock manager (see $wgLockManagers) [optional]
725 See FileBackend::__construct() for more details.
726 Additional parameters are specific to the file backend class used.
727 These settings should be global to all wikis when possible.
728 FileBackendMultiWrite::__construct() is augmented with a 'template' option that
729 can be used in any of the values of the 'backends' array. Its value is the name of
730 another backend in $wgFileBackends. When set, it pre-fills the array with all of the
731 configuration of the named backend. Explicitly set values in the array take precedence.
732 There are two particularly important aspects about each backend:
733 - a) Whether it is fully qualified or wiki-relative.
734 By default, the paths of files are relative to the current wiki,
735 which works via prefixing them with the current wiki ID when accessed.
736 Setting 'domainId' forces the backend to be fully qualified by prefixing
737 all paths with the specified value instead. This can be useful if
738 multiple wikis need to share the same data. Note that 'name' is *not*
739 part of any prefix and thus should not be relied upon for namespacing.
740 - b) Whether it is only defined for some wikis or is defined on all
741 wikis in the wiki farm. Defining a backend globally is useful
742 if multiple wikis need to share the same data.
743 One should be aware of these aspects when configuring a backend for use with
744 any basic feature or plugin. For example, suppose an extension stores data for
745 different wikis in different directories and sometimes needs to access data from
746 a foreign wiki's directory in order to render a page on given wiki. The extension
747 would need a fully qualified backend that is defined on all wikis in the wiki farm.
752 List of lock manager backend configurations.
753 Each backend configuration has the following parameters:
754 - name : A unique name for the lock manager
755 - class : The lock manager class to use
756 See LockManager::__construct() for more details.
757 Additional parameters are specific to the lock manager class used.
758 These settings should be global to all wikis.
761 callback: [MediaWiki\MainConfigSchema, getDefaultShowEXIF]
763 Whether to show Exif data.
764 The effective default value is determined at runtime:
765 enabled if PHP's EXIF extension module is loaded.
766 Requires PHP's Exif extension: https://www.php.net/manual/en/ref.exif.php
767 @note FOR WINDOWS USERS:
768 To enable Exif functions, add the following line to the "Windows
769 extensions" section of php.ini:
771 extension=extensions/php_exif.dll
774 UpdateCompatibleMetadata:
776 description: 'Shortcut for the ''updateCompatibleMetadata'' setting of $wgLocalFileRepo.'
780 Allow for upload to be copied from an URL.
781 The timeout for copy uploads is set by $wgCopyUploadTimeout.
782 You have to assign the user right 'upload_by_url' to a user group, to use this.
787 A list of domains copy uploads can come from
789 CopyUploadsFromSpecialUpload:
792 Enable copy uploads from Special:Upload. $wgAllowCopyUploads must also be
793 true. If $wgAllowCopyUploads is true, but this is false, you will only be
794 able to perform copy uploads from the API or extensions (e.g. UploadWizard).
798 Proxy to use for copy upload requests.
806 Different timeout for upload by url
807 This could be useful since when fetching large files, you may want a
808 timeout longer than the default $wgHTTPTimeout. False means fallback
811 CopyUploadAllowOnWikiDomainConfig:
814 If true, the value of $wgCopyUploadsDomains will be merged with the
815 contents of MediaWiki:Copyupload-allowed-domains.
820 Max size for uploads, in bytes.
821 If not set to an array, applies to all uploads. If set to an array, per upload
822 type maximums can be set, using the file and url keys. If the `*` key is set
823 this value will be used as maximum for non-specified types.
824 The below example would set the maximum for all uploads to 250 KiB except,
825 for upload-by-url, which would have a maximum of 500 KiB.
837 Minimum upload chunk size, in bytes.
838 When using chunked upload, non-final chunks smaller than this will be rejected.
839 Note that this may be further reduced by the `upload_max_filesize` and
840 `post_max_size` PHP settings. Use ApiUpload::getMinUploadChunkSize to
841 get the effective minimum chunk size used by MediaWiki.
844 @see \ApiUpload::getMinUploadChunkSize
848 Point the upload navigation link to an external URL
849 Useful if you want to use a shared repository by default
850 without disabling local uploads (use $wgEnableUploads = false for that).
853 $wgUploadNavigationUrl = 'https://commons.wikimedia.org/wiki/Special:Upload';
855 UploadMissingFileUrl:
858 Point the upload link for missing files to an external URL, as with
859 $wgUploadNavigationUrl. The URL will get "(?|&)wpDestFile=<filename>"
860 appended to it as appropriate.
864 Give a path here to use thumb.php for thumbnail generation on client
865 request, instead of generating them on render and outputting a static URL.
866 This is necessary if some of your apache servers don't have read/write
867 access to the thumbnail path.
870 $wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
872 SharedThumbnailScriptPath:
878 Shortcut for the 'thumbScriptUrl' setting of $wgForeignFileRepos.
879 Only used if $wgUseSharedUploads is enabled.
881 HashedUploadDirectory:
885 Shortcut for setting `hashLevels=2` in $wgLocalFileRepo.
886 @note Only used if $wgLocalFileRepo is not set.
896 This is the list of preferred extensions for uploading files. Uploading files
897 with extensions not in this list will trigger a warning.
898 @warning If you add any OpenOffice or Microsoft Office file formats here,
899 such as odt or doc, and untrusted users are allowed to upload files, then
900 your wiki will be vulnerable to cross-site request forgery (CSRF).
901 ProhibitedFileExtensions:
937 Files with these extensions will never be allowed as uploads.
938 An array of file extensions to prevent being uploaded. You should
939 append to this array if you want to prevent additional file extensions.
940 @since 1.37; previously $wgFileBlacklist
944 - application/javascript
947 - application/x-shellscript
956 - application/x-msdownload
957 - application/x-msmetafile
963 Files with these MIME types will never be allowed as uploads
964 if $wgVerifyMimeType is enabled.
965 @since 1.37; previously $wgMimeTypeBlacklist
969 This is a flag to determine whether or not to check file extensions on upload.
970 @warning Setting this to false is insecure for public wikis.
971 StrictFileExtensions:
974 If this is turned off, users may override the warning for files not covered
975 by $wgFileExtensions.
976 @warning Setting this to false is insecure for public wikis.
977 DisableUploadScriptChecks:
980 Setting this to true will disable the upload system's checks for HTML/JavaScript.
981 @warning THIS IS VERY DANGEROUS on a publicly editable site, so USE
982 $wgGroupPermissions TO RESTRICT UPLOADING to only those that you trust
985 description: 'Warn if uploaded files are larger than this (in bytes), or false to disable'
995 list of trusted media-types and MIME types.
996 Use the MEDIATYPE_xxx constants to represent media types.
997 This list is used by File::isSafeFile
998 Types not listed here will have a warning about unsafe content
999 displayed on the images description page. It would also be possible
1000 to use this for further restrictions, like disabling direct
1001 [[media:...]] links for non-trusted formats.
1006 Plugins for media file type handling.
1007 Each entry in the array maps a MIME type to a class name
1008 Core media handlers are listed in MediaHandlerFactory,
1009 and extensions should use extension.json.
1010 NativeImageLazyLoading:
1014 Toggles native image lazy loading, via the "loading" attribute.
1015 @warning EXPERIMENTAL!
1017 ParserTestMediaHandlers:
1019 image/jpeg: MockBitmapHandler
1020 image/png: MockBitmapHandler
1021 image/gif: MockBitmapHandler
1022 image/tiff: MockBitmapHandler
1023 image/webp: MockBitmapHandler
1024 image/x-ms-bmp: MockBitmapHandler
1025 image/x-bmp: MockBitmapHandler
1026 image/x-xcf: MockBitmapHandler
1027 image/svg+xml: MockSvgHandler
1028 image/vnd.djvu: MockDjVuHandler
1031 Media handler overrides for parser tests (they don't need to generate actual
1032 thumbnails, so a mock will do)
1036 Whether to enable server-side image thumbnailing. If false, images will
1037 always be sent to the client in full resolution, with appropriate width= and
1038 height= attributes on the <img> tag for the client to do its own scaling.
1042 Resizing can be done using PHP's internal image libraries or using
1043 ImageMagick or another third-party converter, e.g. GraphicMagick.
1044 These support more file formats than PHP, which only supports PNG,
1045 GIF, JPG, XBM and WBMP.
1046 Use Image Magick instead of PHP builtin functions.
1047 ImageMagickConvertCommand:
1048 default: /usr/bin/convert
1049 description: 'The convert command shipped with ImageMagick'
1050 MaxInterlacingAreas:
1054 Array of max pixel areas for interlacing per MIME type
1058 description: 'Sharpening parameter to ImageMagick'
1059 SharpenReductionThreshold:
1061 description: 'Reduction in linear dimensions below which sharpening will be enabled'
1065 Temporary directory used for ImageMagick. The directory must exist. Leave
1066 this set to false to let ImageMagick decide for itself.
1067 CustomConvertCommand:
1070 Use another resizing converter, e.g. GraphicMagick
1071 %s will be replaced with the source path, %d with the destination
1072 %w and %h will be replaced with the width and height.
1073 **Example for GraphicMagick:**
1075 $wgCustomConvertCommand = "gm convert %s -resize %wx%h %d"
1077 Leave as false to skip this.
1079 default: /usr/bin/jpegtran
1081 used for lossless jpeg rotation
1086 At default setting of 'yuv420', JPEG thumbnails will use 4:2:0 chroma
1087 subsampling to reduce file size, at the cost of possible color fringing
1089 See https://en.wikipedia.org/wiki/Chroma_subsampling
1091 false - use scaling system's default (same as pre-1.27 behavior)
1092 'yuv444' - luma and chroma at same resolution
1093 'yuv422' - chroma at 1/2 resolution horizontally, full vertically
1094 'yuv420' - chroma at 1/2 resolution in both dimensions
1095 This setting is currently supported only for the ImageMagick backend;
1096 others may default to 4:2:0 or 4:4:4 or maintaining the source file's
1097 sampling in the thumbnail.
1102 When scaling a JPEG thumbnail, this is the quality we request
1103 from the backend. It should be an integer between 1 and 100,
1104 with 100 indicating 100% quality.
1107 default: /usr/bin/exiv2
1109 Some tests and extensions use exiv2 to manipulate the Exif metadata in some
1112 default: /usr/bin/exiftool
1114 Path to exiftool binary. Used for lossless ICC profile swapping.
1118 ImageMagick: '$path/convert -background "#ffffff00" -thumbnail $widthx$height\! $input PNG:$output'
1119 sodipodi: '$path/sodipodi -z -w $width -f $input -e $output'
1120 inkscape: '$path/inkscape -z -w $width -f $input -e $output'
1121 batik: 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input'
1122 rsvg: '$path/rsvg-convert -w $width -h $height -o $output $input'
1123 imgserv: '$path/imgserv-wrapper -i svg -o png -w$width $input $output'
1124 ImagickExt: ['SvgHandler::rasterizeImagickExt']
1127 Scalable Vector Graphics (SVG) may be uploaded as images.
1128 Since SVG support is not yet standard in browsers, it is
1129 necessary to rasterize SVGs to PNG as a fallback format.
1130 An external program is required to perform this conversion.
1131 If set to an array, the first item is a PHP callable and any further items
1132 are passed as parameters after $srcPath, $dstPath, $width, $height
1134 default: ImageMagick
1135 description: 'Pick a converter defined in $wgSVGConverters'
1138 description: 'If not in the executable PATH, specify the SVG converter path.'
1141 description: 'Don''t scale a SVG larger than this'
1145 Don't read SVG metadata beyond this point.
1146 Default is 1024*256 bytes
1153 Whether native rendering by the browser agent is allowed
1154 Default is false. Setting it to true disables all SVG conversion.
1155 Setting to the string 'partial' will only allow native rendering
1156 when the filesize is below SVGNativeRenderingSizeLimit and if the
1157 file contains at most 1 language.
1159 SVGNativeRenderingSizeLimit:
1162 Filesize limit for allowing SVGs to render natively by the browser agent
1165 MediaInTargetLanguage:
1168 Whether thumbnails should be generated in target language (usually, same as
1169 page language), if available.
1170 Currently, applies only to SVG images that use the systemLanguage attribute
1171 to specify text language.
1180 The maximum number of pixels a source image can have if it is to be scaled
1181 down by a scaler that requires the full source image to be decompressed
1182 and stored in decompressed form, before the thumbnail is generated.
1183 This provides a limit on memory usage for the decompression side of the
1184 image scaler. The limit is used when scaling PNGs with any of the
1185 built-in image scalers, such as ImageMagick or GD. It is ignored for
1186 JPEGs with ImageMagick, and when using the VipsScaler extension.
1187 If set to false, MediaWiki will not check the size of the image before
1188 attempting to scale it. Extensions may still override this setting by
1189 using the BitmapHandlerCheckImageArea hook.
1190 The default is 50 MB if decompressed to RGBA form, which corresponds to
1191 12.5 million pixels or 3500x3500.
1195 Force thumbnailing of animated GIFs above this size to a single
1196 frame instead of an animated thumbnail. As of MW 1.17 this limit
1197 is checked against the total size of all frames in the animation.
1198 It probably makes sense to keep this equal to $wgMaxImageArea.
1202 mergeStrategy: replace
1204 Browsers don't support TIFF inline generally...
1205 For inline display, we need to convert to PNG or JPEG.
1206 Note scaling should work with ImageMagick, but may not with GD scaling.
1209 // PNG is lossless, but inefficient for photos
1210 $wgTiffThumbnailType = [ 'png', 'image/png' ];
1211 // JPEG is good for photos, but has no transparency support. Bad for diagrams.
1212 $wgTiffThumbnailType = [ 'jpg', 'image/jpeg' ];
1215 default: '20030516000000'
1217 If rendered thumbnail files are older than this timestamp, they
1218 will be rerendered on demand as if the file didn't already exist.
1219 Update if there is some need to force thumbs and SVG rasterizations
1220 to rerender, such as fixes to rendering bugs.
1221 AttemptFailureEpoch:
1224 Certain operations are avoided if there were too many recent failures,
1225 for example, thumbnail generation. Bump this value to invalidate all
1226 memory of failed operations and thus allow further attempts to resume.
1227 This is useful when a cause for the failures has been found and fixed.
1231 If set, inline scaled images will still produce "<img>" tags ready for
1232 output instead of showing an error message.
1233 This may be useful if errors are transitory, especially if the site
1234 is configured to automatically render thumbnails on request.
1235 On the other hand, it may obscure error conditions from debugging.
1236 Enable the debug log or the 'thumbnail' log group to make sure errors
1237 are logged to a file for review.
1238 GenerateThumbnailOnParse:
1242 Render thumbnails while parsing wikitext.
1243 If set to false, then the Parser will output valid thumbnail URLs without
1244 generating or storing the thumbnail files. This can significantly speed up
1245 processing on the web server. The site admin needs to configure a 404 handler
1246 in order for the URLs in question to regenerate the thumbnails in question
1247 on-demand. This can enable concurrency and also save computing resources
1248 as not every resolution of every image on every page is accessed between
1249 re-parses of the article. For example, re-parses triggered by bot edits,
1250 or cascading updates from template edits.
1251 If you use $wgLocalFileRepo, then you will also need to set the following:
1253 $wgLocalFileRepo['transformVia404'] = true;
1256 ShowArchiveThumbnails:
1258 description: 'Show thumbnails for old images on the image description page'
1265 If set to true, images that contain certain the exif orientation tag will
1266 be rotated accordingly. If set to null, try to auto-detect whether a scaler
1267 is available that can rotate.
1274 Internal name of virus scanner. This serves as a key to the
1275 $wgAntivirusSetup array. Set this to NULL to disable virus scanning. If not
1276 null, every file uploaded will be scanned for viruses.
1279 clamav: { command: 'clamscan --no-summary ', codemap: { 0: 0, 1: 1, 52: -1, '*': false }, messagepattern: '/.*?:(.*)/sim' }
1282 Configuration for different virus scanners. This an associative array of
1283 associative arrays. It contains one setup array per known scanner type.
1284 The entry is selected by $wgAntivirus, i.e.
1285 valid values for $wgAntivirus are the keys defined in this array.
1286 The configuration array for each scanner contains the following keys:
1287 "command", "codemap", "messagepattern":
1288 "command" is the full command to call the virus scanner - %f will be
1289 replaced with the name of the file to scan. If not present, the filename
1290 will be appended to the command. Note that this must be overwritten if the
1291 scanner is not in the system path; in that case, please set
1292 $wgAntivirusSetup[$wgAntivirus]['command'] to the desired command with full
1294 "codemap" is a mapping of exit code to return codes of the detectVirus
1295 function in SpecialUpload.
1296 - An exit code mapped to AV_SCAN_FAILED causes the function to consider
1297 the scan to be failed. This will pass the file if $wgAntivirusRequired
1299 - An exit code mapped to AV_SCAN_ABORTED causes the function to consider
1300 the file to have an unsupported format, which is probably immune to
1301 viruses. This causes the file to pass.
1302 - An exit code mapped to AV_NO_VIRUS will cause the file to pass, meaning
1304 - All other codes (like AV_VIRUS_FOUND) will cause the function to report
1306 - You may use "*" as a key in the array to catch all exit codes not mapped otherwise.
1307 "messagepattern" is a perl regular expression to extract the meaningful part of the scanners
1308 output. The relevant part should be matched as group one (\1).
1309 If not defined or the pattern does not match, the full message is shown to the user.
1312 description: 'Determines if a failed virus scan (AV_SCAN_FAILED) will cause the file to be rejected.'
1315 description: 'Determines if the MIME type of uploaded files should be checked'
1319 Sets the MIME type definition file to use by includes/libs/mime/MimeAnalyzer.php.
1320 When this is set to the path of a mime.types file, MediaWiki will use this
1321 file to map MIME types to file extensions and vice versa, in lieu of its
1322 internal MIME map. Note that some MIME mappings are considered "baked in"
1323 and cannot be overridden. See includes/libs/mime/MimeMapMinimal.php for a
1325 example: $wgMimeTypeFile = '/etc/mime.types';
1329 Sets the MIME type info file to use by includes/libs/mime/MimeAnalyzer.php.
1330 Set to null to use the minimum set of built-in defaults only.
1331 MimeDetectorCommand:
1337 Sets an external MIME detector program. The command must print only
1338 the MIME type to standard output.
1339 The name of the file to process will be appended to the command given here.
1340 If not set or NULL, PHP's mime_content_type function will be used.
1343 #$wgMimeDetectorCommand = "file -bi"; // use external MIME detector (Linux)
1345 TrivialMimeDetection:
1348 Switch for trivial MIME detection. Used by thumb.php to disable all fancy
1349 things, because only a few types of images are needed and file extensions
1353 'http://www.w3.org/2000/svg:svg': image/svg+xml
1355 'http://www.lysator.liu.se/~alla/dia/:diagram': application/x-dia-diagram
1356 'http://www.w3.org/1999/xhtml:html': text/html
1360 Additional XML types we can allow via MIME-detection.
1361 array = [ 'rootElement' => 'associatedMimeType' ]
1372 Limit images on image description pages to a user-selectable limit.
1373 In order to reduce disk usage, limits can only be selected from this list.
1374 The user preference is saved as an array offset in the database, by default
1375 the offset is set with $wgDefaultUserOptions['imagesize']. Make sure you
1376 change it if you alter the array (see T10858).
1377 This list is also used by ImagePage for alternate size links.
1388 Adjust thumbnails on image pages according to a user setting. In order to
1389 reduce disk usage, the values can only be selected from a list. This is the
1390 list of settings the user can choose from:
1391 ThumbnailNamespaces:
1398 Defines what namespaces thumbnails will be displayed for in Special:Search.
1399 This is the list of namespaces for which thumbnails (or a placeholder in
1400 the absence of a thumbnail) will be shown:
1407 When defined, is an array of image widths used as buckets for thumbnail generation.
1408 The goal is to save resources by generating thumbnails based on reference buckets instead of
1409 always using the original. This will incur a speed gain but cause a quality loss.
1410 The buckets generation is chained, with each bucket generated based on the above bucket
1411 when possible. File handlers have to opt into using that feature. For now only BitmapHandler
1413 ThumbnailMinimumBucketDistance:
1416 When using thumbnail buckets as defined above, this sets the minimum distance to the bucket
1417 above the requested size. The distance represents how many extra pixels of width the bucket
1418 needs in order to be used as the reference for a given thumbnail. For example, with the
1420 $wgThumbnailBuckets = [ 128, 256, 512 ];
1421 and a distance of 50:
1422 $wgThumbnailMinimumBucketDistance = 50;
1423 If we want to render a thumbnail of width 220px, the 512px bucket will be used,
1424 because 220 + 50 = 270 and the closest bucket bigger than 270px is 512.
1425 UploadThumbnailRenderMap:
1429 When defined, is an array of thumbnail widths to be rendered at upload time. The idea is to
1430 prerender common thumbnail sizes, in order to avoid the necessity to render them on demand,
1431 which has a performance impact for the first client to view a certain size.
1432 This obviously means that more disk space is needed per upload upfront.
1434 UploadThumbnailRenderMethod:
1437 The method through which the thumbnails will be prerendered for the entries in
1438 $wgUploadThumbnailRenderMap
1439 The method can be either "http" or "jobqueue". The former uses an http request to hit the
1441 This method only works if thumbnails are configured to be rendered by a 404 handler. The
1442 latter option uses the job queue to render the thumbnail.
1444 UploadThumbnailRenderHttpCustomHost:
1447 When using the "http" $wgUploadThumbnailRenderMethod, lets one specify a custom Host HTTP
1450 UploadThumbnailRenderHttpCustomDomain:
1453 When using the "http" $wgUploadThumbnailRenderMethod, lets one specify a custom domain to
1454 send the HTTP request to.
1456 UseTinyRGBForJPGThumbnails:
1459 When this variable is true and JPGs use the sRGB ICC profile, swaps it for the more
1461 (and free) TinyRGB profile when generating thumbnails.
1467 Parameters for the "<gallery>" tag.
1469 - imagesPerRow: Default number of images per-row in the gallery. 0 -> Adapt to screensize
1470 - imageWidth: Width of the cells containing images in galleries (in "px")
1471 - imageHeight: Height of the cells containing images in galleries (in "px")
1472 - captionLength: Length to truncate filename to in caption when using "showfilename".
1473 A value of 'true' will truncate the filename to one line using CSS
1474 and will be the behaviour after deprecation.
1475 @deprecated since 1.28
1476 - showBytes: Show the filesize in bytes in categories
1477 - showDimensions: Show the dimensions (width x height) in categories
1478 - mode: Gallery mode
1482 Adjust width of upright images when parameter 'upright' is used
1483 This allows a nicer look for upright images without the need to fix the width
1484 by hardcoded px in wiki sourcecode.
1487 description: 'Default value for chmoding of new directories.'
1491 Generate and use thumbnails suitable for screens with 1.5 and 2.0 pixel densities.
1492 This means a 320x240 use of an image on the wiki will also generate 480x360 and 640x480
1493 thumbnails, output via the srcset attribute.
1497 Add a preconnect link for browsers to a remote FileRepo host.
1498 This is an optional performance enhancement designed for wiki farm where
1499 $wgForeignFileRepos or $wgLocalFileRepo is set to serve thumbnails from a
1500 separate hostname (e.g. not local `/w/images`). The feature expects at most
1501 a single remote hostname to be used.
1502 If multiple foreign repos are registered that serve images from different hostnames,
1503 only the first will be preconnected.
1504 This may cause unneeded HTTP connections in browsers on wikis where a foreign repo is
1505 enabled but where a local repo is more commonly used.
1507 DjvuUseBoxedCommand:
1510 Whether to use BoxedCommand or not. Temporary feature flag for T352515
1518 Path of the djvudump executable
1519 Enable this and $wgDjvuRenderer to enable djvu rendering
1520 example: $wgDjvuDump = 'djvudump';
1521 If this is set, {@link self::ShellboxShell} must be set to the correct
1529 Path of the ddjvu DJVU renderer
1530 Enable this and $wgDjvuDump to enable djvu rendering
1531 example: $wgDjvuRenderer = 'ddjvu';
1538 Path of the djvutxt DJVU text extraction utility
1539 Enable this and $wgDjvuDump to enable text layer extraction from djvu files
1540 example: $wgDjvuTxt = 'djvutxt';
1541 If this is set, {@link self::ShellboxShell} must be set to the correct
1549 Shell command for the DJVU post processor
1550 Default: pnmtojpeg, since ddjvu generates ppm output
1551 Set this to false to output the ppm file directly.
1552 DjvuOutputExtension:
1554 description: 'File extension for the DJVU post processor output'
1558 Site admin email address.
1559 Defaults to "wikiadmin@$wgServerName" (in Setup.php).
1563 Sender email address for e-mail notifications.
1564 The address we use as sender when a user requests a password reminder,
1565 as well as other e-mail notifications.
1566 Defaults to "apache@$wgServerName" (in Setup.php).
1570 Reply-To address for e-mail notifications.
1571 Defaults to $wgPasswordSender (in Setup.php).
1575 Set to true to enable the e-mail basic features:
1576 Password reminders, etc. If sending e-mail on your
1577 server doesn't work, you might want to disable this.
1581 Set to true to enable user-to-user e-mail.
1582 This can potentially be abused, as it's hard to track.
1586 Set to true to enable the Special Mute page. This allows users
1587 to mute unwanted communications from other users, and is linked
1588 to from emails originating from Special:Email.
1590 EnableUserEmailMuteList:
1593 Set to true to enable user-to-user e-mail mutelist.
1594 @since 1.37; previously $wgEnableUserEmailBlacklist
1595 UserEmailUseReplyTo:
1598 If true put the sending user's email in a Reply-To header
1599 instead of From (false). ($wgPasswordSender will be used as From.)
1600 Some mailers (eg SMTP) set the SMTP envelope sender to the From value,
1601 which can cause problems with SPF validation and leak recipient addresses
1602 when bounces are sent to the sender. In addition, DMARC restrictions
1603 can cause emails to fail to be received when false.
1604 PasswordReminderResendTime:
1607 Minimum time, in hours, which must elapse between password reminder
1608 emails for a given account. This is to prevent abuse by mail flooding.
1611 description: 'The time, in seconds, when an emailed temporary password expires.'
1612 UserEmailConfirmationTokenExpiry:
1614 description: 'The time, in seconds, when an email confirmation email expires'
1615 PasswordExpirationDays:
1618 The number of days that a user's password is good for. After this number of days, the
1619 user will be asked to reset their password. Set to false to disable password expiration.
1620 PasswordExpireGrace:
1623 If a user's password is expired, the number of seconds when they can still login,
1624 and cancel their password change, but are sent to the password change form on each login.
1632 For using a direct (authenticated) SMTP server connection.
1633 Default to false or fill an array :
1636 'host' => 'SMTP domain',
1637 'IDHost' => 'domain for MessageID',
1639 'auth' => [true|false],
1640 'username' => [SMTP username],
1641 'password' => [SMTP password],
1644 AdditionalMailParams:
1646 description: 'Additional email parameters, will be passed as the last argument to mail() call.'
1650 For parts of the system that have been updated to provide HTML email content, send
1651 both text and HTML parts as the body of the email
1656 Allow sending of e-mail notifications with the editor's address as sender.
1657 This setting depends on $wgEnotifRevealEditorAddress also being enabled.
1658 If both are enabled, notifications for actions from users that have opted-in,
1659 will be sent to other users with their address as "From" instead of "Reply-To".
1660 If disabled, or not opted-in, notifications come from $wgPasswordSender.
1661 EmailAuthentication:
1664 Require email authentication before sending mail to an email address.
1665 This is highly recommended. It prevents MediaWiki from being used as an open
1669 description: 'Allow users to enable email notification ("enotif") on watchlist changes.'
1673 Allow users to enable email notification ("enotif") when someone edits their
1675 The owner of the user talk page must also have the 'enotifusertalkpages' user
1676 preference set to true.
1677 EnotifRevealEditorAddress:
1681 Allow sending of e-mail notifications with the editor's address in "Reply-To".
1682 Note, enabling this only actually uses it in notification e-mails if the user
1683 opted-in to this feature. This feature flag also controls visibility of the
1684 'enotifrevealaddr' preference, which, if users opt into, will make e-mail
1685 notifications about their actions use their address as "Reply-To".
1686 To set the address as "From" instead of "Reply-To", also enable $wgEnotifFromEditor.
1687 If disabled, or not opted-in, notifications come from $wgPasswordSender.
1691 Potentially send notification mails on minor edits to pages. This is enabled
1692 by default. If this is false, users will never be notified on minor edits.
1693 If it is true, editors with the 'nominornewtalk' right (typically bots) will still not
1694 trigger notifications for minor edits they make (to any page, not just user talk).
1695 Finally, if the watcher/recipient has the 'enotifminoredits' user preference set to
1696 false, they will not receive notifications for minor edits.
1697 User talk notifications are also affected by $wgEnotifMinorEdits, the above settings,
1698 $wgEnotifUserTalk, and the preference described there.
1702 Send a generic mail instead of a personalised mail for each user. This
1703 always uses UTC as the time zone, and doesn't include the username.
1704 For pages with many users watching, this can significantly reduce mail load.
1705 Has no effect when using sendmail rather than SMTP.
1709 Maximum number of users to mail at once when using impersonal mail. Should
1710 match the limit on your mail server.
1713 description: 'Use real name instead of username in e-mail "from" field.'
1714 UsersNotifiedOnAllChanges:
1718 Array of usernames who will be sent a notification email for every change
1719 which occurs on a wiki. Users will not be notified of their own changes.
1723 Current wiki database name
1724 Should be alphanumeric, without spaces nor hyphens.
1725 This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain).
1726 This should still be set even if $wgLBFactoryConf is configured.
1733 Current wiki database schema name
1734 Should be alphanumeric, without spaces nor hyphens.
1735 This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain).
1736 This should still be set even if $wgLBFactoryConf is configured.
1740 Current wiki database table name prefix
1741 Should be alphanumeric, without spaces nor hyphens, preferably ending in an underscore.
1742 This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain).
1743 This should still be set even if $wgLBFactoryConf is configured.
1746 description: 'Database host name or IP address'
1749 description: 'Database port number'
1752 description: 'Database username'
1755 description: 'Database user''s password'
1758 description: 'Database type'
1762 Whether to use SSL in DB connection.
1763 This setting is only used if $wgLBFactoryConf['class'] is set to
1764 '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
1765 the 'ssl' parameter of the server array must be set to achieve the same functionality.
1769 Whether to use compression in DB connection.
1770 This setting is only used $wgLBFactoryConf['class'] is set to
1771 '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
1772 the DBO_COMPRESS flag must be set in the 'flags' option of the database
1773 connection to achieve the same functionality.
1776 description: 'Separate username for maintenance tasks. Leave as null to use the default.'
1779 description: 'Separate password for maintenance tasks. Leave as null to use the default.'
1784 Leave as null to select the default search engine for the
1785 selected database type (eg SearchMySQL), or set to a class
1786 name to override to a custom search engine.
1787 If the canonical name for the search engine doesn't match the class name
1788 (because it's namespaced for example), you can add a mapping for this in
1789 SearchMappings in extension.json.
1790 SearchTypeAlternatives:
1793 Alternative search types
1794 Sometimes you want to support multiple search engines for testing. This
1795 allows users to select their search engine of choice via url parameters
1796 to Special:Search and the action=search API. If using this, there's no
1797 need to add $wgSearchType to it, that is handled automatically.
1798 If the canonical name for the search engine doesn't match the class name
1799 (because it's namespaced for example), you can add a mapping for this in
1800 SearchMappings in extension.json.
1802 default: 'ENGINE=InnoDB, DEFAULT CHARSET=binary'
1803 description: 'MySQL table options to use during installation or update'
1807 SQL Mode - default is turning off all modes, including strict, if set.
1808 null can be used to skip the setting for performance reasons and assume
1809 DBA has done his best job.
1810 String override can be used for some additional fun :-)
1814 Default group to use when getting database connections.
1815 Will be used as default query group in ILoadBalancer::getConnection.
1819 description: 'To override default SQLite data directory ($docroot/../data)'
1823 Shared database for multiple wikis. Commonly used for storing a user table
1824 for single sign-on. The server for this database must be the same as for the
1826 For backwards compatibility the shared prefix is set to the same as the local
1827 prefix, and the user table is listed in the default list of shared tables.
1828 The user_properties table is also added so that users will continue to have their
1829 preferences shared (preferences were stored in the user table prior to 1.16)
1830 $wgSharedTables may be customized with a list of tables to share in the shared
1831 database. However it is advised to limit what tables you do share as many of
1832 MediaWiki's tables may have side effects if you try to share them.
1833 $wgSharedPrefix is the table prefix for the shared database. It defaults to
1835 $wgSharedSchema is the table schema for the shared database. It defaults to
1841 callback: [MediaWiki\MainConfigSchema, getDefaultSharedPrefix]
1842 description: '@see self::SharedDB'
1847 - user_autocreate_serial
1851 The installer will add 'actor' to this list for all new wikis.
1856 callback: [MediaWiki\MainConfigSchema, getDefaultSharedSchema]
1866 Database load balancer
1867 This is a two-dimensional array, a list of server info structures
1870 - dbname: Default database name
1872 - password: DB password
1874 - driver: DB driver (when there are multiple drivers)
1875 - load: Ratio of DB_REPLICA load, must be >=0, the sum of all loads must be >0.
1876 If this is zero for any given server, no normal query traffic will be
1877 sent to it. It will be excluded from lag checks in maintenance scripts.
1878 The only way it can receive traffic is if groupLoads is used.
1879 - groupLoads: (optional) Array of load ratios, the key is the query group name. A query
1880 may belong to several groups, the most specific group defined here is used.
1881 - flags: (optional) Bit field of properties:
1882 - DBO_DEFAULT: Transactionalize web requests and use autocommit otherwise
1883 - DBO_DEBUG: Equivalent of $wgDebugDumpSql
1884 - DBO_SSL: Use TLS connection encryption if available (deprecated)
1885 - DBO_COMPRESS: Use protocol compression with database connections
1886 - DBO_PERSISTENT: Enables persistent database connections
1887 - ssl: (optional) Boolean, whether to use TLS encryption. Overrides DBO_SSL.
1888 - max lag: (optional) Maximum replication lag before a replica DB goes out of rotation
1889 - is static: (optional) Set to true if the dataset is static and no replication is used.
1890 - cliMode: (optional) Connection handles will not assume that requests are short-lived
1891 nor that INSERT..SELECT can be rewritten into a buffered SELECT and INSERT.
1892 This is what DBO_DEFAULT uses to determine when a web request is present.
1893 [Default: uses value of $wgCommandLineMode]
1894 These and any other user-defined properties will be assigned to the mLBInfo member
1895 variable of the Database object.
1896 Leave at false to use the single-server variables above. If you set this
1897 variable, the single-server variables will generally be ignored (except
1898 perhaps in some command-line scripts).
1899 The first server listed in this array (with key 0) will be the primary. The
1900 rest of the servers will be replica DBs. To prevent writes to your replica DBs due to
1901 accidental misconfiguration or MediaWiki bugs, set read_only=1 on all your
1902 replica DBs in my.cnf. You can set read_only mode at runtime using:
1906 Since the effect of writing to a replica DB is so damaging and difficult to clean
1907 up, we at Wikimedia set read_only=1 in my.cnf on all our DB servers, even
1908 our primaries, and then set read_only=0 on primaries at runtime.
1911 class: Wikimedia\Rdbms\LBFactorySimple
1913 mergeStrategy: replace
1915 Configuration for the ILBFactory service
1916 The "class" setting must point to a LBFactory subclass, which is also responsible
1917 for reading $wgDBservers, $wgDBserver, etc.
1918 To set up a wiki farm with multiple database clusters, set the "class" to
1919 LBFactoryMulti. See {@link Wikimedia::Rdbms::LBFactoryMulti LBFactoryMulti} docs for
1920 information on how to configure the rest of the $wgLBFactoryConf array.
1921 DataCenterUpdateStickTTL:
1924 After a state-changing request is done by a client, this determines
1925 how many seconds that client should keep using the primary datacenter.
1926 This avoids unexpected stale or 404 responses due to replication lag.
1927 This must be greater than or equal to
1928 Wikimedia\Rdbms\ChronologyProtector::POSITION_COOKIE_TTL.
1932 description: 'File to log database errors to'
1936 use: [Localtimezone]
1937 callback: [MediaWiki\MainConfigSchema, getDefaultDBerrorLogTZ]
1939 Timezone to use in the error log.
1940 Defaults to the wiki timezone ($wgLocaltimezone).
1941 A list of usable timezones can found at:
1942 https://www.php.net/manual/en/timezones.php
1945 $wgDBerrorLogTZ = 'UTC';
1946 $wgDBerrorLogTZ = 'GMT';
1947 $wgDBerrorLogTZ = 'PST8PDT';
1948 $wgDBerrorLogTZ = 'Europe/Sweden';
1949 $wgDBerrorLogTZ = 'CET';
1958 Other wikis on this site, can be administered from a single developer account.
1959 List of wiki DB domain IDs; the format of each ID consist of 1-3 hyphen
1960 delimited alphanumeric components (each with no hyphens nor spaces) of any of the forms:
1961 - "<DB NAME>-<DB SCHEMA>-<TABLE PREFIX>"
1962 - "<DB NAME>-<TABLE PREFIX>"
1964 If hyphens appear in any of the components, then the domain ID parsing may not work
1965 in all cases and site functionality might be affected. If the schema ($wgDBmwschema)
1966 is left to the default "mediawiki" for all wikis, then the schema should be omitted
1968 DatabaseReplicaLagWarning:
1971 If lag is higher than $wgDatabaseReplicaLagWarning, show a warning in some special
1972 pages (like watchlist). If the lag is higher than $wgDatabaseReplicaLagCritical,
1973 show a more obvious warning.
1975 DatabaseReplicaLagCritical:
1978 @see self::DatabaseReplicaLagWarning
1980 MaxExecutionTimeForExpensiveQueries:
1983 Max execution time for queries of several expensive special pages such as RecentChanges
1986 VirtualDomainsMapping:
1990 Mapping of virtual domain to external cluster db.
1991 If no entry is set, the code assumes local database.
1992 For example, for routing queries of virtual domain 'vdomain'
1993 to 'wikishared' database in 'extension1' cluster. The config should be like this:
1994 [ 'vdomain' => [ 'cluster' => 'extension1', 'db' => 'wikishared' ] ]
1995 If the database needs to be the local domain, just set the 'db' to false.
1996 If you want to get another db in the main cluster, just omit 'cluster'. For example:
1997 [ 'centralauth' => [ 'db' => 'centralauth' ] ]
1999 TemplateLinksSchemaMigrationStage:
2003 Templatelinks table schema migration stage, for normalizing tl_namespace and tl_title fields.
2004 Use the SCHEMA_COMPAT_XXX flags. Supported values:
2005 - SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
2006 - SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW
2010 - 1.39: Default has changed to SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
2011 and support for SCHEMA_COMPAT_OLD is dropped.
2012 PageLinksSchemaMigrationStage:
2016 Pagelinks table schema migration stage, for normalizing pl_namespace and pl_title fields.
2017 Use the SCHEMA_COMPAT_XXX flags. Supported values:
2018 - SCHEMA_COMPAT_WRITE_OLD | SCHEMA_COMPAT_READ_OLD
2019 - SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
2022 ExternalLinksDomainGaps:
2026 Gaps in the externallinks table for certain domains.
2027 If you have identified certain domains for which externallinks searches are slow,
2028 you can use this setting to make MediaWiki skip large el_id ranges,
2029 rather than having the database scan through them fruitlessly.
2030 Each key in the array is a domain name in el_to_domain_index form,
2031 e.g. 'https://com.example.'.
2032 The value is an array with integer keys and values,
2033 where each entry is a range (from => to, both inclusive)
2034 of el_id values where this domain is known to have no entries.
2035 (Subdomains are included, i.e., configuring an entry here guarantees to MediaWiki
2036 that there are no rows where the el_to_domain_index starts with this value.)
2041 wikitext: { class: WikitextContentHandler, services: [TitleFactory, ParserFactory, GlobalIdGenerator, LanguageNameUtils, LinkRenderer, MagicWordFactory, ParsoidParserFactory] }
2042 javascript: JavaScriptContentHandler
2043 json: JsonContentHandler
2044 css: CssContentHandler
2045 text: TextContentHandler
2046 unknown: FallbackContentHandler
2049 Plugins for page content model handling.
2050 Each entry in the array maps a model id to an ObjectFactory specification
2051 that creates an instance of the appropriate ContentHandler subclass.
2053 NamespaceContentModels:
2057 Associative array mapping namespace IDs to the name of the content model pages in that
2058 namespace should have by default (use the CONTENT_MODEL_XXX constants). If no special
2059 content type is defined for a given namespace, pages in that namespace will use the
2060 CONTENT_MODEL_WIKITEXT
2061 (except for the special case of JS and CS pages).
2062 @note To determine the default model for a new page's main slot, or any slot in general,
2063 use SlotRoleHandler::getDefaultModel() together with SlotRoleRegistry::getRoleHandler().
2065 ContentHandlerTextFallback:
2067 deprecated: 'since 1.37'
2069 How to react if a plain text version of a non-text Content object is requested using
2070 ContentHandler::getContentText():
2071 * 'ignore': return null
2072 * 'fail': throw an MWException
2073 * 'serialize': serialize to default format
2075 @deprecated since 1.37
2083 Determines which types of text are parsed as wikitext. This does not imply that these kinds
2084 of texts are also rendered as wikitext, it only means that links, magic words, etc will have
2085 the effect on the database they would have on a wikitext page.
2086 Note that table of contents information will be *suppressed* for all
2087 text models in this list other than wikitext.
2088 @todo Make the ToC suppression configurable by the content model
2089 (T313455), not a side effect of inclusion here.
2090 @todo On the long run, it would be nice to put categories etc into a separate structure,
2091 or at least parse only the contents of comments in the scripts.
2096 We can also compress text stored in the 'text' table. If this is set on, new
2097 revisions will be compressed on page save if zlib support is available. Any
2098 compressed revisions will be decompressed on load regardless of this setting,
2099 but will not be readable at all if zlib support is not available.
2104 List of enabled ExternalStore protocols.
2105 @see \ExternalStoreAccess
2107 $wgExternalStores = [ "DB" ];
2113 Shortcut for setting `$wgLBFactoryConf["externalClusters"]`.
2114 This is only applicable when using the default LBFactory
2115 of {@link Wikimedia::Rdbms::LBFactorySimple LBFactorySimple}.
2116 It is ignored if a different LBFactory is set, or if `externalClusters`
2117 is already set explicitly.
2118 @see \ExternalStoreAccess
2120 Create a cluster named 'blobs_cluster1':
2122 $wgExternalServers = [
2123 'blobs_cluster1' => <array in the same format as $wgDBservers>
2126 DefaultExternalStore:
2132 The place to put new text blobs or false to put them in the text table
2133 of the local wiki database.
2134 @see \ExternalStoreAccess
2137 $wgDefaultExternalStore = [ 'DB://cluster1', 'DB://cluster2' ];
2139 RevisionCacheExpiry:
2143 Revision text may be cached in the main WAN cache to reduce load on external
2144 storage servers and object extraction overhead for frequently-loaded revisions.
2145 Set to 0 to disable, or number of seconds before cache expiry.
2150 Enable page language feature
2151 Allows setting page language in database
2159 Specify the difference engine to use.
2161 - 'external': Use an external diff engine, which must be specified via $wgExternalDiffEngine
2162 - 'wikidiff2': Use the wikidiff2 PHP extension
2163 - 'php': PHP implementations included in MediaWiki
2164 The default (null) is to use the first engine that's available.
2171 description: 'Name of the external diff engine to use.'
2176 Options for wikidiff2:
2177 - useMultiFormat: (bool) Whether to use wikidiff2_multi_format_diff()
2178 if it is available. This temporarily defaults to false, during
2179 migration to the new code. It is available in wikidiff2 1.14.0+.
2180 The following options are only effective if wikidiff2_multi_format_diff()
2181 is enabled. See README.md in wikidiff2 for details:
2184 - movedLineThreshold
2186 - maxWordLevelDiffComplexity
2188 - initialSplitThreshold
2189 - finalSplitThreshold
2191 - formatOptions: An array of format-specific overrides. The key may
2192 be "inline" or "table" and the value is an array with keys
2193 numContextLines, changeThreshold, etc.
2201 Set a limit on server request wall clock time.
2202 If the Excimer extension is enabled, setting this will cause an exception
2203 to be thrown after the specified number of seconds. If the extension is
2204 not available, set_time_limit() will be called instead.
2206 TransactionalTimeLimit:
2209 The request time limit for "slow" write requests that should not be
2210 interrupted due to the risk of data corruption.
2211 The limit will only be raised. If the pre-existing time limit is larger,
2212 then this will have no effect.
2214 CriticalSectionTimeLimit:
2218 The maximum time critical sections are allowed to stay open. Critical
2219 sections are used to defer Excimer request timeouts. If Excimer is available
2220 and this time limit is exceeded, an exception will be thrown at the next
2221 opportunity, typically after a long-running function like a DB query returns.
2222 Critical sections may wrap long-running queries, and it's generally better
2223 for the timeout to be handled a few milliseconds later when the critical
2224 section exits, so this should be a large number.
2225 This limit is ignored in command-line mode.
2229 description: 'Disable database-intensive features'
2232 description: 'Disable all query pages if miser mode is on, not just some'
2235 description: 'Number of rows to cache in ''querycache'' table when miser mode is on'
2236 WantedPagesThreshold:
2238 description: 'Number of links to a page required before it is deemed "wanted"'
2239 AllowSlowParserFunctions:
2241 description: 'Enable slow parser functions'
2244 description: 'Allow schema updates'
2247 description: 'Maximum article size in kibibytes'
2251 The minimum amount of memory that MediaWiki "needs"; MediaWiki will try to
2252 raise PHP's memory limit if it's below this amount.
2259 Configuration for processing pool control, for use in high-traffic wikis.
2260 An implementation is provided in the PoolCounter extension.
2261 This configuration array maps pool types to an associative array. The only
2262 defined key in the associative array is "class", which gives the class name.
2263 The remaining elements are passed through to the class as constructor
2265 **Example using local redis instance:**
2267 $wgPoolCounterConf = [ 'ArticleView' => [
2268 'class' => PoolCounterRedis::class,
2269 'timeout' => 15, // wait timeout in seconds
2270 'workers' => 1, // maximum number of active threads in each pool
2271 'maxqueue' => 5, // maximum number of total threads in each pool
2272 'servers' => [ '127.0.0.1' ],
2276 **Example using C daemon from <https://gerrit.wikimedia.org/g/mediawiki/services/poolcounter>**
2278 $wgPoolCountClientConf = [
2279 'servers' => [ '127.0.0.1' ],
2281 'connect_timeout' => 0.01,
2283 $wgPoolCounterConf = [ 'ArticleView' => [
2284 'class' => 'PoolCounter_Client',
2285 'timeout' => 15, // wait timeout in seconds
2286 'workers' => 5, // maximum number of active threads in each pool
2287 'maxqueue' => 50, // maximum number of total threads in each pool
2288 ... any extension-specific options...
2292 PoolCountClientConf:
2294 servers: [127.0.0.1]
2298 Configuration array for the PoolCounter client.
2299 - servers: Array of hostnames, or hostname:port. The default port is 7531.
2300 - timeout: Connection timeout.
2301 - connect_timeout: [Since 1.28] Alternative connection timeout. If set, it is used
2302 instead of `timeout` and will be retried once if a connection fails
2303 to be established. Background: https://phabricator.wikimedia.org/T105378.
2304 @see \MediaWiki\PoolCounter\PoolCounterClient
2306 MaxUserDBWriteDuration:
2312 Max time (in seconds) a user-generated transaction can spend in writes.
2313 If exceeded, the transaction is rolled back with an error instead of being committed.
2315 MaxJobDBWriteDuration:
2321 Max time (in seconds) a job-generated transaction can spend in writes.
2322 If exceeded, the transaction is rolled back with an error instead of being committed.
2324 LinkHolderBatchSize:
2327 LinkHolderArray batch size
2331 description: 'Maximum number of pages to move at once when moving subpages with a page.'
2332 ForceDeferredUpdatesPreSend:
2335 Force deferred updates to be run before sending a response to the client,
2336 instead of attempting to run them after sending the response. Setting this
2337 to true is useful for end-to-end testing, to ensure that the effects of a
2338 request are visible to any subsequent requests, even if they are made
2339 immediately after the first one. Note however that this does not ensure
2340 that database replication is complete, nor does it execute any jobs
2342 There should be no reason to set this in a normal production environment.
2344 MultiShardSiteStats:
2348 Whether site_stats table should have multiple rows. If set to true, in each update,
2349 one of ten rows gets updated at random to reduce lock wait time in wikis
2350 that have lots of concurrent edits.
2351 It should be set to true in really large wikis with big flow of edits,
2352 Otherwise it can cause inaccuracy in data.
2357 Directory for caching data in the local filesystem. Should not be accessible
2359 Note: if multiple wikis share the same localisation cache directory, they
2360 must all have the same set of extensions. You can set a directory just for
2361 the localisation cache using $wgLocalisationCacheConf['storeDirectory'].
2365 Main cache type. This should be a cache with fast access, but it may have
2366 limited space. By default, it is disabled, since the stock database cache
2367 is not fast enough to make it worthwhile.
2369 - CACHE_ANYTHING: Use anything, as long as it works
2370 - CACHE_NONE: Do not cache
2371 - CACHE_DB: Store cache objects in the DB
2372 - CACHE_MEMCACHED: MemCached, must specify servers in $wgMemCachedServers
2373 - CACHE_ACCEL: APC, APCU or WinCache
2374 - (other): A string may be used which identifies a cache
2375 configuration in $wgObjectCaches.
2376 For a multi-datacenter setup, the underlying service should be configured
2377 to broadcast operations by WANObjectCache using Mcrouter or Dynomite.
2378 See @ref wanobjectcache-deployment "Deploying WANObjectCache".
2379 To configure the `broadcastRoutingPrefix` WANObjectCache parameter,
2380 use $wgWANObjectCache.
2381 @see self::MessageCacheType
2382 @see self::ParserCacheType
2386 The cache type for storing the contents of the MediaWiki namespace. This
2387 cache is used for a small amount of data which is expensive to regenerate.
2388 For available types see $wgMainCacheType.
2392 The cache type for storing page content HTML (e.g. parsed from wikitext).
2393 Parsing wikitext is considered an expensive operation. It is recommended
2394 to give your parser cache plenty of storage space, such that long tail cache
2396 The default parser cache backend (when MainCacheType is left to CACHE_NONE)
2397 is effectively CACHE_DB (SqlBagOStuff). If you set up a main cache type
2398 such as memcached, it is recommended to set this explicitly to CACHE_DB.
2399 Advice for large wiki farms:
2400 - Consider allocating a dedicated database to ParserCache.
2401 Register it in $wgObjectCaches and point $wgParserCacheType to it.
2402 - Consider using MultiWriteBagOStuff to add a higher tier with Memcached
2403 in front of the lower database tier.
2404 - Consider setting `'purgePeriod' => 0` in the dedicated SqlBagOStuff
2405 entry in $wgObjectCaches. This disables the automatic purging of
2406 expired rows (which would normally happen in the background of
2407 write requests). You can then schedule the purgeParserCache.php script
2408 to e.g. once a day prune expired rows from the a dedicated maintenance
2410 For available types see $wgMainCacheType.
2414 The cache backend for storing session data.
2415 Used by MediaWiki\Session\SessionManager. See $wgMainCacheType for available types.
2416 See [SessionManager Storage expectations](@ref SessionManager-storage-expectations).
2417 LanguageConverterCacheType:
2420 The cache type for storing language conversion tables,
2421 which are used when parsing certain text and interface messages.
2422 For available types see $wgMainCacheType.
2426 0: { class: EmptyBagOStuff, reportDupes: false }
2427 1: { class: SqlBagOStuff, loggroup: SQLBagOStuff }
2428 -1: { factory: 'ObjectCache::newAnything' }
2429 3: { factory: 'ObjectCache::getLocalServerInstance' }
2430 memcached-php: { class: MemcachedPhpBagOStuff, loggroup: memcached }
2431 memcached-pecl: { class: MemcachedPeclBagOStuff, loggroup: memcached }
2432 hash: { class: HashBagOStuff, reportDupes: false }
2433 apc: { class: APCUBagOStuff, reportDupes: false }
2434 apcu: { class: APCUBagOStuff, reportDupes: false }
2435 wincache: { class: WinCacheBagOStuff, reportDupes: false }
2438 Advanced object cache configuration.
2439 Use this to define the class names and constructor parameters which are used
2440 for the various cache types. Custom cache types may be defined here and
2441 referenced from $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType,
2442 or $wgLanguageConverterCacheType.
2443 The format is an associative array where the key is a cache identifier, and
2444 the value is an associative array of parameters. One of the following
2445 parameters specifying the class must be given:
2446 - class: The class name which will be used.
2447 - factory: A callable function which will generate a suitable cache object.
2448 The following parameters are shared and understood by most classes:
2449 - loggroup: The log channel to use.
2450 For SqlBagOStuff, the main configured database will be used, unless one of the following
2451 three parameters is given:
2452 - server: Server config map for Database::factory() that describes the database to
2453 use for all key operations in the current region. This is overridden by "servers".
2454 - servers: Map of tag strings to server config maps, each for Database::factory(),
2455 describing the set of database servers on which to distribute key operations in the
2456 current region. Data is distributed among the servers via key hashing based on the
2457 server tags. Therefore, each tag represents a shard of the dataset. Tags are useful
2458 for failover using cold-standby servers and for managing shards with replica servers
2459 in multiple regions (each having different hostnames).
2460 - cluster: The ExternalStore cluster name to use.
2461 SqlBagOStuff also accepts the following optional parameters:
2462 - dbDomain: The database name to pass to the LoadBalancer.
2463 - multiPrimaryMode: Whether the portion of the dataset belonging to each tag/shard is
2464 replicated among one or more regions, with one "co-primary" server in each region.
2465 Queries are issued in a manner that provides Last-Write-Wins eventual consistency.
2466 This option requires the "server" or "servers" options. Only MySQL, with statement
2467 based replication (log_bin='ON' and binlog_format='STATEMENT') is supported. Also,
2468 the `modtoken` column must exist on the `objectcache` table(s).
2469 - purgePeriod: The average number of object cache writes in between garbage collection
2470 operations, where expired entries are removed from the database. Or in other words,
2471 the probability of performing a purge is one in every this number. If set to zero,
2472 purging will never be done at runtime (for use with PurgeParserCache).
2473 - purgeLimit: Maximum number of rows to purge at once.
2474 - tableName: The table name to use, default is "objectcache".
2475 - shards: The number of tables to use for data storage on each server. If greater than
2476 1, table names are formed in the style objectcacheNNN where NNN is the shard index,
2477 between 0 and shards-1. The number of digits used in the suffix is the minimum number
2478 required to hold the largest shard index. Data is distributed among the tables via
2479 key hashing. This helps mitigate MySQL bugs 61735 and 61736.
2480 - replicaOnly: Whether to only use replica servers and only support read operations.
2481 This option requires the use of LoadBalancer and should only be used by
2482 ReplicatedBagOStuff.
2483 - writeBatchSize: Default maximum number of rows to change in each query for write
2484 operations that can be chunked into a set of smaller writes.
2485 For MemcachedPhpBagOStuff parameters see {@link MemcachedPhpBagOStuff::__construct}
2486 For MemcachedPeclBagOStuff parameters see {@link MemcachedPeclBagOStuff::__construct}
2487 For RedisBagOStuff parameters see {@link RedisBagOStuff::__construct}
2492 Extra parameters to the WANObjectCache constructor.
2493 See @ref wanobjectcache-deployment "Deploying WANObjectCache".
2501 The stash store backend for MicroStash.
2502 This store should be optimized for ephemeral data, and should be able to handle
2503 a high volume of writes and reads. The dataset access scope should be across
2504 all servers that serve the application.
2505 Note that the TTL of the data written to the store must be respected completely
2506 before the data gets evicted from the store (whether the data is used or not).
2507 Thus, the store should not evict data before the TTL expires.
2508 Properties of the backend should be:
2509 1.) the data written to the store should be short-lived,
2510 2.) it should be evicted ONLY after the TTL elapses (reliably persist),
2511 3.) should be accessed by all servers that serve the application,
2512 4.) should be able to handle a high volume of writes and reads.
2518 The object store type of the main stash.
2519 This should be a fast storage system optimized for lightweight data, both ephemeral and
2520 permanent, for things like counters, tokens, and blobs. The dataset access scope should
2521 include all the application servers in all datacenters. Thus, the data must be replicated
2522 among all datacenters. The store should have "Last Write Wins" eventual consistency. Per
2523 https://en.wikipedia.org/wiki/PACELC_theorem, the store should act as a PA/EL distributed
2524 system for these operations.
2525 The multi-datacenter strategy for MediaWiki is to have CDN route HTTP POST requests to the
2526 primary datacenter and HTTP GET/HEAD/OPTIONS requests to the closest datacenter to the
2527 client. The stash accepts write operations from any datacenter, but cross-datacenter
2528 replication is asynchronous.
2529 Modules that use the main stash can expect race conditions to occur if a key can receive
2530 write operations originating from multiple datacenters. To improve consistency, callers
2531 should avoid main stash updates during non-POST requests. In any case, callers should
2532 gracefully tolerate occasional key evictions, temporary inconsistencies among datacenters,
2533 and violations of linearizability (e.g. during timeouts). Modules that can never handle
2535 kind of anamolies should use other storage mediums.
2536 Valid options are the keys of {@link $wgObjectCaches}, e.g. CACHE_* constants.
2542 StashType: { type: [integer, string, 'null'], default: null }
2543 StashDuration: { type: integer, default: 86400 }
2544 WarmParsoidParserCache: { type: boolean, default: false }
2546 Configuration for the caching related to parsoid output. The configuration contains the
2548 - StashType: The type of object store to be used by the ParsoidOutputStash service,
2549 which stores the base state of HTML based edits.
2550 Valid options are the keys of {@link $wgObjectCaches}, e.g. CACHE_* constants.
2551 Per default, the value of the MainStash setting will be used.
2552 This should be an object store that provides fairly solid persistence guarantees,
2553 since losing an entry from the stash may mean that the user can't save their edit.
2554 If null, the value of the MainStash configuration setting will be used.
2555 - StashDuration: The number of seconds for which an entry in the stash should be kept.
2556 Should be long enough for users to finish editing,
2557 since losing an entry from the stash may mean that the user can't save their edit.
2558 This is set to one day per default.
2559 - WarmParsoidParserCache: Setting this to true will pre-populate the parsoid parser cache
2560 with parsoid outputs on page edits. This speeds up loading HTML into Visual Editor.
2562 @unstable Per MediaWiki 1.39, the structure of this configuration is still subject to
2565 ParserCacheFilterConfig:
2568 pcache: { default: { minCpuTime: 0 } }
2569 parsoid-pcache: { default: { minCpuTime: 0 } }
2570 additionalProperties:
2572 description: 'A map of namespace IDs to filter definitions.'
2573 additionalProperties: { type: object, description: 'A map of filter names to values.', properties: { minCpuTime: { type: number } } }
2575 Per-namespace configuration for the ParserCache filter.
2576 There is one top level key for each cache name supported in ParserCacheFactory.
2577 The per-namespace configuration is given separately for each cache.
2578 For each namespace, this defines a set of filter options, which are represented
2579 as an associative array. The following keys are supported in this array:
2580 - minCpuTime: causes the parser cache to not save any output that took fewer
2581 than the given number of seconds of CPU time to generate, according to
2582 ParserOutput::getTimeProfile(). Set to 0 to always cache, or to
2583 PHP_INT_MAX to disable caching for this namespace.
2584 If no filter options are defined for a given namespace, the filter options
2585 under the "default" key will be used for pages in that namespace.
2587 ChronologyProtectorStash:
2593 The object store type for the
2594 {@link Wikimedia::Rdbms::ChronologyProtector ChronologyProtector} store.
2595 This should be a fast storage system optimized for lightweight ephemeral data.
2596 Data stored should be readable by all application servers in the local datacenter.
2597 See [ChronologyProtector requirements](@ref ChronologyProtector-storage-requirements)
2598 for more detailed system administrator requirements (especially for multi-dc operations).
2599 Valid options are the keys of {@link $wgObjectCaches}, e.g. CACHE_* constants.
2600 Defaults to {@link $wgMainCacheType} (in ServiceWiring.php).
2602 ChronologyProtectorSecret:
2606 Secret string for HMAC hashing in ChronologyProtector [optional]
2608 ParserCacheExpireTime:
2611 The expiry time for the parser cache, in seconds.
2612 The default is 86400 (one day).
2613 OldRevisionParserCacheExpireTime:
2616 The expiry time for the parser cache for old revisions, in seconds.
2617 The default is 3600 (cache disabled).
2618 ObjectCacheSessionExpiry:
2620 description: 'The expiry time to use for session storage, in seconds.'
2625 Whether to use PHP session handling ($_SESSION and session_*() functions)
2626 If the constant MW_NO_SESSION is defined, this is forced to 'disable'.
2627 If the constant MW_NO_SESSION_HANDLER is defined, this is ignored and PHP
2628 session handling will function independently of SessionHandler.
2629 SessionHandler and PHP's session handling may attempt to override each
2638 Time in seconds to remember IPs for, for the purposes of logging IP changes within the
2639 same session. This is meant more for debugging errors in the authentication system than
2640 for detecting abuse.
2642 SessionPbkdf2Iterations:
2645 Number of internal PBKDF2 iterations to use when deriving session secrets.
2651 description: 'The list of MemCached servers and port numbers'
2652 MemCachedPersistent:
2655 Use persistent connections to MemCached, which are shared across multiple
2659 description: 'Read/write timeout for MemCached server communication, in microseconds.'
2660 UseLocalMessageCache:
2663 Set this to true to maintain a copy of the message cache on the local server.
2664 This layer of message cache is in addition to the one configured by $wgMessageCacheType.
2665 The local copy is put in APC. If APC is not installed, this setting does nothing.
2666 Note that this is about the message cache, which stores interface messages
2667 maintained as wiki pages. This is separate from the localisation cache for interface
2668 messages provided by the software, which is configured by $wgLocalisationCacheConf.
2669 AdaptiveMessageCache:
2672 Instead of caching everything, only cache those messages which have
2673 been customised in the site content language. This means that
2674 MediaWiki:Foo/ja is ignored if MediaWiki:Foo doesn't exist.
2675 This option is probably only useful for translatewiki.net.
2676 LocalisationCacheConf:
2678 class: { type: string, default: LocalisationCache }
2679 store: { type: string, default: detect }
2680 storeClass: { type: [boolean, string], default: false }
2681 storeDirectory: { type: [boolean, string], default: false }
2682 storeServer: { type: object, default: [] }
2683 forceRecache: { type: boolean, default: false }
2684 manualRecache: { type: boolean, default: false }
2687 Localisation cache configuration.
2688 Used by service wiring to decide how to construct the
2689 LocalisationCache instance. Associative array with keys:
2690 class: The class to use for constructing the LocalisationCache object.
2691 This may be overridden by extensions to a subclass of LocalisationCache.
2692 Sub classes are expected to still honor the 'storeClass', 'storeDirectory'
2693 and 'manualRecache' options where applicable.
2694 storeClass: Which LCStore class implementation to use. This is optional.
2695 The default LocalisationCache class offers the 'store' option
2696 as abstraction for this.
2697 store: How and where to store localisation cache data.
2698 This option is ignored if 'storeClass' is explicitly set to a class name.
2700 - 'detect' (default): Automatically select 'files' if 'storeDirectory'
2701 or $wgCacheDirectory is set, and fall back to 'db' otherwise.
2702 - 'files': Store in $wgCacheDirectory as CDB files.
2703 - 'array': Store in $wgCacheDirectory as PHP static array files.
2704 - 'db': Store in the l10n_cache database table.
2705 storeDirectory: If the selected LCStore class puts its data in files, then it
2706 will use this directory. If set to false (default), then
2707 $wgCacheDirectory is used instead.
2708 manualRecache: Set this to true to disable cache updates on web requests.
2709 Use maintenance/rebuildLocalisationCache.php instead.
2713 description: 'Allow client-side caching of pages'
2715 default: '20030516000000'
2717 Set this to current time to invalidate all prior cached pages. Affects both
2718 client-side and server-side caching.
2719 You can get the current date on your server by using the command:
2720 @verbatim date +%Y%m%d%H%M%S
2722 GitInfoCacheDirectory:
2725 Directory where GitInfo will look for pre-computed cache files. If false,
2726 $wgCacheDirectory/gitinfo will be used.
2730 This will cache static pages for non-logged-in users to reduce
2731 database traffic on public sites. ResourceLoader requests to default
2732 language and skins are cached as well as single module requests.
2736 Depth of the subdirectory hierarchy to be created under
2737 $wgFileCacheDirectory. The subdirectories will be named based on
2738 the MD5 hash of the title. A value of 0 means all cache files will
2739 be put directly into the main file cache directory.
2743 Append a configured value to the parser cache and the sitenotice key so
2744 that they can be kept separate for some class of activity.
2748 If on, the sidebar navigation links are cached for users with the
2749 current language set. This can save a touch of load on a busy site
2750 by shaving off extra message lookups.
2751 However it is also fragile: changing the site configuration, or
2752 having a variable $wgArticlePath, can produce broken links that
2753 don't update as expected.
2756 description: 'Expiry time for the sidebar cache, in seconds'
2760 When using the file cache, we can store the cached HTML gzipped to save disk
2761 space. Pages will then also be served compressed to clients that support it.
2762 Requires zlib support enabled in PHP.
2763 InvalidateCacheOnLocalSettingsChange:
2766 Invalidate various caches when LocalSettings.php changes. This is equivalent
2767 to setting $wgCacheEpoch to the modification time of LocalSettings.php, as
2768 was previously done in the default LocalSettings.php file.
2769 On high-traffic wikis, this should be set to false, to avoid the need to
2770 check the file modification time, and to avoid the performance impact of
2771 unnecessary cache invalidations.
2778 When loading extensions through the extension registration system, this
2779 can be used to invalidate the cache. A good idea would be to set this to
2780 one file, you can just `touch` that one to invalidate the cache
2783 $wgExtensionInfoMTime = filemtime( "$IP/LocalSettings.php" );
2785 If set to false, the mtime for each individual JSON file will be checked,
2786 which can be slow if a large number of extensions are being loaded.
2787 EnableRemoteBagOStuffTests:
2790 If this is set to true, phpunit will run integration tests against remote
2791 caches defined in $wgObjectCaches.
2797 See https://www.mediawiki.org/wiki/Manual:Performance_tuning#Page_view_caching
2798 @since 1.34 Renamed from $wgUseSquid.
2802 Add X-Forwarded-Proto to the Vary and Key headers for API requests and
2803 RSS/Atom feeds. Use this if you have an SSL termination setup
2804 and need to split the cache between HTTP and HTTPS for API requests,
2805 feed requests and HTTP redirect responses in order to prevent cache
2806 pollution. This does not affect 'normal' requests to index.php other than
2811 Internal server name as known to CDN, if different.
2814 $wgInternalServer = 'http://yourinternal.tld:8000';
2819 Cache TTL for the CDN sent as s-maxage (without ESI) or
2820 Surrogate-Control (with ESI). Without ESI, you should strip
2821 out s-maxage in the CDN config.
2822 18000 seconds = 5 hours, more cache hits with 2678400 = 31 days.
2823 @since 1.34 Renamed from $wgSquidMaxage
2827 Cache timeout for the CDN when DB replica DB lag is high
2828 @see self::CdnMaxAge
2833 Cache timeout when delivering a stale ParserCache response due to PoolCounter
2836 CdnReboundPurgeDelay:
2839 If set, any SquidPurge call on a URL or URLs will send a second purge no less than
2840 this many seconds later via the job queue. This requires delayed job support.
2841 This should be safely higher than the 'max lag' value in $wgLBFactoryConf, so that
2842 replica DB lag does not cause page to be stuck in stales states in CDN.
2843 This also fixes race conditions in two-tiered CDN setups (e.g. cdn2 => cdn1 => MediaWiki).
2844 If a purge for a URL reaches cdn2 before cdn1 and a request reaches cdn2 for that URL,
2845 it will populate the response from the stale cdn1 value. When cdn1 gets the purge, cdn2
2846 will still be stale. If the rebound purge delay is safely higher than the time to relay
2847 a purge to all nodes, then the rebound purge will clear cdn2 after cdn1 was cleared.
2849 CdnMaxageSubstitute:
2852 Cache timeout for the CDN when a response is known to be wrong or incomplete (due to load)
2853 @see self::CdnMaxAge
2858 Default maximum age for raw CSS/JS accesses
2859 300 seconds = 5 minutes.
2864 List of proxy servers to purge on changes; default port is 80. Use IP addresses.
2865 When MediaWiki is running behind a proxy, it will trust X-Forwarded-For
2866 headers sent/modified from these proxies when obtaining the remote IP address
2867 For a list of trusted servers which *aren't* purged, see $wgSquidServersNoPurge.
2868 @since 1.34 Renamed from $wgSquidServers.
2873 As with $wgCdnServers, except these servers aren't purged on page changes;
2874 use to set a list of trusted proxies, etc. Supports both individual IP
2875 addresses and CIDR blocks.
2876 @since 1.23 Supports CIDR ranges
2877 @since 1.34 Renamed from $wgSquidServersNoPurge
2878 SquidPurgeUseHostHeader:
2880 deprecated: 'since 1.33'
2882 Whether to use a Host header in purge requests sent to the proxy servers
2883 configured in $wgCdnServers. Set this to false to support a CDN
2884 configured in forward-proxy mode.
2885 If this is set to true, a Host header will be sent, and only the path
2886 component of the URL will appear on the request line, as if the request
2887 were a non-proxy HTTP 1.1 request. Varnish only supports this style of
2888 request. Squid supports this style of request only if reverse-proxy mode
2889 (http_port ... accel) is enabled.
2890 If this is set to false, no Host header will be sent, and the absolute URL
2891 will be sent in the request line, as is the standard for an HTTP proxy
2892 request in both HTTP 1.0 and 1.1. This style of request is not supported
2893 by Varnish, but is supported by Squid in either configuration (forward or
2896 @deprecated since 1.33, will always be true in a future release.
2901 Routing configuration for HTCP multicast purging. Add elements here to
2902 enable HTCP and determine which purges are sent where. If set to an empty
2903 array, HTCP is disabled.
2904 Each key in this array is a regular expression to match against the purged
2905 URL, or an empty string to match all URLs. The purged URL is matched against
2906 the regexes in the order specified, and the first rule whose regex matches
2907 is used, all remaining rules will thus be ignored.
2908 **Example configuration to send purges for upload.wikimedia.org to one**
2909 multicast group and all other purges to another:
2912 '|^https?://upload\.wikimedia\.org|' => [
2913 'host' => '239.128.0.113',
2917 'host' => '239.128.0.112',
2922 You can also pass an array of hosts to send purges too. This is useful when
2923 you have several multicast groups or unicast address that should receive a
2924 given purge. Multiple hosts support was introduced in MediaWiki 1.22.
2925 **Example of sending purges to multiple hosts:**
2929 // Purges to text caches using multicast
2930 [ 'host' => '239.128.0.114', 'port' => '4827' ],
2931 // Purges to a hardcoded list of caches
2932 [ 'host' => '10.88.66.1', 'port' => '4827' ],
2933 [ 'host' => '10.88.66.2', 'port' => '4827' ],
2934 [ 'host' => '10.88.66.3', 'port' => '4827' ],
2939 @see self::HTCPMulticastTTL
2944 @see self::HTCPRouting
2947 description: 'Should forwarded Private IPs be accepted?'
2948 CdnMatchParameterOrder:
2951 Set this to false if MediaWiki is behind a CDN that re-orders query
2952 parameters on incoming requests.
2953 MediaWiki sets a large 'Cache-Control: s-maxage=' directive on page
2954 views only if the request URL matches one of the normal CDN URL forms.
2955 When 'CdnMatchParameterOrder' is false, the matching algorithm ignores
2956 the order of URL parameters.
2961 Site language code. See includes/languages/data/Names.php for languages
2962 supported by MediaWiki out of the box. Not all languages listed there have
2963 translations, see languages/messages/ for the list of languages with some
2965 Warning: Don't use any of MediaWiki's deprecated language codes listed in
2966 LanguageCode::getDeprecatedCodeMapping or $wgDummyLanguageCodes, like "no"
2967 for Norwegian (use "nb" instead). If you do, things will break unexpectedly.
2968 This defines the default interface language for all users, but users can
2969 change it in their preferences.
2970 This also defines the language of pages in the wiki. The content is wrapped
2971 in a html element with lang=XX attribute. This behavior can be overridden
2972 via hooks, see Title::getPageLanguage.
2977 Some languages need different word forms, usually for different cases.
2978 Used in Language::convertGrammar().
2981 $wgGrammarForms['en']['genitive']['car'] = 'car\'s';
2985 description: 'Treat language links as magic connectors, not inline links'
2986 HideInterlanguageLinks:
2988 description: 'Hide interlanguage links from the sidebar'
2989 ExtraInterlanguageLinkPrefixes:
2993 List of additional interwiki prefixes that should be treated as
2994 interlanguage links (i.e. placed in the sidebar).
2996 - This will not do anything unless the prefixes are defined in the interwiki
2998 - The display text for these custom interlanguage links will be fetched from
2999 the system message "interlanguage-link-xyz" where xyz is the prefix in
3001 - A friendly name for each site, used for tooltip text, may optionally be
3002 placed in the system message "interlanguage-link-sitename-xyz" where xyz is
3003 the prefix in this array.
3004 - This should be a list of "interwiki prefixes" (ie, what appears in
3005 wikitext), and you probably want to add an entry to
3006 InterlanguageLinkCodeMap as well to specify which mediawiki internal
3007 (or custom) language code this prefix corresponds to, and perhaps
3008 then map that custom language code to a language name in
3010 InterlanguageLinkCodeMap:
3014 Map of interlanguage link codes to language codes. This is useful to override
3015 what is shown as the language name when the interwiki code does not match it
3021 description: 'List of language names or overrides for default names in Names.php'
3029 List of mappings from one language code to another.
3030 This array makes the codes not appear as a selectable language on the
3032 In Setup.php, the variable $wgDummyLanguageCodes is created by combining
3033 these codes with a list of "deprecated" codes, which are mostly leftovers
3034 from renames or other legacy things, and the internal codes 'qqq' and 'qqx'.
3035 If a mapping in $wgExtraLanguageCodes collide with a built-in mapping, the
3036 value in $wgExtraLanguageCodes will be used.
3042 Functionally the same as $wgExtraLanguageCodes, but deprecated. Instead of
3043 appending values to this array, append them to $wgExtraLanguageCodes.
3044 @note Since 1.29, this should not be set directly in LocalSettings,
3045 ExtraLanguageCodes should be set instead. However, DummyLanguageCodes
3046 will be initialized and can be read internally.
3050 Set this to always convert certain Unicode sequences to modern ones
3051 regardless of the content language. This has a small performance
3057 Set this to eg 'ISO-8859-1' to perform character set conversion when
3058 loading old revisions not marked with "utf-8" flag. Use this when
3059 converting a wiki from MediaWiki 1.4 or earlier to UTF-8 without the
3060 burdensome mass conversion of old text data.
3061 @note This DOES NOT touch any fields other than old_text. Titles, comments,
3062 user names, etc still must be converted en masse in the database before
3063 continuing as a UTF-8 wiki.
3067 Enable dates like 'May 12' instead of '12 May', if the default date format
3072 For Hindi and Arabic use local numerals instead of Western style (0-9)
3073 numerals in interface.
3074 UseDatabaseMessages:
3077 Translation using MediaWiki: namespace.
3078 Interface messages will be loaded from the database.
3079 MaxMsgCacheEntrySize:
3081 description: 'Maximum entry size in the message cache, in bytes'
3082 DisableLangConversion:
3084 description: 'Whether to enable language variant conversion.'
3085 DisableTitleConversion:
3088 Whether to enable language variant conversion for links.
3089 Note that this option is slightly misnamed.
3090 DefaultLanguageVariant:
3093 Default variant code. If false, the default will be the static default
3094 variant of the language.
3098 Whether to enable the pig Latin variant of English (en-x-piglatin),
3099 used to ease variant development work.
3104 Disabled variants array of language variant conversion.
3107 $wgDisabledVariants[] = 'zh-mo';
3108 $wgDisabledVariants[] = 'zh-my';
3113 Like $wgArticlePath, but on multi-variant wikis, this provides a
3114 path format that describes which parts of the URL contain the
3118 $wgLanguageCode = 'sr';
3119 $wgVariantArticlePath = '/$2/$1';
3120 $wgArticlePath = '/wiki/$1';
3122 A link to /wiki/ would be redirected to /sr/Главна_страна
3123 It is important that $wgArticlePath not overlap with possible values
3124 of $wgVariantArticlePath.
3128 Whether to enable the 'x-xss' language code, used for development.
3129 When enabled, the language code 'x-xss' (e.g. via ?uselang=x-xss) can
3130 be used to test correct message escaping at scale, to prevent
3131 cross-site scripting. In this "language", every message becomes an HTML
3132 snippet which attempts to alert the message key. Well-written code will
3133 correctly escape all of these messages. If any alerts are actually
3134 fired in the browser, the message is not being escaped correctly;
3135 either the offending code should be fixed, or the message should be
3136 added to {@link self::RawHtmlMessages}.
3137 @see https://www.mediawiki.org/wiki/Special:MyLanguage/Cross-site_scripting
3139 LoginLanguageSelector:
3142 Show a bar of language selection links in the user login and user
3143 registration forms; edit the "loginlanguagelinks" message to
3145 ForceUIMsgAsContentMsg:
3149 When translating messages with wfMessage(), it is not always clear what
3150 should be considered UI messages and what should be content messages.
3151 For example, for the English Wikipedia, there should be only one 'mainpage',
3152 so when getting the link for 'mainpage', we should treat it as site content
3153 and call ->inContentLanguage()->text(), but for rendering the text of the
3154 link, we call ->text(). The code behaves this way by default. However,
3155 sites like the Wikimedia Commons do offer different versions of 'mainpage'
3156 and the like for different languages. This array provides a way to override
3157 the default behavior.
3159 To allow language-specific main page and community
3162 $wgForceUIMsgAsContentMsg = [ 'mainpage', 'portal-url' ];
3173 List of messages which might contain raw HTML.
3174 Extensions should add their insecure raw HTML messages to extension.json.
3175 The list is used for access control:
3176 changing messages listed here will require editsitecss and editsitejs rights.
3177 Message names must be given with underscores rather than spaces and with lowercase first
3182 callback: [MediaWiki\MainConfigSchema, getDefaultLocaltimezone]
3184 Fake out the timezone that the server thinks it's in. This will be used for
3185 date display and not for what's stored in the DB. Leave to null to retain
3186 your server's OS-based timezone value.
3187 This variable is currently used only for signature formatting and for local
3188 time/date parser variables ({{LOCALTIME}} etc.)
3189 Timezones can be translated by editing MediaWiki messages of type
3190 timezone-nameinlowercase like timezone-utc.
3191 A list of usable timezones can found at:
3192 https://www.php.net/manual/en/timezones.php
3195 $wgLocaltimezone = 'UTC';
3196 $wgLocaltimezone = 'GMT';
3197 $wgLocaltimezone = 'PST8PDT';
3198 $wgLocaltimezone = 'Europe/Sweden';
3199 $wgLocaltimezone = 'CET';
3204 use: [Localtimezone]
3205 callback: [MediaWiki\MainConfigSchema, getDefaultLocalTZoffset]
3207 Set an offset from UTC in minutes to use for the default timezone setting
3208 for anonymous users and new user accounts.
3209 This setting is used for most date/time displays in the software, and is
3210 overridable in user preferences. It is *not* used for signature timestamps.
3211 By default, this will be set to match $wgLocaltimezone.
3213 OverrideUcfirstCharacters:
3217 Map of Unicode characters for which capitalization is overridden in
3218 Language::ucfirst. The characters should be
3219 represented as char_to_convert => conversion_override. See T219279 for details
3220 on why this is useful during php version transitions.
3224 description: 'The default Content-Type header.'
3228 Defines the value of the version attribute in the <html> tag, if any.
3229 If your wiki uses RDFa, set it to the correct value for RDFa+HTML5.
3230 Correct current values are 'HTML+RDFa 1.0' or 'XHTML+RDFa 1.0'.
3231 See also https://www.w3.org/TR/rdfa-in-html/#document-conformance
3233 HTMLFormAllowTableFormat:
3236 Temporary variable that allows HTMLForms to be rendered as tables.
3237 Table based layouts cause various issues when designing for mobile.
3238 This global allows skins or extensions a means to force non-table based rendering.
3239 Setting to false forces form components to always render as div elements.
3241 UseMediaWikiUIEverywhere:
3244 Temporary variable that applies MediaWiki UI wherever it can be supported.
3245 Temporary variable that should be removed when mediawiki ui is more
3246 stable and change has been communicated.
3248 EditSubmitButtonLabelPublish:
3251 Whether to label the store-to-database-and-show-to-others button in the editor
3252 as "Save page"/"Save changes" if false (the default) or, if true, instead as
3253 "Publish page"/"Publish changes".
3259 Permit other namespaces in addition to the w3.org default.
3260 Use the prefix for the key and the namespace for the value.
3263 $wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg';
3265 Normally we wouldn't have to define this in the root "<html>"
3266 element, but IE needs it there in some circumstances.
3267 This is ignored if $wgMimeType is set to a non-XML MIME type.
3271 Site notice shown at the top of each page
3272 MediaWiki:Sitenotice page, which will override this. You can also
3273 provide a separate message for logged-out users using the
3274 MediaWiki:Anonnotice page.
3275 BrowserFormatDetection:
3276 default: telephone=no
3279 Override ability of certains browsers to attempt to autodetect dataformats in pages.
3280 This is a default feature of many mobile browsers, but can have a lot of false positives,
3281 where for instance year ranges are confused with phone numbers.
3282 The default of this setting is to disable telephone number data detection.
3283 Set BrowserFormatDetection to false to fallback to browser defaults.
3285 @see https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html
3290 An array of open graph tags which should be added by all skins.
3291 Accepted values are "og:site_name", "og:title", "og:type" and "twitter:card".
3292 Since some of these fields can be provided by extensions it defaults to an empty array.
3295 default: vector-2022
3297 Default skin, for new users and anonymous visitors. Registered users may
3298 change this to any one of the other available skins in their preferences.
3302 Fallback skin used when the skin defined by $wgDefaultSkin can't be found.
3308 Specify the names of skins that should not be presented in the list of
3309 available skins in user preferences.
3310 NOTE: This does not uninstall the skin, and it will still be accessible
3311 via the `useskin` query parameter. To uninstall a skin, remove its inclusion
3312 from LocalSettings.php.
3313 @see \SkinFactory::getAllowedSkins
3314 DisableOutputCompression:
3316 description: 'Disable output compression (enabled by default if zlib is available)'
3323 How should section IDs be encoded?
3324 This array can contain 1 or 2 elements, each of them can be one of:
3325 - 'html5' is modern HTML5 style encoding with minimal escaping. Displays Unicode
3326 characters in most browsers' address bars.
3327 - 'legacy' is old MediaWiki-style encoding, e.g. 啤酒 turns into .E5.95.A4.E9.85.92
3328 The first element of this array specifies the primary mode of escaping IDs. This
3329 is what users will see when they e.g. follow an [[#internal link]] to a section of
3331 The optional second element defines a fallback mode, useful for migrations.
3332 If present, it will direct MediaWiki to add empty <span>s to every section with its
3333 id attribute set to fallback encoded title so that links using the previous encoding
3335 Example: you want to migrate your wiki from 'legacy' to 'html5'
3336 On the first step, set this variable to [ 'legacy', 'html5' ]. After a while, when
3337 all caches (parser, HTTP, etc.) contain only pages generated with this setting,
3338 flip the value to [ 'html5', 'legacy' ]. This will result in all internal links being
3339 generated in the new encoding while old links (both external and cached internal) will
3340 still work. After a long time, you might want to ditch backwards compatibility and
3341 set it to [ 'html5' ]. After all, pages get edited, breaking incoming links no matter which
3342 fragment mode is used.
3344 ExternalInterwikiFragmentMode:
3347 Which ID escaping mode should be used for external interwiki links? See documentation
3348 for $wgFragmentMode above for details of each mode. Because you can't control external sites,
3349 this setting should probably always be 'legacy', unless every wiki you link to has converted
3354 copyright: { copyright: [] }
3355 poweredby: { mediawiki: { src: null, url: 'https://www.mediawiki.org/', alt: 'Powered by MediaWiki' } }
3358 Abstract list of footer icons for skins in place of old copyrightico and poweredbyico code
3359 You can add new icons to the built in copyright or poweredby, or you can create
3360 a new block. Though note that you may need to add some custom css to get good styling
3361 of new blocks in monobook. vector and modern should work without any special css.
3362 $wgFooterIcons itself is a key/value array.
3363 The key is the name of a block that the icons will be wrapped in. The final id varies
3364 by skin; Monobook and Vector will turn poweredby into f-poweredbyico while Modern
3365 turns it into mw_poweredby.
3366 The value is either key/value array of icons or a string.
3367 In the key/value array the key may or may not be used by the skin but it can
3368 be used to find the icon and unset it or change the icon if needed.
3369 This is useful for disabling icons that are set by extensions.
3370 The value should be either a string or an array. If it is a string it will be output
3371 directly as html, however some skins may choose to ignore it. An array is the preferred
3372 format for the icon, the following keys are used:
3373 - src: An absolute url to the image to use for the icon, this is recommended
3374 but not required, however some skins will ignore icons without an image
3375 - srcset: optional additional-resolution images; see HTML5 specs
3376 - url: The url to use in the a element around the text or icon, if not set an a element will
3378 - alt: This is the text form of the icon, it will be displayed without an image in
3379 skins like Modern or if src is not set, and will otherwise be used as
3380 the alt="" for the image. This key is required.
3381 - width and height: If the icon specified by src is not of the standard size
3382 you can specify the size of image to use with these keys.
3383 Otherwise they will default to the standard 88x31.
3384 @todo Reformat documentation.
3385 UseCombinedLoginLink:
3388 Login / create account link behavior when it's possible for anonymous users
3389 to create an account.
3390 - true = use a combined login / create account link
3391 - false = split login and create account into two separate links
3394 description: 'Display user edit counts in various prominent places.'
3398 Some web hosts attempt to rewrite all responses with a 404 (not found)
3399 status code, mangling or hiding MediaWiki's output. If you are using such a
3400 host, you should start looking for a better one. While you're doing that,
3401 set this to false to convert some of MediaWiki's 404 responses to 200 so
3402 that the generated error pages can be seen.
3403 In cases where for technical reasons it is more important for MediaWiki to
3404 send the correct status code than for the body to be transmitted intact,
3405 this configuration variable is ignored.
3406 ShowRollbackEditCount:
3409 The $wgShowRollbackEditCount variable is used to show how many edits can be rolled back.
3410 The numeric value of the variable controls how many edits MediaWiki will look back to
3411 determine whether a rollback is allowed (by checking that they are all from the same author).
3412 If the value is false or 0, the edits are not counted. Disabling this will prevent MediaWiki
3413 from hiding some useless rollback links.
3415 EnableCanonicalServerLink:
3418 Output a <link rel="canonical"> tag on every page indicating the canonical
3419 server which should be used, i.e. $wgServer or $wgCanonicalServer. Since
3420 detection of the current server is unreliable, the link is sent
3422 InterwikiLogoOverride:
3428 List of interwiki logos overrides.
3429 This is used by the sister project sidebar. This list accept a key equal to the
3430 interwiki ID (as defined in the interwiki links), and accept a Codex icon name
3431 (https://doc.wikimedia.org/codex/latest/icons/all-icons.html) or a base URL for
3432 the given interwiki.
3434 $wgInterwikiLogoOverride = [
3435 'c' => 'logoWikimediaCommons',
3436 'wikit' => 'https://mySpecialWiki.com'
3442 Define extra client-side modules to be registered with ResourceLoader.
3443 @note It is recommended to define modules using the `ResourceModule` attribute
3444 in `extension.json` or `skin.json` when possible (instead of via PHP global variables).
3445 Registration is internally handled by ResourceLoader::register.
3446 ## Available modules
3447 Modules that ship with %MediaWiki core are registered via
3448 resources/Resources.php. For a full list with documentation, see:
3449 [ResourceLoader/Core_modules](https://www.mediawiki.org/wiki/ResourceLoader/Core_modules).
3452 By default a module is assumed to bundle file resources
3453 as handled by the MediaWiki\ResourceLoader\FileModule class. Use this option
3454 to use a different implementation of MediaWiki\ResourceLoader\Module instead.
3455 Default: `\MediaWiki\ResourceLoader\FileModule`
3456 - factory `{string}`:
3457 Override the instantiation of the MediaWiki\ResourceLoader\Module
3458 class using a PHP callback. This allows dependency injection to be used.
3459 This option cannot be combined with the `class` option.
3461 - dependencies `{string[]|string}`:
3462 Modules that must be executed before this module.
3463 Module name string or list of module name strings.
3465 - deprecated `{boolean|string}`:
3466 Whether the module is deprecated and usage is discouraged.
3467 Set to boolean true, or a string to include in the warning message.
3470 Optional request group to override which modules may be downloaded
3471 together in an HTTP batch request. By default, any two modules may be
3472 loaded together in the same batch request. Set this option to a
3473 descriptive string to give the module its own HTTP request. To allow
3474 other modules to join this new request, give those the same request group.
3475 Use this option with caution. The default behaviour is well-tuned already,
3476 and setting this often does more harm than good. For more about request
3477 balancing optimisations, see
3478 [ResourceLoader/Architecture#Balance](https://www.mediawiki.org/wiki/ResourceLoader/Architecture#Balance).
3479 - skipFunction `{string}`:
3480 Allow this module to be satisfied as dependency without actually loading
3481 or executing scripts from the server, if the specified JavaScript function
3483 Use this to provide polyfills that are natively available in newer browsers.
3484 Specify the relative path to a JavaScript file containing a top-level return
3485 statement. The contents of the file should not contain any wrapping function,
3486 it will be wrapped by %ResourceLoader in an anonymous function and invoked
3487 when the module is considered for loading.
3488 - targets `{string[]}`
3489 List of %ResourceLoader targets where the module may be loaded from.
3490 This is used by the MobileFrontend extension to prevent certain modules
3492 This option is **deprecated**. See [T127268](https://phabricator.wikimedia.org/T127268).
3493 Default: `[ 'desktop', 'mobile' ]`
3494 ## FileModule options
3495 - localBasePath `{string}`:
3496 Base file path to prepend to relative file paths specified in other options.
3498 - remoteBasePath `{string}`:
3499 Base URL path to prepend to relative file paths specified in other options.
3500 This is used to form URLs for files, such as when referencing images in
3501 stylesheets, or in debug mode to serve JavaScript files directly.
3502 Default: @ref $wgResourceBasePath (which defaults to @ref $wgScriptPath)
3503 - remoteExtPath `{string}`:
3504 Shortcut for `remoteBasePath` that is relative to $wgExtensionAssetsPath.
3505 Use this when defining modules from an extension, so as to avoid hardcoding
3506 the script path of the %MediaWiki install or the location of the extensions
3508 This option is mutually exclusive with `remoteBasePath`.
3509 - styles `{string[]|string|array<string,array>}`:
3510 Styles to always include in the module.
3511 %File path or list of file paths, relative to `localBasePath`.
3512 The stylesheet can be automatically wrapped in a `@media` query by specifying
3513 the file path as the key in an object (instead of the value), with the value
3514 specifying a `media` query.
3515 See @ref wgResourceModules-example-stylesheet "Stylesheet examples" below.
3516 See also @ref $wgResourceModuleSkinStyles.
3518 - skinStyles `{string[]|string}`: Styles to include in specific skin contexts.
3519 Array keyed is by skin name with file path or list of file paths as value,
3520 relative to `localBasePath`.
3522 - noflip `{boolean}`:
3523 By default, CSSJanus will be used automatically to perform LTR-to-RTL flipping
3524 when loaded in a right-to-left (RTL) interface language context.
3525 Use this option to skip CSSJanus LTR-to-RTL flipping for this module, for example
3526 when registering an external library that already handles RTL styles.
3528 - packageFiles `{string[]|array[]}`
3529 Specify script files and (virtual) data files to include in the module.
3530 Each internal JavaScript file retains its own local module scope and its
3531 private exports can be accessed separately by other client-side code in the
3532 same module, via the local `require()` function.
3533 Modules that use package files should export any public API methods using
3536 [ResourceLoader/Package_files](https://www.mediawiki.org/wiki/ResourceLoader/Package_files)
3538 The `packageFiles` feature cannot be combined with legacy scripts that use
3539 the `scripts` option, including its extended variants `languageScripts`,
3540 `skinScripts`, and `debugScripts`.
3543 - scripts `{string[]|string|array[]}`:
3544 Scripts to always include in the module.
3545 %File path or list of file paths, relative to `localBasePath`.
3546 These files are concatenated blindly and executed as a single client-side script.
3547 Modules using this option are sometimes referred to as "legacy scripts" to
3548 distinguish them from those that use the `packageFiles` option.
3549 Modules that use legacy scripts usually attach any public APIs they have
3550 to the `mw` global variable. If a module contains just one file, it is also
3551 supported to use the newer `module.exports` mechanism, though if the module
3552 contains more than one legacy script, it is considered unsafe and unsupported
3553 to use this mechanism (use `packageFiles` instead). See also
3555 conventions/JavaScript](https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Exporting).
3556 Since MW 1.41, an element of `scripts` may be an array in the same format as
3557 packageFiles, giving a callback to call for content generation.
3559 Extended options, concatenated in this order:
3560 - languageScripts `{string[]|string|array[]}`: Scripts to include in specific
3561 language contexts. Array is keyed by language code with file path or list of
3563 - skinScripts `{string[]|string|array[]}`: Scripts to include in specific skin contexts.
3564 Array keyed is by skin name with file path or list of file paths.
3565 - debugScripts `{string[]|string|array[]}`: Scripts to include in debug contexts.
3566 %File path or list of file paths.
3567 - messages `{string[]}`
3568 Localisation messages to bundle with this module, for client-side use
3569 via `mw.msg()` and `mw.message()`. List of message keys.
3571 - templates `{string[]}`
3572 List of template files to be loaded for client-side usage via `mw.templates`.
3575 Since: MW 1.36; ignored since MW 1.41.
3578 **Example: Using an alternate subclass**
3580 $wgResourceModules['ext.myExtension'] = [
3581 'class' => \MediaWiki\ResourceLoader\WikiModule::class,
3584 **Example: Deprecated module**
3586 $wgResourceModules['ext.myExtension'] = [
3587 'deprecated' => 'You should use ext.myExtension2 instead',
3590 **Example: Base paths in extension.json**
3592 "ext.myExtension": {
3593 "localBasePath": "modules/ext.MyExtension",
3594 "remoteExtPath": "MyExtension/modules/ext.MyExtension"
3597 **Example: Base paths in core with PHP**
3599 $wgResourceModules['mediawiki.example'] = [
3600 'localBasePath' => "$IP/resources/src/mediawiki.example",
3601 'remoteBasePath' => "$wgResourceBasePath/resources/src/mediawiki.example",
3604 **Example: Define a skip function**
3606 $wgResourceModules['ext.myExtension.SomeWebAPI'] = [
3607 'skipFunction' => 'skip-SomeWebAPI.js',
3610 **Example: Contents of skip function file**
3612 return typeof SomeWebAPI === 'function' && SomeWebAPI.prototype.duckMethod;
3614 **Example: Module targets**
3616 $wgResourceModules['ext.myExtension'] = [
3617 'targets' => [ 'desktop', 'mobile' ],
3620 @anchor wgResourceModules-example-stylesheet
3621 **Example: Stylesheets**
3623 $wgResourceModules['example'] = [
3629 $wgResourceModules['example.media'] = [
3631 'foo.css' => [ 'media' => 'print' ],
3633 $wgResourceModules['example.mixed'] = [
3636 'bar.css' => [ 'media' => 'print' ],
3640 **Example: Package files**
3642 "ext.myExtension": {
3643 "localBasePath": "modules/ext.MyExtension",
3644 "remoteExtPath": "MyExtension/modules/ext.MyExtension",
3653 **Example: Legacy scripts**
3655 $wgResourceModules['ext.myExtension'] = [
3657 'modules/ext.myExtension/utils.js',
3658 'modules/ext.myExtension/myExtension.js',
3660 'languageScripts' => [
3661 'bs' => 'modules/ext.myExtension/languages/bs.js',
3662 'fi' => 'modules/ext.myExtension/languages/fi.js',
3665 'default' => 'modules/ext.myExtension/skin-default.js',
3668 'modules/ext.myExtension/debug.js',
3672 **Example: Template files**
3674 $wgResourceModules['ext.myExtension'] = [
3676 'templates/template.html',
3677 'templates/template2.html',
3682 ResourceModuleSkinStyles:
3686 Add extra skin-specific styles to a resource module.
3687 These are automatically added by ResourceLoader to the 'skinStyles' list of
3688 the existing module. The 'styles' list cannot be modified or disabled.
3689 For example, below a module "bar" is defined and skin Foo provides additional
3693 $wgResourceModules['bar'] = [
3694 'scripts' => 'resources/bar/bar.js',
3695 'styles' => 'resources/bar/main.css',
3697 $wgResourceModuleSkinStyles['foo'] = [
3698 'bar' => 'skins/Foo/bar.css',
3701 This is effectively equivalent to:
3704 $wgResourceModules['bar'] = [
3705 'scripts' => 'resources/bar/bar.js',
3706 'styles' => 'resources/bar/main.css',
3708 'foo' => skins/Foo/bar.css',
3712 If the module already defines its own entry in `skinStyles` for a given skin, then
3713 $wgResourceModuleSkinStyles is ignored.
3714 If a module defines a `skinStyles['default']` the skin may want to extend that instead
3715 of replacing it. This can be done using the `+` prefix.
3718 $wgResourceModules['bar'] = [
3719 'scripts' => 'resources/bar/bar.js',
3720 'styles' => 'resources/bar/basic.css',
3722 'default' => 'resources/bar/additional.css',
3725 // Note the '+' character:
3726 $wgResourceModuleSkinStyles['foo'] = [
3727 '+bar' => 'skins/Foo/bar.css',
3730 This is effectively equivalent to:
3733 $wgResourceModules['bar'] = [
3734 'scripts' => 'resources/bar/bar.js',
3735 'styles' => 'resources/bar/basic.css',
3737 'default' => 'resources/bar/additional.css',
3739 'resources/bar/additional.css',
3740 'skins/Foo/bar.css',
3745 In other words, as a module author, use the `styles` list for stylesheets that may not be
3746 disabled by a skin. To provide default styles that may be extended or replaced,
3747 use `skinStyles['default']`.
3748 As with $wgResourceModules, always set the localBasePath and remoteBasePath
3749 keys (or one of remoteExtPath/remoteSkinPath).
3752 $wgResourceModuleSkinStyles['foo'] = [
3754 'quux' => 'quux.css',
3755 'remoteSkinPath' => 'Foo',
3756 'localBasePath' => __DIR__,
3759 ResourceLoaderSources:
3763 Extensions should register foreign module sources here. 'local' is a
3764 built-in source that is not in this array, but defined by
3765 ResourceLoader::__construct() so that it cannot be unset.
3768 $wgResourceLoaderSources['foo'] = 'http://example.org/w/load.php';
3774 callback: [MediaWiki\MainConfigSchema, getDefaultResourceBasePath]
3776 The default 'remoteBasePath' value for instances of MediaWiki\ResourceLoader\FileModule.
3777 Defaults to $wgScriptPath.
3778 ResourceLoaderMaxage:
3782 Override how long a CDN or browser may cache a ResourceLoader HTTP response.
3783 Maximum time in seconds. Used for the `max-age` and `s-maxage` Cache-Control headers.
3787 @see \MediaWiki\ResourceLoader\ResourceLoader::__construct
3789 ResourceLoaderUseObjectCacheForDeps:
3792 Use the main stash instead of the module_deps table for indirect dependency tracking
3794 @warning EXPERIMENTAL
3795 ResourceLoaderDebug:
3798 The default debug mode (on/off) for of ResourceLoader requests.
3799 This will still be overridden when the debug URL parameter is used.
3800 ResourceLoaderMaxQueryLength:
3806 ResourceLoader will not generate URLs whose query string is more than
3807 this many characters long, and will instead use multiple requests with
3808 shorter query strings. Using multiple requests may degrade performance,
3809 but may be needed based on the query string limit supported by your web
3810 server and/or your user's web browsers.
3812 @see \MediaWiki\ResourceLoader\StartUpModule::getMaxQueryLength
3814 ResourceLoaderValidateJS:
3817 If set to true, JavaScript modules loaded from wiki pages will be parsed
3818 prior to minification to validate it.
3819 Parse errors will result in a JS exception being thrown during module load,
3820 which avoids breaking other modules loaded in the same request.
3821 ResourceLoaderEnableJSProfiler:
3824 When enabled, execution of JavaScript modules is profiled client-side.
3825 Instrumentation happens in mw.loader.profiler.
3826 Use `mw.inspect('time')` from the browser console to display the data.
3828 ResourceLoaderStorageEnabled:
3831 Whether ResourceLoader should attempt to persist modules in localStorage on
3832 browsers that support the Web Storage API.
3833 ResourceLoaderStorageVersion:
3836 Cache version for client-side ResourceLoader module storage. You can trigger
3837 invalidation of the contents of the module store by incrementing this value.
3839 ResourceLoaderEnableSourceMapLinks:
3842 Whether to include a SourceMap header in ResourceLoader responses
3843 for JavaScript modules.
3845 AllowSiteCSSOnRestrictedPages:
3848 Whether to allow site-wide CSS (MediaWiki:Common.css and friends) on
3849 restricted pages like Special:UserLogin or Special:Preferences where
3850 JavaScript is disabled for security reasons. As it is possible to
3851 execute JavaScript through CSS, setting this to true opens up a
3852 potential security hole. Some sites may "skin" their wiki by using
3853 site-wide CSS, causing restricted pages to look unstyled and different
3854 from the rest of the site.
3859 Whether to use the development version of Vue.js. This should be disabled
3860 for production installations. For development installations, enabling this
3861 provides useful additional warnings and checks.
3862 Even when this is disabled, using ResourceLoader's debug mode (?debug=true)
3863 will cause the development version to be loaded.
3869 callback: [MediaWiki\MainConfigSchema, getDefaultMetaNamespace]
3871 Name of the project namespace. If left set to false, $wgSitename will be
3876 Name of the project talk namespace.
3877 Normally you can ignore this and it will be something like
3878 $wgMetaNamespace . "_talk". In some languages, you may want to set this
3879 manually for grammatical reasons.
3880 CanonicalNamespaceNames:
3902 Canonical namespace names.
3903 Must not be changed directly in configuration or by extensions, use $wgExtraNamespaces
3909 Additional namespaces. If the namespaces defined in Language.php and
3910 Namespace.php are insufficient, you can create new ones here, for example,
3911 to import Help files in other languages. You can also override the namespace
3912 names of existing namespaces. Extensions should use the CanonicalNamespaces
3913 hook or extension.json.
3914 @warning Once you delete a namespace, the pages in that namespace will
3915 no longer be accessible. If you rename it, then you can access them through
3916 the new namespace name.
3917 Custom namespaces should start at 100 to avoid conflicting with standard
3918 namespaces, and should always follow the even/odd main/talk pattern.
3921 $wgExtraNamespaces = [
3923 101 => "Hilfe_Diskussion",
3925 103 => "Discussion_Aide"
3928 @todo Add a note about maintenance/namespaceDupes.php
3929 ExtraGenderNamespaces:
3933 Same as above, but for namespaces with gender distinction.
3934 Note: the default form for the namespace should also be set
3935 using $wgExtraNamespaces for the same index.
3941 Define extra namespace aliases.
3942 These are alternate names for the primary localised namespace names, which
3943 are defined by $wgExtraNamespaces and the language file. If a page is
3944 requested with such a prefix, the request will be redirected to the primary
3946 Set this to a map from namespace names to IDs.
3949 $wgNamespaceAliases = [
3950 'Wikipedian' => NS_USER,
3954 @see \Language::getNamespaceAliases for accessing the full list of aliases,
3955 including those defined by other means.
3957 default: ' %!"$&''()*,\-.\/0-9:;=?@A-Z\\^_`a-z~\x80-\xFF+'
3958 deprecated: 'since 1.41; use Extension:TitleBlacklist to customize'
3960 Allowed title characters -- regex character class
3961 Don't change this unless you know what you're doing
3962 Problematic punctuation:
3963 - []}|# Are needed for link syntax, never enable these
3964 - <> Causes problems with HTML escaping, don't use
3965 - % Enabled by default, minor problems with path to query rewrite rules, see below
3966 - + Enabled by default, but doesn't work with path to query rewrite rules,
3968 - ? Enabled by default, but doesn't work with path to PATH_INFO rewrites
3969 All three of these punctuation problems can be avoided by using an alias,
3970 instead of a rewrite rule of either variety.
3971 The problem with % is that when using a path to query rewrite rule, URLs are
3972 double-unescaped: once by Apache's path conversion code, and again by PHP. So
3973 %253F, for example, becomes "?". Our code does not double-escape to compensate
3974 for this, indeed double escaping would break if the double-escaped title was
3975 passed in the query string rather than the path. This is a minor security issue
3976 because articles can be created such that they are hard to view or edit.
3977 In some rare cases you may wish to remove + for compatibility with old links.
3978 @deprecated since 1.41; use Extension:TitleBlacklist or (soon)
3979 Extension:AbuseFilter to customize this set.
3983 Set this to false to avoid forcing the first letter of links to capitals.
3984 @warning may break links! This makes links COMPLETELY case-sensitive. Links
3985 appearing with a capital at the beginning of a sentence will *not* go to the
3986 same place as links in the middle of a sentence using a lowercase initial.
3987 CapitalLinkOverrides:
3991 @since 1.16 - This can now be set per-namespace. Some special namespaces (such as Special,
3992 see NamespaceInfo::$alwaysCapitalizedNamespaces for the full list) must be true by
3993 default (and setting them has no effect), due to various things that require them to be
3994 so. Also, since Talk namespaces need to directly mirror their associated content
3995 namespaces, the values for those are ignored in favor of the subject namespace's
3996 setting. Setting for NS_MEDIA is taken automatically from NS_FILE.
3999 $wgCapitalLinkOverrides[ NS_FILE ] = false;
4001 NamespacesWithSubpages:
4018 Which namespaces should support subpages?
4019 See Language.php for a list of namespaces.
4025 Array of namespaces which can be deemed to contain valid "content", as far
4026 as the site statistics are concerned. Useful if additional namespaces also
4027 contain "content" which should be considered when generating a count of the
4028 number of articles in the wiki.
4029 ShortPagesNamespaceExclusions:
4033 Optional array of namespaces which should be excluded from Special:ShortPages.
4034 Only pages inside $wgContentNamespaces but not $wgShortPagesNamespaceExclusions will
4035 be shown on that page.
4036 @since 1.37; previously $wgShortPagesNamespaceBlacklist
4037 ExtraSignatureNamespaces:
4041 Array of namespaces, in addition to the talk namespaces, where signatures
4042 (~~~~) are likely to be used. This determines whether to display the
4043 Signature button on the edit toolbar, and may also be used by extensions.
4044 For example, "traditional" style wikis, where content and discussion are
4045 intermixed, could place NS_MAIN and NS_PROJECT namespaces in this array.
4046 InvalidRedirectTargets:
4055 Array of invalid page redirect targets.
4056 Attempting to create a redirect to any of the pages in this array
4057 will make the redirect fail.
4058 Userlogout is hard-coded, so it does not need to be listed here.
4059 (T12569) Disallow Mypage and Mytalk as well.
4060 As of now, this only checks special pages. Redirects to pages in
4061 other namespaces cannot be invalidated by this variable.
4062 DisableHardRedirects:
4065 Disable redirects to special pages and interwiki redirects, which use a 302
4066 and have no "redirected from" link.
4067 @note This is only for articles with #REDIRECT in them. URL's containing a
4068 local interwiki prefix (or a non-canonical special page name) are still hard
4069 redirected regardless of this setting.
4073 Fix double redirects after a page move.
4074 Tends to conflict with page move vandalism, use only on a private wiki.
4079 Array for local interwiki values, for each of the interwiki prefixes that point to
4081 Note, recent changes feeds use only the first entry in this array. See $wgRCFeeds.
4084 description: 'Expiry time for cache of interwiki table'
4090 mergeStrategy: replace
4092 Interwiki cache as an associative array.
4093 When set, the InterwikiLookup service will not use the built-in `interwiki` database table,
4094 but instead use this static array as its source.
4095 This cache data structure can be generated by the `dumpInterwiki.php` maintenance
4096 script (which lives in the WikimediaMaintenance repository) and has key
4097 formats such as the following:
4098 - dbname:key - a simple key (e.g. enwiki:meta)
4099 - _sitename:key - site-scope key (e.g. wiktionary:meta)
4100 - __global:key - global-scope key (e.g. __global:meta)
4101 - __sites:dbname - site mapping (e.g. __sites:enwiki)
4102 Sites mapping just specifies site name, other keys provide "local url"
4104 @see \MediaWiki\Interwiki\ClassicInterwikiLookup
4108 Specify number of domains to check for messages.
4109 - 1: Just wiki(db)-level
4110 - 2: wiki and global levels
4112 InterwikiFallbackSite:
4114 description: 'Fallback site, if unable to resolve from cache'
4118 If local interwikis are set up which allow redirects,
4119 set this regexp to restrict URLs which will be displayed
4120 as 'redirected from' links.
4122 It might look something like this:
4124 $wgRedirectSources = '!^https?://[a-z-]+\.wikipedia\.org/!';
4126 Leave at false to avoid displaying any incoming redirect markers.
4127 This does not affect intra-wiki redirects, which don't change
4131 mediawiki: MediaWiki\Site\MediaWikiSite
4134 Register handlers for specific types of sites.
4138 description: 'Maximum indent level of toc.'
4142 A complexity limit on template expansion: the maximum number of nodes visited
4143 by PPFrame::expand()
4147 Maximum recursion depth for templates within templates.
4148 The current parser adds two levels to the PHP call stack for each template,
4149 and xdebug limits the call stack to 256 by default. So this should hopefully
4150 stop the parser before it hits the xdebug limit.
4153 description: '@see self::MaxTemplateDepth'
4187 URL schemes that should be recognized as valid by wfParseUrl().
4188 WARNING: Do not add 'file:' to this or internal file links will be broken.
4189 Instead, if you want to support file links, add 'file://'. The same applies
4190 to any other protocols with the same name as a namespace. See task T46011 for
4195 description: 'If true, removes (by substituting) templates in signatures.'
4196 AllowExternalImages:
4198 description: 'Whether to allow inline image pointing to other websites'
4199 AllowExternalImagesFrom:
4202 If the above is false, you can specify an exception here. Image URLs
4203 that start with this string are then rendered, while all others are not.
4204 You can use this to set up a trusted, simple repository of images.
4205 You may also specify an array of strings to allow multiple sites
4208 $wgAllowExternalImagesFrom = 'http://127.0.0.1/';
4209 $wgAllowExternalImagesFrom = [ 'http://127.0.0.1/', 'http://example.com' ];
4211 EnableImageWhitelist:
4214 If $wgAllowExternalImages is false, you can allow an on-wiki
4215 allow list of regular expression fragments to match the image URL
4216 against. If the image matches one of the regular expression fragments,
4217 the image will be displayed.
4218 Set this to true to enable the on-wiki allow list (MediaWiki:External image whitelist)
4219 Or false to disable it
4223 deprecated: 'since 1.35; register an extension tag named <img> instead.'
4225 A different approach to the above: simply allow the "<img>" tag to be used.
4226 This allows you to specify alt text and other attributes, copy-paste HTML to
4227 your wiki more easily, etc. However, allowing external images in any manner
4228 will allow anyone with editing rights to snoop on your visitors' IP
4229 addresses and so forth, if they wanted to, by inserting links to images on
4231 @deprecated since 1.35; register an extension tag named <img> instead.
4236 Configuration for HTML postprocessing tool. Set this to a configuration
4237 array to enable an external tool. By default, we now use the RemexHtml
4238 library; historically, other postprocessors were used.
4239 Setting this to null will use default settings.
4241 - treeMutationTrace: a boolean to turn on Remex tracing
4242 - serializerTrace: a boolean to turn on Remex tracing
4243 - mungerTrace: a boolean to turn on Remex tracing
4244 - pwrap: whether <p> wrapping should be done (default true)
4245 See includes/tidy/RemexDriver.php for detail on configuration.
4246 Overriding the default configuration is strongly discouraged in
4253 Default Parsoid configuration.
4254 Overriding the default configuration is strongly discouraged in
4257 ParserEnableLegacyMediaDOM:
4259 deprecated: 'since 1.41'
4261 Enable legacy media HTML structure in the output from the Parser. The
4262 alternative modern HTML structure that replaces it is described at
4263 https://www.mediawiki.org/wiki/Parsing/Media_structure
4265 @deprecated since 1.41
4266 UseContentMediaStyles:
4268 deprecated: 'since 1.41'
4270 Temporary flag to ship the styles for the media HTML structure that replaces
4271 legacy, when $wgParserEnableLegacyMediaDOM is `false`. This is configured
4272 separately so that it can continue to be served after the latter is disabled
4273 but still in the cache.
4275 @deprecated since 1.41
4276 UseLegacyMediaStyles:
4279 Temporary flag to stop shipping the styles for the legacy media HTML structure
4280 that has been replaced when $wgParserEnableLegacyMediaDOM is `false`. This is
4281 configured separately to give time for templates and extensions that mimic the
4282 the parser output to be migrated away. See T318433
4287 Allow raw, unchecked HTML in "<html>...</html>" sections.
4288 THIS IS VERY DANGEROUS on a publicly editable site, so USE $wgGroupPermissions
4289 TO RESTRICT EDITING to only those that you trust
4293 Set a default target for external links, e.g. _blank to pop up a new window.
4294 This will also set the "noreferrer" and "noopener" link rel to prevent the
4295 attack described at https://mathiasbynens.github.io/rel-noopener/ .
4296 Some older browsers may not support these link attributes, hence
4297 setting $wgExternalLinkTarget to _blank may represent a security risk
4298 to some of your users.
4302 If true, external URL links in wiki text will be given the
4303 rel="nofollow" attribute as a hint to search engines that
4304 they should not be followed for ranking purposes as they
4305 are user-supplied and thus subject to spamming.
4306 NoFollowNsExceptions:
4310 Namespaces in which $wgNoFollowLinks doesn't apply.
4311 See Language.php for a list of namespaces.
4312 NoFollowDomainExceptions:
4317 If this is set to an array of domains, external links to these domain names
4318 (or any subdomains) will not be set to rel="nofollow" regardless of the
4319 value of $wgNoFollowLinks. For instance:
4320 $wgNoFollowDomainExceptions = [ 'en.wikipedia.org', 'wiktionary.org', 'mediawiki.org' ];
4321 This would add rel="nofollow" to links to de.wikipedia.org, but not
4322 en.wikipedia.org, wiktionary.org, en.wiktionary.org, us.en.wikipedia.org,
4324 Defaults to mediawiki.org for the links included in the software by default.
4325 RegisterInternalExternals:
4328 By default MediaWiki does not register links pointing to same server in
4329 externallinks dataset, use this value to override:
4332 description: 'Allow DISPLAYTITLE to change title display'
4333 RestrictDisplayTitle:
4336 For consistency, restrict DISPLAYTITLE to text that normalizes to the same
4337 canonical DB key. Also disallow some inline CSS rules like display: none;
4338 which can cause the text to be hidden or unselectable.
4339 ExpensiveParserFunctionLimit:
4342 Maximum number of calls per parse to expensive parser functions such as
4344 PreprocessorCacheThreshold:
4347 Preprocessor caching threshold
4348 Setting it to 'false' will disable the preprocessor cache.
4349 EnableScaryTranscluding:
4351 description: 'Enable interwiki transcluding. Only when iw_trans=1 in the interwiki table.'
4352 TranscludeCacheExpiry:
4355 Expiry time for transcluded templates cached in object cache.
4356 Only used $wgEnableInterwikiTranscluding is set to true.
4364 Enable the magic links feature of automatically turning ISBN xxx,
4365 PMID xxx, RFC xxx into links
4370 Method used to determine if a page in a content namespace should be counted
4372 Redirect pages will never be counted as valid articles.
4373 This variable can have the following values:
4374 - 'any': all pages as considered as valid articles
4375 - 'link': the page must contain a [[wiki link]] to be considered valid
4376 See also See https://www.mediawiki.org/wiki/Manual:Article_count
4377 Retroactively changing this variable will not affect the existing count,
4378 to update it, you will need to run the maintenance/updateArticleCount.php
4383 How many days user must be idle before he is considered inactive. Will affect
4384 the number shown on Special:Statistics, Special:ActiveUsers, and the
4385 {{NUMBEROFACTIVEUSERS}} magic word in wikitext.
4386 You might want to leave this as the default value, to provide comparable
4387 numbers between different wikis.
4391 The following variables define 3 user experience levels:
4392 - newcomer: has not yet reached the 'learner' level
4393 - learner: has at least $wgLearnerEdits and has been
4394 a member for $wgLearnerMemberSince days
4395 but has not yet reached the 'experienced' level.
4396 - experienced: has at least $wgExperiencedUserEdits edits and
4397 has been a member for $wgExperiencedUserMemberSince days.
4401 Number of days the user must exist before becoming a learner.
4402 @see self::LearnerEdits
4403 ExperiencedUserEdits:
4406 Number of edits the user must have before becoming "experienced".
4407 @see self::LearnerEdits
4408 ExperiencedUserMemberSince:
4411 Number of days the user must exist before becoming "experienced".
4412 @see self::LearnerEdits
4413 ManualRevertSearchRadius:
4417 Maximum number of revisions of a page that will be checked against every new edit
4418 made to determine whether the edit was a manual revert.
4419 Computational time required increases roughly linearly with this configuration
4421 Larger values will let you detect very deep reverts, but at the same time can give
4422 unexpected results (such as marking large amounts of edits as reverts) and may slow
4423 down the wiki slightly when saving new edits.
4424 Setting this to 0 will disable the manual revert detection feature entirely.
4425 See this document for a discussion on this topic:
4426 https://meta.wikimedia.org/wiki/Research:Revert
4428 RevertedTagMaxDepth:
4432 Maximum depth (revision count) of reverts that will have their reverted edits marked
4433 with the mw-reverted change tag. Reverts deeper than that will not have any edits
4434 marked as reverted at all.
4435 Large values can lead to lots of revisions being marked as "reverted", which may appear
4437 Setting this to 0 will disable the reverted tag entirely.
4439 CentralIdLookupProviders:
4441 local: { class: MediaWiki\User\CentralId\LocalIdLookup, services: [MainConfig, DBLoadBalancerFactory, HideUserUtils] }
4444 Central ID lookup providers
4445 Key is the provider ID, value is a specification for ObjectFactory
4447 CentralIdLookupProvider:
4450 description: 'Central ID lookup provider to use by default'
4451 UserRegistrationProviders:
4453 local: { class: MediaWiki\User\Registration\LocalUserRegistrationProvider, services: [UserFactory] }
4456 User registration timestamp provider classes
4460 policies: { bureaucrat: { MinimalPasswordLength: 10, MinimumPasswordLengthToLogin: 1 }, sysop: { MinimalPasswordLength: 10, MinimumPasswordLengthToLogin: 1 }, interface-admin: { MinimalPasswordLength: 10, MinimumPasswordLengthToLogin: 1 }, bot: { MinimalPasswordLength: 10, MinimumPasswordLengthToLogin: 1 }, default: { MinimalPasswordLength: { value: 8, suggestChangeOnLogin: true }, PasswordCannotBeSubstringInUsername: { value: true, suggestChangeOnLogin: true }, PasswordCannotMatchDefaults: { value: true, suggestChangeOnLogin: true }, MaximalPasswordLength: { value: 4096, suggestChangeOnLogin: true }, PasswordNotInCommonList: { value: true, suggestChangeOnLogin: true } } }
4461 checks: { MinimalPasswordLength: 'PasswordPolicyChecks::checkMinimalPasswordLength', MinimumPasswordLengthToLogin: 'PasswordPolicyChecks::checkMinimumPasswordLengthToLogin', PasswordCannotBeSubstringInUsername: 'PasswordPolicyChecks::checkPasswordCannotBeSubstringInUsername', PasswordCannotMatchDefaults: 'PasswordPolicyChecks::checkPasswordCannotMatchDefaults', MaximalPasswordLength: 'PasswordPolicyChecks::checkMaximalPasswordLength', PasswordNotInCommonList: 'PasswordPolicyChecks::checkPasswordNotInCommonList' }
4463 mergeStrategy: array_replace_recursive
4465 Password policy for the wiki.
4469 'policies' => [ <group> => [ <policy> => <settings>, ... ], ... ],
4470 'checks' => [ <policy> => <callback>, ... ],
4473 where <group> is a user group, <policy> is a password policy name
4474 (arbitrary string) defined in the 'checks' part, <callback> is the
4475 PHP callable implementing the policy check, <settings> is an array
4476 of options with the following keys:
4477 - value: (number, boolean or null) the value to pass to the callback
4478 - forceChange: (boolean, default false) if the password is invalid, do
4479 not let the user log in without changing the password
4480 - suggestChangeOnLogin: (boolean, default false) if true and the password is
4481 invalid, suggest a password change if logging in. If all the failing policies
4482 that apply to the user have this set to false, the password change
4483 screen will not be shown. 'forceChange' takes precedence over
4484 'suggestChangeOnLogin' if they are both present.
4485 As a shorthand for [ 'value' => <value> ], simply <value> can be written.
4486 When multiple password policies are defined for a user, the settings
4487 arrays are merged, and for fields which are set in both arrays, the
4488 larger value (as understood by PHP's 'max' method) is taken.
4489 A user's effective policy is the superset of all policy statements
4490 from the policies for the groups where the user is a member. If more
4491 than one group policy include the same policy statement, the value is
4492 the max() of the values. Note true > false. The 'default' policy group
4493 is required, and serves as the minimum policy for all users.
4494 Callbacks receive three arguments: the policy value, the User object
4495 and the password; and must return a StatusValue. A non-good status
4496 means the password will not be accepted for new accounts, and existing
4497 accounts will be prompted for password change or barred from logging in
4498 (depending on whether the status is a fatal or merely error/warning).
4499 The checks supported by core are:
4500 - MinimalPasswordLength - Minimum length a user can set.
4501 - MinimumPasswordLengthToLogin - Passwords shorter than this will
4502 not be allowed to login, or offered a chance to reset their password
4503 as part of the login workflow, regardless if it is correct.
4504 - MaximalPasswordLength - maximum length password a user is allowed
4505 to attempt. Prevents DoS attacks with pbkdf2.
4506 - PasswordCannotBeSubstringInUsername - Password cannot be a substring
4507 (contained within) the username.
4508 - PasswordCannotMatchDefaults - Username/password combination cannot
4509 match a list of default passwords used by MediaWiki in the past.
4510 - PasswordNotInCommonList - Password not in best practices list of
4511 100,000 commonly used passwords. Due to the size of the list this
4512 is a probabilistic test.
4513 If you add custom checks, for Special:PasswordPolicies to display them correctly,
4514 every check should have a corresponding passwordpolicies-policy-<check> message,
4515 and every settings field other than 'value' should have a corresponding
4516 passwordpolicies-policyflag-<flag> message (<check> and <flag> are in lowercase).
4517 The check message receives the policy value as a parameter, the flag message
4518 receives the flag value (or values if it's an array).
4520 @see \PasswordPolicyChecks
4521 @see \MediaWiki\User\User::checkPasswordValidity()
4528 Configure AuthManager
4529 All providers are constructed using ObjectFactory, see that for the general
4530 structure. The array may also contain a key "sort" used to order providers:
4531 providers are stably sorted by this value, which should be an integer
4534 - preauth: Array (keys ignored) of specifications for PreAuthenticationProviders
4535 - primaryauth: Array (keys ignored) of specifications for PrimaryAuthenticationProviders
4536 - secondaryauth: Array (keys ignored) of specifications for SecondaryAuthenticationProviders
4538 @note If this is null or empty, the value from $wgAuthManagerAutoConfig is
4539 used instead. Local customization should generally set this variable from
4540 scratch to the desired configuration. Extensions that want to
4541 auto-configure themselves should use $wgAuthManagerAutoConfig instead.
4542 AuthManagerAutoConfig:
4544 preauth: { MediaWiki\Auth\ThrottlePreAuthenticationProvider: { class: MediaWiki\Auth\ThrottlePreAuthenticationProvider, sort: 0 } }
4545 primaryauth: { MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider: { class: MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider, services: [DBLoadBalancerFactory, UserOptionsLookup], args: [{ authoritative: false }], sort: 0 }, MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider: { class: MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider, services: [DBLoadBalancerFactory], args: [{ authoritative: true }], sort: 100 } }
4546 secondaryauth: { MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProvider: { class: MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProvider, sort: 0 }, MediaWiki\Auth\ResetPasswordSecondaryAuthenticationProvider: { class: MediaWiki\Auth\ResetPasswordSecondaryAuthenticationProvider, sort: 100 }, MediaWiki\Auth\EmailNotificationSecondaryAuthenticationProvider: { class: MediaWiki\Auth\EmailNotificationSecondaryAuthenticationProvider, services: [DBLoadBalancerFactory], sort: 200 } }
4548 mergeStrategy: array_plus_2d
4550 @see self::AuthManagerConfig
4556 Configures RememberMe authentication request added by AuthManager. It can show a "remember
4557 me" checkbox that, when checked, will cause it to take more time for the authenticated
4558 session to expire. It can also be configured to always or to never extend the authentication
4560 Valid values are listed in RememberMeAuthenticationRequest::ALLOWED_FLAGS.
4566 additionalProperties:
4569 Time frame for re-authentication.
4570 With only password-based authentication, you'd just ask the user to re-enter
4571 their password to verify certain operations like changing the password or
4572 changing the account's email address. But under AuthManager, the user might
4573 not have a password (you might even have to redirect the browser to a
4574 third-party service or something complex like that), you might want to have
4575 both factors of a two-factor authentication, and so on. So, the options are:
4576 - Incorporate the whole multi-step authentication flow within everything
4577 that needs to do this.
4578 - Consider it good if they used Special:UserLogin during this session within
4580 - Come up with a third option.
4581 MediaWiki currently takes the second option. This setting configures the
4583 This allows for configuring different time frames for different
4584 "operations". The operations used in MediaWiki core include:
4590 Additional operations may be used by extensions, either explicitly by
4591 calling AuthManager::securitySensitiveOperationStatus(),
4592 ApiAuthManagerHelper::securitySensitiveOperation() or
4593 SpecialPage::checkLoginSecurityLevel(), or implicitly by overriding
4594 SpecialPage::getLoginSecurityLevel() or by subclassing
4595 AuthManagerSpecialPage.
4596 The key 'default' is used if a requested operation isn't defined in the array.
4598 AllowSecuritySensitiveOperationIfCannotReauthenticate:
4602 additionalProperties:
4605 Whether to allow security-sensitive operations when re-authentication is not possible.
4606 If AuthManager::canAuthenticateNow() is false (e.g. the current
4607 SessionProvider is not able to change users, such as when OAuth is in use),
4608 AuthManager::securitySensitiveOperationStatus() cannot sensibly return
4609 SEC_REAUTH. Setting an operation true here will have it return SEC_OK in
4610 that case, while setting it false will have it return SEC_FAIL.
4611 The key 'default' is used if a requested operation isn't defined in the array.
4613 @see self::ReauthenticateTime
4614 ChangeCredentialsBlacklist:
4616 - MediaWiki\Auth\TemporaryPasswordAuthenticationRequest
4621 List of AuthenticationRequest class names which are not changeable through
4622 Special:ChangeCredentials and the changeauthenticationdata API.
4623 This is only enforced on the client level; AuthManager itself (e.g.
4624 AuthManager::allowsAuthenticationDataChange calls) is not affected.
4625 Class names are checked for exact match (not for subclasses).
4627 RemoveCredentialsBlacklist:
4629 - MediaWiki\Auth\PasswordAuthenticationRequest
4634 List of AuthenticationRequest class names which are not removable through
4635 Special:RemoveCredentials and the removeauthenticationdata API.
4636 This is only enforced on the client level; AuthManager itself (e.g.
4637 AuthManager::allowsAuthenticationDataChange calls) is not affected.
4638 Class names are checked for exact match (not for subclasses).
4640 MinimalPasswordLength:
4642 deprecated: 'since 1.26, use $wgPasswordPolicy''s MinimalPasswordLength.'
4644 Specifies the minimal length of a user password. If set to 0, empty pass-
4646 @deprecated since 1.26, use $wgPasswordPolicy's MinimalPasswordLength.
4647 MaximalPasswordLength:
4649 deprecated: 'since 1.26, use $wgPasswordPolicy''s MaximalPasswordLength.'
4651 Specifies the maximal length of a user password (T64685).
4652 It is not recommended to make this greater than the default, as it can
4653 allow DoS attacks by users setting really long passwords. In addition,
4654 this should not be lowered too much, as it enforces weak passwords.
4655 @warning Unlike other password settings, user with passwords greater than
4656 the maximum will not be able to log in.
4657 @deprecated since 1.26, use $wgPasswordPolicy's MaximalPasswordLength.
4658 InvalidPasswordReset:
4661 Specifies if users should be sent to a password-reset form on login, if their
4662 password doesn't meet the requirements of User::isValidPassword().
4667 Default password type to use when hashing user passwords.
4668 Must be set to a type defined in $wgPasswordConfig, or a type that
4669 is registered by default in PasswordFactory.php.
4673 A: { class: MWOldPassword }
4674 B: { class: MWSaltedPassword }
4675 pbkdf2-legacyA: { class: LayeredParameterizedPassword, types: [A, pbkdf2] }
4676 pbkdf2-legacyB: { class: LayeredParameterizedPassword, types: [B, pbkdf2] }
4677 bcrypt: { class: BcryptPassword, cost: 9 }
4678 pbkdf2: { factory: [AbstractPbkdf2Password, newInstance], algo: sha512, cost: '30000', length: '64' }
4679 argon2: { class: Argon2Password, algo: auto }
4682 Configuration for built-in password types.
4683 Maps the password type to an array of options:
4684 - class: The Password class to use.
4685 - factory (since 1.40): A function that creates and returns a suitable Password object.
4686 This option is intended only for internal use; the function signature is unstable and
4687 subject to change in future versions.
4688 All other options are class-dependent.
4689 An advanced example:
4691 $wgPasswordConfig['bcrypt-peppered'] = [
4692 'class' => EncryptedPassword::class,
4693 'underlying' => 'bcrypt',
4695 hash( 'sha256', 'secret', true ),
4697 'cipher' => 'aes-256-cbc',
4701 PasswordResetRoutes:
4707 Whether to allow password resets ("enter some identifying data, and we'll send an email
4708 with a temporary password you can use to get back into the account") identified by
4709 various bits of data. Setting all of these to false (or the whole variable to false)
4710 has the effect of disabling password resets entirely
4713 description: 'Maximum number of Unicode characters in signature'
4714 SignatureValidation:
4717 Behavior of signature validation. Allowed values are:
4718 - 'warning' - invalid signatures cause a warning to be displayed on the preferences page,
4719 but they are still used when signing comments; new invalid signatures can still be saved as
4721 - 'new' - existing invalid signatures behave as above; new invalid signatures can't be
4723 - 'disallow' - existing invalid signatures are no longer used when signing comments; new
4724 invalid signatures can't be saved
4726 SignatureAllowedLintErrors:
4731 List of lint error codes which don't cause signature validation to fail.
4732 @see https://www.mediawiki.org/wiki/Help:Lint_errors
4737 Maximum number of bytes in username. You want to run the maintenance
4738 script ./maintenance/checkUsernames.php once you have changed this value.
4741 - 'MediaWiki default'
4742 - 'Conversion script'
4743 - 'Maintenance script'
4744 - 'Template namespace initialisation script'
4746 - 'Delete page script'
4747 - 'Move page script'
4748 - 'Command line script'
4750 - 'msg:double-redirect-fixer'
4751 - 'msg:usermessage-editor'
4752 - 'msg:proxyblocker'
4754 - 'msg:spambot_username'
4755 - 'msg:autochange-username'
4758 Array of usernames which may not be registered or logged in from
4759 Maintenance scripts can still use these
4760 @see \MediaWiki\User\User::MAINTENANCE_SCRIPT_USER
4770 editsectiononrightclick: 0
4771 email-allow-new-users: 1
4774 enotifusertalkpages: 1
4775 enotifwatchlistpages: 1
4781 hidecategorization: 1
4786 newpageshidepatrolled: 0
4794 rcenhancedfilters-disable: 0
4797 search-match-redirect: true
4798 search-special-page: Search
4799 search-thumbnail-extra-namespaces: true
4802 shownumberswatching: 1
4803 showrollbackconfirmation: 0
4815 watchlisthideanons: 0
4816 watchlisthidebots: 0
4817 watchlisthidecategorization: 1
4819 watchlisthideminor: 0
4821 watchlisthidepatrolled: 0
4822 watchlistreloadautomatically: 0
4823 watchlistunwatchlinks: 0
4827 wlenhancedfilters-disable: 0
4831 Settings added to this array will override the default globals for the user
4832 preferences used by anonymous visitors and newly created accounts.
4833 For instance, to disable editing on double clicks:
4834 $wgDefaultUserOptions ['editondblclick'] = 0;
4838 description: 'An array of preferences to not show for the user'
4839 InvalidUsernameCharacters:
4842 Characters to prevent during new account creations.
4843 This is used in a regular expression character class during
4844 registration (regex metacharacters like / are escaped).
4845 UserrightsInterwikiDelimiter:
4848 Character used as a delimiter when testing for interwiki userrights
4849 (In Special:UserRights, it is possible to modify users on different
4850 databases if the delimiter is used, e.g. "Someuser@enwiki").
4851 It is recommended that you have this delimiter in
4852 $wgInvalidUsernameCharacters above, or you will not be able to
4853 modify the user rights of those users via Special:UserRights
4857 This is to let user authenticate using https when they come from http.
4858 Based on an idea by George Herbert on wikitech-l:
4859 https://lists.wikimedia.org/pipermail/wikitech-l/2010-October/050039.html
4861 AuthenticationTokenVersion:
4867 Versioning for authentication tokens.
4868 If non-null, this is combined with the user's secret (the user_token field
4869 in the DB) to generate the token cookie. Changing this will invalidate all
4870 active sessions (i.e. it will log everyone out).
4875 MediaWiki\Session\CookieSessionProvider: { class: MediaWiki\Session\CookieSessionProvider, args: [{ priority: 30 }] }
4876 MediaWiki\Session\BotPasswordSessionProvider: { class: MediaWiki\Session\BotPasswordSessionProvider, args: [{ priority: 75 }], services: [GrantsInfo] }
4878 MediaWiki\Session\SessionProvider configuration.
4879 Values are ObjectFactory specifications for the SessionProviders to be
4880 used. Keys in the array are ignored; the class name is conventionally
4881 used as the key to avoid collisions. Order is not significant.
4883 AllowRequiringEmailForResets:
4886 Temporary feature flag that controls whether users will see a checkbox allowing them to
4887 require providing email during password resets.
4888 @unstable This feature is under development, don't assume this flag's existence or function
4889 outside of Wikimedia.
4892 enabled: { type: boolean, default: false }
4893 actions: { type: array, default: [edit] }
4894 genPattern: { type: string, default: '*Unregistered $1' }
4895 matchPattern: { type: string, default: '*$1' }
4896 reservedPattern: { type: [string, 'null'], default: null }
4897 serialProvider: { type: object, default: { type: local } }
4898 serialMapping: { type: object, default: { type: plain-numeric } }
4899 expireAfterDays: { type: [integer, 'null'], default: null }
4900 notifyBeforeExpirationDays: { type: [integer, 'null'], default: null }
4903 Configuration for automatic creation of temporary accounts on page save.
4904 This can be enabled to avoid exposing the IP addresses of casual editors who
4905 do not explicitly create an account.
4906 EXPERIMENTAL -- enabling may break extensions.
4907 An associative array with the following keys:
4908 - enabled: (bool) Whether auto-creation is enabled.
4909 - actions: (array) A list of actions for which the feature is enabled.
4910 Currently only "edit" is supported.
4911 - genPattern: (string) The pattern used when generating new usernames.
4912 This should have "$1" indicating the place where the serial string will
4914 - matchPattern: (string) The pattern used when determining whether a
4915 username is a temporary user. This affects the rights of the user
4916 and also prevents explicit creation of users with matching names.
4917 This is ignored if "enabled" is false.
4918 - reservedPattern: (string) A pattern used to determine whether a
4919 username should be denied for explicit creation, in addition to
4920 matchPattern. This is used even if "enabled" is false.
4921 - serialProvider: (array) Configuration for generation of unique integer
4922 indexes which are used to make temporary usernames.
4923 - type: (string) May be "local" to allocate indexes using the local
4924 database. If the CentralAuth extension is enabled, it may be
4925 "centralauth". Extensions may plug in additional types using the
4926 TempUserSerialProviders attribute.
4927 - numShards (int, default 1): A small integer. This can be set to a
4928 value greater than 1 to avoid acquiring a global lock when
4929 allocating IDs, at the expense of making the IDs be non-monotonic.
4930 - serialMapping: (array) Configuration for mapping integer indexes to strings
4931 to substitute into genPattern.
4932 - type: (string) May be
4933 - "plain-numeric" to use ASCII decimal numbers
4934 - "localized-numeric" to use numbers localized using a specific language
4935 - "filtered-radix" to use numbers in an arbitrary base between 2 and 36,
4936 with an optional list of "bad" IDs to skip over.
4937 - "scramble": to use ASCII decimal numbers that are short but
4939 - language: (string) With "localized-numeric", the language code
4940 - radix: (int) With "filtered-radix", the base
4941 - badIndexes: (array) With "filtered-radix", an array with the bad unmapped
4942 indexes in the values. The integers must be sorted and the list
4943 must never change after the indexes have been allocated. The keys must
4944 be zero-based array indexes.
4945 - uppercase: (bool) With "filtered-radix", whether to use uppercase
4946 letters, default false.
4947 - offset: (int) With "plain-numeric", a constant to add to the stored index.
4948 - expireAfterDays: (int|null, default null) If set, how many days should the temporary
4949 accounts expire? Require expireTemporaryAccounts.php to be periodically executed in
4955 description: 'Number of seconds before autoblock entries expire. Default 86400 = 1 day.'
4959 Set this to true to allow blocked users to edit their own user talk page.
4960 This only applies to sitewide blocks. Partial blocks always allow users to
4961 edit their own user talk page unless otherwise specified in the block
4969 Limits on the possible sizes of range blocks.
4970 CIDR notation is hard to understand, it's easy to mistakenly assume that a
4971 /1 is a small range and a /31 is a large range. For IPv4, setting a limit of
4972 half the number of bits avoids such errors, and allows entire ISPs to be
4973 blocked using a small number of range blocks.
4974 For IPv6, RFC 3177 recommends that a /48 be allocated to every residential
4975 customer, so range blocks larger than /64 (half the number of bits) will
4976 plainly be required. RFC 4692 implies that a very large ISP may be
4977 allocated a /19 if a generous HD-Ratio of 0.8 is used, so we will use that
4978 as our limit. As of 2012, blocking the whole world would require a /4 range.
4982 If true, sitewide blocked users will not be allowed to login. (Direct
4983 blocks only; IP blocks are ignored.) This can be used to remove users'
4984 read access on a private wiki.
4985 EnablePartialActionBlocks:
4989 Flag to enable partial blocks against performing certain actions.
4990 @unstable Temporary feature flag, to be removed before the release of 1.38: T280532
4995 If this is false, the number of blocks of a given target is limited to only 1.
4997 BlockTargetMigrationStage:
5001 Ipblocks table schema migration stage, for normalizing ipb_address field and
5002 adding the block_target table.
5003 Use the SCHEMA_COMPAT_XXX flags. Supported values:
5005 - SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
5012 Pages anonymous user may see, set as an array of pages titles.
5015 $wgWhitelistRead = [ "Main Page", "Wikipedia:Help" ];
5017 Special:Userlogin and Special:ChangePassword are always allowed.
5018 @note This will only work if $wgGroupPermissions['*']['read'] is false --
5019 see below. Otherwise, ALL pages are accessible, regardless of this setting.
5020 @note Also that this will only protect _pages in the wiki_. Uploaded files
5021 will remain readable. You can use img_auth.php to protect uploaded files,
5022 see https://www.mediawiki.org/wiki/Manual:Image_Authorization
5023 @note Extensions should not modify this, but use the TitleReadWhitelist
5025 WhitelistReadRegexp:
5028 Pages anonymous user may see, set as an array of regular expressions.
5029 This function will match the regexp against the title name, which
5030 is without underscore.
5032 To whitelist [[Main Page]]:
5034 $wgWhitelistReadRegexp = [ "/Main Page/" ];
5036 @note Unless ^ and/or $ is specified, a regular expression might match
5037 pages not intended to be allowed. The above example will also
5038 allow a page named 'Security Main Page'.
5040 To allow reading any page starting with 'User' regardless of the case:
5042 $wgWhitelistReadRegexp = [ "@^UsEr.*@i" ];
5044 Will allow both [[User is banned]] and [[User:JohnDoe]]
5045 @note This will only work if $wgGroupPermissions['*']['read'] is false --
5046 see below. Otherwise, ALL pages are accessible, regardless of this setting.
5050 Should editors be required to have a validated e-mail
5051 address before being allowed to edit?
5052 HideIdentifiableRedirects:
5055 Should MediaWiki attempt to protect user's privacy when doing redirects?
5056 Keep this true if access counts to articles are made public.
5059 additionalProperties:
5061 additionalProperties: { type: boolean }
5062 mergeStrategy: array_plus_2d
5064 '*': { createaccount: true, read: true, edit: true, createpage: true, createtalk: true, writeapi: true, viewmyprivateinfo: true, editmyprivateinfo: true, editmyoptions: true }
5065 user: { move: true, move-subpages: true, move-rootuserpages: true, move-categorypages: true, movefile: true, read: true, edit: true, createpage: true, createtalk: true, writeapi: true, upload: true, reupload: true, reupload-shared: true, minoredit: true, editmyusercss: true, editmyuserjson: true, editmyuserjs: true, editmyuserjsredirect: true, sendemail: true, applychangetags: true, changetags: true, editcontentmodel: true, viewmywatchlist: true, editmywatchlist: true }
5066 autoconfirmed: { autoconfirmed: true, editsemiprotected: true }
5067 bot: { bot: true, autoconfirmed: true, editsemiprotected: true, nominornewtalk: true, autopatrol: true, suppressredirect: true, apihighlimits: true, writeapi: true }
5068 sysop: { block: true, createaccount: true, delete: true, bigdelete: true, deletedhistory: true, deletedtext: true, undelete: true, editinterface: true, editsitejson: true, edituserjson: true, import: true, importupload: true, move: true, move-subpages: true, move-rootuserpages: true, move-categorypages: true, patrol: true, autopatrol: true, protect: true, editprotected: true, rollback: true, upload: true, reupload: true, reupload-shared: true, unwatchedpages: true, autoconfirmed: true, editsemiprotected: true, ipblock-exempt: true, blockemail: true, markbotedits: true, apihighlimits: true, browsearchive: true, noratelimit: true, movefile: true, unblockself: true, suppressredirect: true, mergehistory: true, managechangetags: true, deletechangetags: true }
5069 interface-admin: { editinterface: true, editsitecss: true, editsitejson: true, editsitejs: true, editusercss: true, edituserjson: true, edituserjs: true }
5070 bureaucrat: { userrights: true, noratelimit: true, renameuser: true }
5071 suppress: { hideuser: true, suppressrevision: true, viewsuppressed: true, suppressionlog: true, deleterevision: true, deletelogentry: true }
5073 Permission keys given to users in each group.
5074 This is an array where the keys are all groups and each value is an
5075 array of the format (right => boolean).
5076 The second format is used to support per-namespace permissions.
5077 Note that this feature does not fully work for all permission types.
5078 All users are implicitly in the '*' group including anonymous visitors;
5079 logged-in users are all implicitly in the 'user' group. These will be
5080 combined with the permissions of all groups that a given user is listed
5081 in the user_groups table.
5082 Note: Don't set $wgGroupPermissions = []; unless you know what you're
5083 doing! This will wipe all permissions, and may mean that your users are
5084 unable to perform certain essential tasks or access new functionality
5085 when new permissions are introduced and default grants established.
5086 Functionality to make pages inaccessible has not been extensively tested
5087 for security. Use at your own risk!
5088 This replaces $wgWhitelistAccount and $wgWhitelistEdit
5097 List of groups which should be considered privileged (user accounts
5098 belonging in these groups can be abused in dangerous ways).
5099 This is used for some security checks, mainly logging.
5101 @see \MediaWiki\User\UserGroupManager::getUserPrivilegedGroups()
5105 mergeStrategy: array_plus_2d
5107 Permission keys revoked from users in each group.
5108 This acts the same way as $wgGroupPermissions above, except that
5109 if the user is in a group here, the permission will be removed from them.
5110 Improperly setting this could mean that your users will be unable to perform
5111 certain essential tasks, so use at your own risk!
5112 GroupInheritsPermissions:
5115 additionalProperties:
5118 Groups that should inherit permissions from another group
5119 This allows defining a group that inherits its permissions
5120 from another group without having to copy all the permission
5121 grants over. For example, if you wanted a manual "confirmed"
5122 group that had the same permissions as "autoconfirmed":
5124 $wgGroupInheritsPermissions['confirmed'] = 'autoconfirmed';
5126 Recursive inheritance is currently not supported. In the above
5127 example, confirmed will only gain the permissions explicitly
5128 granted (or revoked) from autoconfirmed, not any permissions
5129 that autoconfirmed might inherit.
5137 description: 'Implicit groups, aren''t shown on Special:Listusers or somewhere else'
5142 A map of group names that the user is in, to group names that those users
5143 are allowed to add or revoke.
5144 Setting the list of groups to add or revoke to true is equivalent to "any
5147 To allow sysops to add themselves to the "bot" group:
5149 $wgGroupsAddToSelf = [ 'sysop' => [ 'bot' ] ];
5152 Implicit groups may be used for the source group, for instance:
5154 $wgGroupsRemoveFromSelf = [ '*' => true ];
5156 This allows users in the '*' group (i.e. any user) to remove themselves from
5157 any group that they happen to be in.
5158 GroupsRemoveFromSelf:
5161 description: '@see self::GroupsAddToSelf'
5170 Set of available actions that can be restricted via action=protect
5171 You probably shouldn't change this.
5172 Translated through restriction-* messages.
5173 RestrictionStore::listApplicableRestrictionTypes() will remove restrictions that are not
5174 applicable to a specific title (create and upload)
5182 Rights which can be required for each protection level (via action=protect)
5183 You can add a new protection level that requires a specific
5184 permission by manipulating this array. The ordering of elements
5185 dictates the order on the protection form's lists.
5186 - '' will be ignored (i.e. unprotected)
5187 - 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility
5188 - 'sysop' is quietly rewritten to 'editprotected' for backwards compatibility
5189 CascadingRestrictionLevels:
5194 Restriction levels that can be used with cascading protection
5195 A page can only be protected with cascading protection if the
5196 requested restriction level is included in this array.
5197 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility.
5198 'sysop' is quietly rewritten to 'editprotected' for backwards compatibility.
5199 SemiprotectedRestrictionLevels:
5204 Restriction levels that should be considered "semiprotected"
5205 Certain places in the interface recognize a dichotomy between "protected"
5206 and "semiprotected", without further distinguishing the specific levels. In
5207 general, if anyone can be eligible to edit a protection level merely by
5208 reaching some condition in $wgAutopromote, it should probably be considered
5210 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility.
5211 'sysop' is not changed, since it really shouldn't be here.
5212 NamespaceProtection:
5216 Set the minimum permissions required to edit pages in each
5217 namespace. If you list more than one permission, a user must
5218 have all of them to edit pages in that namespace.
5219 @note NS_MEDIAWIKI is implicitly restricted to 'editinterface'.
5220 NonincludableNamespaces:
5224 Pages in namespaces in this array can not be used as templates.
5225 Elements MUST be numeric namespace ids, you can safely use the MediaWiki
5226 namespaces constants (NS_USER, NS_MAIN...).
5227 Among other things, this may be useful to enforce read-restrictions
5228 which may otherwise be bypassed by using the template mechanism.
5232 Number of seconds an account is required to age before it's given the
5233 implicit 'autoconfirm' group membership. This can be used to limit
5234 privileges of new accounts.
5235 Accounts created by earlier versions of the software may not have a
5236 recorded creation date, and will always be considered to pass the age test.
5237 When left at 0, all registered accounts will pass.
5239 Set automatic confirmation to 10 minutes (which is 600 seconds):
5241 $wgAutoConfirmAge = 600; // ten minutes
5245 $wgAutoConfirmAge = 3600*24; // one day
5250 Number of edits an account requires before it is autoconfirmed.
5251 Passing both this AND the time requirement is needed. Example:
5254 $wgAutoConfirmCount = 50;
5258 autoconfirmed: ['&', [1, null], [2, null]]
5261 Array containing the conditions of automatic promotion of a user to specific groups.
5262 The basic syntax for `$wgAutopromote` is:
5264 'groupname' => cond,
5268 - a single condition without arguments:
5269 Note that Autopromote wraps a single non-array value into an array
5270 e.g. `APCOND_EMAILCONFIRMED` OR
5271 [ `APCOND_EMAILCONFIRMED` ]
5272 - a single condition with arguments:
5273 e.g. `[ APCOND_EDITCOUNT, 100 ]`
5274 - a set of conditions:
5275 e.g. `[ 'operand', cond1, cond2, ... ]`
5276 When constructing a set of conditions, the following conditions are available:
5278 promote if user matches **ALL** conditions
5280 promote if user matches **ANY** condition
5282 promote if user matches **ONLY ONE OF THE CONDITIONS**
5284 promote if user matces **NO** condition
5285 - [ APCOND_EMAILCONFIRMED ]:
5286 true if user has a confirmed e-mail
5287 - [ APCOND_EDITCOUNT, number of edits (if null or missing $wgAutoConfirmCount will be used)]:
5288 true if user has the at least the number of edits as the passed parameter
5289 - [ APCOND_AGE, seconds since registration (if null or missing $wgAutoConfirmAge will be used)]:
5290 true if the length of time since the user created his/her account
5291 is at least the same length of time as the passed parameter
5292 - [ APCOND_AGE_FROM_EDIT, seconds since first edit ]:
5293 true if the length of time since the user made his/her first edit
5294 is at least the same length of time as the passed parameter
5295 - [ APCOND_INGROUPS, group1, group2, ... ]:
5296 true if the user is a member of each of the passed groups
5297 - [ APCOND_ISIP, ip ]:
5298 true if the user has the passed IP address
5299 - [ APCOND_IPINRANGE, range ]:
5300 true if the user has an IP address in the range of the passed parameter
5301 - [ APCOND_BLOCKED ]:
5302 true if the user is sitewide blocked
5304 true if the user is a bot
5305 - similar constructs can be defined by extensions
5306 The sets of conditions are evaluated recursively, so you can use nested sets of conditions
5308 Note that if $wgEmailAuthentication is disabled, APCOND_EMAILCONFIRMED will be true for any
5309 user who has provided an e-mail address.
5315 Automatically add a usergroup to any user who matches certain conditions.
5316 Does not add the user to the group again if it has been removed.
5317 Also, does not remove the group if the user no longer meets the criteria.
5320 [ event => criteria, ... ]
5322 Where event is either:
5323 - 'onEdit' (when user edits)
5324 Criteria has the same format as $wgAutopromote
5325 @see self::Autopromote
5327 AutopromoteOnceLogInRC:
5330 Put user rights log entries for autopromotion in recent changes?
5336 $wgAddGroups and $wgRemoveGroups can be used to give finer control over who
5337 can assign which groups at Special:Userrights.
5339 Bureaucrats can add any group:
5341 $wgAddGroups['bureaucrat'] = true;
5343 Bureaucrats can only remove bots and sysops:
5345 $wgRemoveGroups['bureaucrat'] = [ 'bot', 'sysop' ];
5347 Sysops can make bots:
5349 $wgAddGroups['sysop'] = [ 'bot' ];
5351 Sysops can disable other sysops in an emergency, and disable bots:
5353 $wgRemoveGroups['sysop'] = [ 'sysop', 'bot' ];
5358 description: '@see self::AddGroups'
5365 A list of available rights, in addition to the ones defined by the core.
5366 Rights in this list are denied unless explicitly granted, typically
5367 using GroupPermissions.
5368 For extensions only.
5369 @see self::GroupPermissions
5370 @see self::ImplicitRights
5377 A list of implicit rights, in addition to the ones defined by the core.
5378 Rights in this list are granted implicitly to all users, but rate limits
5380 Extensions that define rate limits should add the corresponding right to
5381 either ImplicitRights or AvailableRights, depending on whether the right
5382 should be granted to everyone.
5384 @see self::RateLimits
5385 @see self::AvailableRights
5386 DeleteRevisionsLimit:
5389 Optional to restrict deletion of pages with higher revision counts
5390 to users with the 'bigdelete' permission. (Default given to sysops.)
5391 DeleteRevisionsBatchSize:
5394 Page deletions with > this number of revisions will use the job queue.
5395 Revisions will be archived in batches of (at most) this size, one batch per job.
5396 HideUserContribLimit:
5399 The maximum number of edits a user can have and
5400 can still be hidden by users with the hideuser permission.
5401 This is limited for performance reason.
5402 Set to false to disable the limit.
5404 AccountCreationThrottle:
5406 - { count: 0, seconds: 86400 }
5411 Number of accounts each IP address may create per specified period(s).
5414 $wgAccountCreationThrottle = [
5415 // no more than 100 per month
5418 'seconds' => 30*86400,
5420 // no more than 10 per day
5427 @note For backwards compatibility reasons, this may also be given as a single
5428 integer, representing the number of account creations per day.
5429 @warning Requires $wgMainCacheType to be enabled
5434 Edits matching these regular expressions in body text
5435 will be recognised as spam and rejected automatically.
5436 There's no administrator override on-wiki, so be careful what you set. :)
5437 May be an array of regexes or a single string for backwards compatibility.
5438 @see https://en.wikipedia.org/wiki/Regular_expression
5439 @note Each regex needs a beginning/end delimiter, eg: # or /
5443 description: 'Same as SpamRegex except for edit summaries'
5447 Whether to use DNS blacklists in $wgDnsBlacklistUrls to check for open
5452 - http.dnsbl.sorbs.net.
5455 List of DNS blacklists to use, if $wgEnableDnsBlacklist is true.
5456 This is an array of either a URL or an array with the URL and a key (should
5457 the blacklist require a key).
5460 $wgDnsBlacklistUrls = [
5461 // String containing URL
5462 'http.dnsbl.sorbs.net.',
5463 // Array with URL and key, for services that require a key
5464 [ 'dnsbl.httpbl.net.', 'mykey' ],
5465 // Array with just the URL. While this works, it is recommended that you
5466 // just use a string as shown above
5467 [ 'opm.tornevall.org.' ]
5470 @note You should end the domain name with a . to avoid searching your
5471 eventual domain search suffixes.
5479 List of banned IP addresses.
5480 This can have the following formats:
5481 - An array of addresses
5482 - A string, in which case this is the path to a file
5483 containing the list of IP addresses, one per line
5488 Proxy whitelist, list of addresses that are assumed to be non-proxy despite
5489 what the other methods might say.
5496 IP ranges that should be considered soft-blocked (anon-only, account
5497 creation allowed). The intent is to use this to prevent anonymous edits from
5498 shared resources such as Wikimedia Labs.
5503 Whether to look at the X-Forwarded-For header's list of (potentially spoofed)
5504 IPs and apply IP blocks to them. This allows for IP blocks to work with correctly-configured
5505 (transparent) proxies without needing to block the proxies themselves.
5508 edit: { ip: [8, 60], newbie: [8, 60], user: [90, 60] }
5509 move: { newbie: [2, 120], user: [8, 60] }
5510 upload: { ip: [8, 60], newbie: [8, 60] }
5511 rollback: { user: [10, 60], newbie: [5, 120] }
5512 mailpassword: { ip: [5, 3600] }
5513 sendemail: { ip: [5, 86400], newbie: [5, 86400], user: [20, 86400] }
5514 changeemail: { ip-all: [10, 3600], user: [4, 86400] }
5515 confirmemail: { ip-all: [10, 3600], user: [4, 86400] }
5516 purge: { ip: [30, 60], user: [30, 60] }
5517 linkpurge: { ip: [30, 60], user: [30, 60] }
5518 renderfile: { ip: [700, 30], user: [700, 30] }
5519 renderfile-nonstandard: { ip: [70, 30], user: [70, 30] }
5520 stashedit: { ip: [30, 60], newbie: [30, 60] }
5521 stashbasehtml: { ip: [5, 60], newbie: [5, 60] }
5522 changetags: { ip: [8, 60], newbie: [8, 60] }
5523 editcontentmodel: { newbie: [2, 120], user: [8, 60] }
5525 mergeStrategy: array_plus_2d
5527 Simple rate limiter options to brake edit floods.
5528 Maximum number actions allowed in the given number of seconds; after that
5529 the violating client receives HTTP 500 error pages until the period
5532 Limits per configured per action and then type of users.
5536 'anon' => [ x, y ], // any and all anonymous edits (aggregate)
5537 'user' => [ x, y ], // each logged-in user
5538 'user-global' => [ x, y ], // per username, across all sites (assumes names are
5540 'newbie' => [ x, y ], // each new autoconfirmed accounts; overrides 'user'
5541 'ip' => [ x, y ], // each anon and recent account, across all sites
5542 'subnet' => [ x, y ], // ... within a /24 subnet in IPv4 or /64 in IPv6
5543 'ip-all' => [ x, y ], // per ip, across all sites
5544 'subnet-all' => [ x, y ], // ... within a /24 subnet in IPv4 or /64 in IPv6
5545 'groupName' => [ x, y ], // by group membership
5549 **Normally, the 'noratelimit' right allows a user to bypass any rate**
5550 limit checks. This can be disabled on a per-action basis by setting the
5551 special '&can-bypass' key to false in that action's configuration.
5555 '&can-bypass' => false,
5559 @see self::ImplicitRights
5560 @warning Requires that $wgMainCacheType is set to something persistent
5561 RateLimitsExcludedIPs:
5565 Array of IPs / CIDR ranges which should be excluded from rate limits.
5566 This may be useful for allowing NAT gateways for conferences, etc.
5570 Log IP addresses in the recentchanges table; can be accessed only by
5571 extensions (e.g. CheckUser) or a DB admin
5572 Used for retroactive autoblocks
5573 QueryPageDefaultLimit:
5576 Integer defining default number of entries to show on
5577 special pages which are query-pages such as Special:Whatlinkshere.
5578 PasswordAttemptThrottle:
5580 - { count: 5, seconds: 300 }
5581 - { count: 150, seconds: 172800 }
5584 Limit password attempts to X attempts per Y seconds per IP per account.
5585 Value is an array of arrays. Each sub-array must have a key for count
5586 (ie count of how many attempts before throttle) and a key for seconds.
5587 If the key 'allIPs' (case sensitive) is present, then the limit is
5588 just per account instead of per IP per account.
5589 @since 1.27 allIps support and multiple limits added in 1.27. Prior
5590 to 1.27 this only supported having a single throttle.
5591 @warning Requires $wgMainCacheType to be enabled
5594 basic: { autocreateaccount: true, autoconfirmed: true, autopatrol: true, editsemiprotected: true, ipblock-exempt: true, nominornewtalk: true, patrolmarks: true, read: true, writeapi: true, unwatchedpages: true }
5595 highvolume: { bot: true, apihighlimits: true, noratelimit: true, markbotedits: true }
5596 import: { import: true, importupload: true }
5597 editpage: { edit: true, minoredit: true, applychangetags: true, changetags: true, editcontentmodel: true }
5598 editprotected: { edit: true, minoredit: true, applychangetags: true, changetags: true, editcontentmodel: true, editprotected: true }
5599 editmycssjs: { edit: true, minoredit: true, applychangetags: true, changetags: true, editcontentmodel: true, editmyusercss: true, editmyuserjson: true, editmyuserjs: true }
5600 editmyoptions: { editmyoptions: true, editmyuserjson: true }
5601 editinterface: { edit: true, minoredit: true, applychangetags: true, changetags: true, editcontentmodel: true, editinterface: true, edituserjson: true, editsitejson: true }
5602 editsiteconfig: { edit: true, minoredit: true, applychangetags: true, changetags: true, editcontentmodel: true, editinterface: true, edituserjson: true, editsitejson: true, editusercss: true, edituserjs: true, editsitecss: true, editsitejs: true }
5603 createeditmovepage: { edit: true, minoredit: true, applychangetags: true, changetags: true, editcontentmodel: true, createpage: true, createtalk: true, delete-redirect: true, move: true, move-rootuserpages: true, move-subpages: true, move-categorypages: true, suppressredirect: true }
5604 uploadfile: { upload: true, reupload-own: true }
5605 uploadeditmovefile: { upload: true, reupload-own: true, reupload: true, reupload-shared: true, upload_by_url: true, movefile: true, suppressredirect: true }
5606 patrol: { patrol: true }
5607 rollback: { rollback: true }
5608 blockusers: { block: true, blockemail: true }
5609 viewdeleted: { browsearchive: true, deletedhistory: true, deletedtext: true }
5610 viewrestrictedlogs: { suppressionlog: true }
5611 delete: { edit: true, minoredit: true, applychangetags: true, changetags: true, editcontentmodel: true, browsearchive: true, deletedhistory: true, deletedtext: true, delete: true, bigdelete: true, deletelogentry: true, deleterevision: true, undelete: true }
5612 oversight: { suppressrevision: true, viewsuppressed: true }
5613 protect: { edit: true, minoredit: true, applychangetags: true, changetags: true, editcontentmodel: true, editprotected: true, protect: true }
5614 viewmywatchlist: { viewmywatchlist: true }
5615 editmywatchlist: { editmywatchlist: true }
5616 sendemail: { sendemail: true }
5617 createaccount: { createaccount: true }
5618 privateinfo: { viewmyprivateinfo: true }
5619 mergehistory: { mergehistory: true }
5621 mergeStrategy: array_plus_2d
5622 additionalProperties:
5624 additionalProperties: { type: boolean }
5626 Users authorize consumers (like Apps) to act on their behalf but only with
5627 a subset of the user's normal account rights (signed off on by the user).
5628 The possible rights to grant to a consumer are bundled into groups called
5629 "grants". Each grant defines some rights it lets consumers inherit from the
5630 account they may act on behalf of. Note that a user granting a right does
5631 nothing if that user does not actually have that right to begin with.
5633 GrantPermissionGroups:
5636 editpage: page-interaction
5637 createeditmovepage: page-interaction
5638 editprotected: page-interaction
5639 patrol: page-interaction
5640 uploadfile: file-interaction
5641 uploadeditmovefile: file-interaction
5643 viewmywatchlist: watchlist-interaction
5644 editviewmywatchlist: watchlist-interaction
5645 editmycssjs: customization
5646 editmyoptions: customization
5647 editinterface: administration
5648 editsiteconfig: administration
5649 rollback: administration
5650 blockusers: administration
5651 delete: administration
5652 viewdeleted: administration
5653 viewrestrictedlogs: administration
5654 protect: administration
5655 oversight: administration
5656 createaccount: administration
5657 mergehistory: administration
5658 import: administration
5659 highvolume: high-volume
5660 privateinfo: private-information
5662 additionalProperties:
5665 Grant groups are used on some user interfaces to display conceptually
5666 similar grants together.
5667 This configuration value should usually be set by extensions, not
5668 site administrators.
5669 @see self::GrantPermissions
5674 description: '@since 1.27'
5675 BotPasswordsCluster:
5681 Cluster for the bot_passwords table
5683 BotPasswordsDatabase:
5689 Database name for the bot_passwords table
5690 To use a database with a table prefix, set this variable to
5691 "{$database}-{$prefix}".
5695 description: 'This should always be customised in LocalSettings.php'
5699 Allow user Javascript page?
5700 This enables a lot of neat customizations, but may
5701 increase security risk to users and server load.
5705 Allow user Cascading Style Sheets (CSS)?
5706 This enables a lot of neat customizations, but may
5707 increase security risk to users and server load.
5711 Allow style-related user-preferences?
5712 This controls whether the `editfont` and `underline` preferences
5713 are available to users.
5716 description: 'Use the site''s Javascript page?'
5719 description: 'Use the site''s Cascading Style Sheets (CSS)?'
5723 Break out of framesets. This can be used to prevent clickjacking attacks,
5724 or to prevent external sites from framing your site with ads.
5725 EditPageFrameOptions:
5728 The X-Frame-Options header to send on pages sensitive to clickjacking
5729 attacks, such as edit pages. This prevents those pages from being displayed
5730 in a frame or iframe. The options are:
5731 - 'DENY': Do not allow framing. This is recommended for most wikis.
5732 - 'SAMEORIGIN': Allow framing by pages on the same domain. This can be used
5733 to allow framing within a trusted domain. This is insecure if there
5734 is a page on the same domain which allows framing of arbitrary URLs.
5735 - false: Allow all framing. This opens up the wiki to XSS attacks and thus
5736 full compromise of local user accounts. Private wikis behind a
5737 corporate firewall are especially vulnerable. This is not
5739 For extra safety, set $wgBreakFrames = true, to prevent framing on all pages,
5740 not just edit pages.
5744 Disallow framing of API pages directly, by setting the X-Frame-Options
5745 header. Since the API returns CSRF tokens, allowing the results to be
5746 framed can compromise your user's account security.
5748 - 'DENY': Do not allow framing. This is recommended for most wikis.
5749 - 'SAMEORIGIN': Allow framing by pages on the same domain.
5750 - false: Allow all framing.
5751 Note: $wgBreakFrames will override this for human formatted API output.
5758 Controls Content-Security-Policy header [Experimental]
5759 @see https://www.w3.org/TR/CSP2/
5761 @warning May cause slowness on Windows due to slow random number generator.
5762 CSPReportOnlyHeader:
5768 Controls Content-Security-Policy-Report-Only header
5770 CSPFalsePositiveUrls:
5772 'https://3hub.co': true
5773 'https://morepro.info': true
5774 'https://p.ato.mx': true
5775 'https://s.ato.mx': true
5776 'https://adserver.adtech.de': true
5777 'https://ums.adtechus.com': true
5778 'https://cas.criteo.com': true
5779 'https://cat.nl.eu.criteo.com': true
5780 'https://atpixel.alephd.com': true
5781 'https://rtb.metrigo.com': true
5782 'https://d5p.de17a.com': true
5783 'https://ad.lkqd.net/vpaid/vpaid.js': true
5784 'https://ad.lkqd.net/vpaid/vpaid.js?fusion=1.0': true
5785 'https://t.lkqd.net/t': true
5786 chrome-extension: true
5789 List of urls which appear often to be triggering CSP reports
5790 but do not appear to be caused by actual content, but by client
5791 software inserting scripts (i.e. Ad-Ware).
5792 List based on results from Wikimedia logs.
5798 Allow anonymous cross origin requests.
5799 This should be disabled for intranet sites (sites behind a firewall).
5801 RestAllowCrossOriginCookieAuth:
5805 Allows authenticated cross-origin requests to the REST API with session cookies.
5806 With this option enabled, any origin specified in $wgCrossSiteAJAXdomains may send session
5807 cookies for authorization in the REST API.
5808 There is a performance impact by enabling this option. Therefore, it should be left disabled
5809 for most wikis and clients should instead use OAuth to make cross-origin authenticated
5811 @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials
5816 Secret for session storage.
5817 This should be set in LocalSettings.php, otherwise $wgSecretKey will
5820 SessionInsecureSecrets:
5823 If for some reason you can't install the PHP OpenSSL extension,
5824 you can set this to true to make MediaWiki work again at the cost of storing
5825 sensitive session data insecurely. But it would be much more secure to just
5826 install the OpenSSL extension.
5831 Secret for hmac-based key derivation function (fast,
5832 cryptographically secure random numbers).
5833 This should be set in LocalSettings.php, otherwise $wgSecretKey will
5835 See also: $wgHKDFAlgorithm
5840 Algorithm for hmac-based key derivation function (fast,
5841 cryptographically secure random numbers).
5842 See also: $wgHKDFSecret
5846 description: 'Default cookie lifetime, in seconds. Setting to 0 makes all cookies session-only.'
5847 ExtendedLoginCookieExpiration:
5850 Default login cookie lifetime, in seconds. Setting
5851 $wgExtendLoginCookieExpiration to null will use $wgCookieExpiration to
5852 calculate the cookie lifetime. As with $wgCookieExpiration, 0 will make
5853 login cookies session-only.
5857 Set to set an explicit domain on the login cookies eg, "justthis.domain.org"
5858 or ".any.subdomain.net"
5862 Set this variable if you want to restrict cookies to a certain path within
5863 the domain specified by $wgCookieDomain.
5868 callback: [MediaWiki\MainConfigSchema, getDefaultCookieSecure]
5870 Whether the "secure" flag should be set on the cookie. This can be:
5871 - true: Set secure flag
5872 - false: Don't set secure flag
5873 - "detect": Set the secure flag if $wgServer is set to an HTTPS URL,
5874 or if $wgForceHTTPS is true.
5875 If $wgForceHTTPS is true, session cookies will be secure regardless of this
5876 setting. However, other cookies will still be affected.
5880 use: [SharedDB, SharedPrefix, SharedTables, DBname, DBprefix]
5881 callback: [MediaWiki\MainConfigSchema, getDefaultCookiePrefix]
5883 Cookies generated by MediaWiki have names starting with this prefix. Set it
5884 to a string to use a custom prefix. Setting it to false causes the database
5885 name to be used as a prefix.
5889 Set authentication cookies to HttpOnly to prevent access by JavaScript,
5890 in browsers that support this feature. This can mitigates some classes of
5898 The SameSite cookie attribute used for login cookies. This can be "Lax",
5899 "Strict", "None" or empty/null to omit the attribute.
5900 This only applies to login cookies, since the correct value for other
5901 cookies depends on what kind of cookie it is.
5903 UseSameSiteLegacyCookies:
5907 If true, when a cross-site cookie with SameSite=None is sent, a legacy
5908 cookie with an "ss0" prefix will also be sent, without SameSite=None. This
5909 is a workaround for broken behaviour in Chrome 51-66 and similar browsers.
5914 description: 'A list of cookies that vary the cache (for use by extensions)'
5917 description: 'Override to customise the session name'
5918 CookieSetOnAutoblock:
5921 Whether to set a cookie when a user is autoblocked. Doing so means that a blocked user, even
5922 after logging out and moving to a new IP address, will still be blocked. This cookie will
5923 contain an authentication code if $wgSecretKey is set, or otherwise will just be the block
5924 ID (in which case there is a possibility of an attacker discovering the names of revdeleted
5925 users, so it is best to use this in conjunction with $wgSecretKey being set).
5929 Whether to set a cookie when a logged-out user is blocked. Doing so means that a blocked
5930 user, even after moving to a new IP address, will still be blocked. This cookie will contain
5931 an authentication code if $wgSecretKey is set, or otherwise will just be the block ID (in
5932 which case there is a possibility of an attacker discovering the names of revdeleted users,
5933 so it is best to use this in conjunction with $wgSecretKey being set).
5937 Enable verbose debug logging for all channels and log levels.
5938 See https://www.mediawiki.org/wiki/How_to_debug
5939 For static requests, this enables all channels and warning-level and
5940 above only. Use $wgDebugRawPage to make those verbose as well.
5941 The debug log file should be not be web-accessible if it is used in
5942 a production environment, as may contain private data.
5945 description: 'Prefix for debug log lines'
5949 If true, instead of redirecting, show a page with a link to the redirect
5950 destination. This allows for the inspection of PHP error messages, and easy
5951 resubmission of form data. For developer use only.
5955 If true, debug logging is also enabled for load.php and action=raw requests.
5956 By default, $wgDebugLogFile enables all channels and warning-level and
5957 above for static requests.
5958 This ensures that the debug log is likely a chronological record of
5959 of specific web request you are debugging, instead of overlapping with
5960 messages from static requests, which would make it unclear which message
5961 originated from what request.
5962 Also, during development this can make browsing and JavaScript testing
5963 considerably slower (T85805).
5967 Send debug data to an HTML comment in the output.
5968 This may occasionally be useful when supporting a non-technical end-user.
5969 It's more secure than exposing the debug log file to the web, since the
5970 output only contains private data for the current user. But it's not ideal
5971 for development use since data is lost on fatal errors and redirects.
5975 Write SQL queries to the debug log.
5976 This setting is only used $wgLBFactoryConf['class'] is set to
5977 '\Wikimedia\Rdbms\LBFactorySimple'; otherwise the DBO_DEBUG flag must be set in
5978 the 'flags' option of the database connection to achieve the same functionality.
5981 GET: { masterConns: 0, writes: 0, readQueryTime: 5, readQueryRows: 10000 }
5982 POST: { readQueryTime: 5, writeQueryTime: 1, readQueryRows: 100000, maxAffected: 1000 }
5983 POST-nonwrite: { writes: 0, readQueryTime: 5, readQueryRows: 10000 }
5984 PostSend-GET: { readQueryTime: 5, writeQueryTime: 1, readQueryRows: 10000, maxAffected: 1000, masterConns: 0, writes: 0 }
5985 PostSend-POST: { readQueryTime: 5, writeQueryTime: 1, readQueryRows: 100000, maxAffected: 1000 }
5986 JobRunner: { readQueryTime: 30, writeQueryTime: 5, readQueryRows: 100000, maxAffected: 500 }
5987 Maintenance: { writeQueryTime: 5, maxAffected: 1000 }
5990 Performance expectations for DB usage
5996 Map of string log group names to log destinations.
5997 If set, wfDebugLog() output for that group will go to that file instead
5998 of the regular $wgDebugLogFile. Useful for enabling selective logging
6000 Log destinations may be one of the following:
6001 - false to completely remove from the output, including from $wgDebugLogFile.
6002 - string values specifying a filename or URI.
6003 - associative array with keys:
6004 - 'destination' desired filename or URI.
6005 - 'sample' an integer value, specifying a sampling factor (optional)
6006 - 'level' A \Psr\Log\LogLevel constant, indicating the minimum level
6007 to log (optional, since 1.25)
6010 $wgDebugLogGroups['redis'] = '/var/log/mediawiki/redis.log';
6012 **Advanced example:**
6014 $wgDebugLogGroups['memcached'] = [
6015 'destination' => '/var/log/mediawiki/memcached.log',
6016 'sample' => 1000, // log 1 message out of every 1,000.
6017 'level' => \Psr\Log\LogLevel::WARNING
6022 class: MediaWiki\Logger\LegacySpi
6023 mergeStrategy: replace
6026 Default service provider for creating Psr\Log\LoggerInterface instances.
6027 The value should be an array suitable for use with
6028 ObjectFactory::getObjectFromSpec(). The created object is expected to
6029 implement the MediaWiki\Logger\Spi interface. See ObjectFactory for additional
6031 Alternately the MediaWiki\Logger\LoggerFactory::registerProvider method can
6032 be called to inject an MediaWiki\Logger\Spi instance into the LoggerFactory
6033 and bypass the use of this configuration variable entirely.
6034 **To completely disable logging:**
6036 $wgMWLoggerDefaultSpi = [ 'class' => \MediaWiki\Logger\NullSpi::class ];
6043 Display debug data at the bottom of the main content area.
6044 Useful for developers and technical users trying to working on a closed wiki.
6045 SpecialVersionShowHooks:
6047 description: 'Show the contents of $wgHooks in Special:Version'
6048 ShowExceptionDetails:
6051 Show exception message and stack trace when printing details about uncaught exceptions
6052 in web response output.
6053 This may reveal private information in error messages or function parameters.
6054 If set to false, only the exception type or class name will be exposed.
6055 LogExceptionBacktrace:
6057 description: 'If true, send the exception backtrace to the error log'
6061 If true, the MediaWiki error handler passes errors/warnings to the default error handler
6062 after logging them. The setting is ignored when the track_errors php.ini flag is true.
6065 description: 'Expose backend server host names through the API and various HTML comments'
6069 Override server hostname detection with a hardcoded value.
6070 Should be a string, default false.
6072 DevelopmentWarnings:
6075 If set to true MediaWiki will throw notices for some possible error
6076 conditions and for deprecated functions.
6077 DeprecationReleaseLimit:
6080 Release limitation to wfDeprecated warnings, if set to a release number
6081 development warnings will not be generated for deprecations added in releases
6086 mergeStrategy: replace
6088 Profiler configuration.
6089 To use a profiler, set $wgProfiler in LocalSettings.php.
6091 - 'class' (`string`): The Profiler subclass to use.
6092 Default: ProfilerStub.
6093 - 'sampling' (`integer`): Only enable the profiler on one in this many requests.
6094 For requests that are not in the sampling,
6095 the 'class' option will be replaced with ProfilerStub.
6097 - 'threshold' (`float`): Only process the recorded data if the total elapsed
6098 time for a request is more than this number of seconds.
6100 - 'output' (`string|string[]`): ProfilerOutput subclass or subclasess to use.
6102 The options array is passed in its entirety to the specified
6103 Profiler `class`. Check individual Profiler subclasses for additional
6104 options that may be available.
6105 Profiler subclasses available in MediaWiki core:
6106 - ProfilerXhprof: Based on XHProf or Tideways-XHProf.
6107 - ProfilerExcimer: Based on Excimer.
6108 - ProfilerSectionOnly
6109 Profiler output classes available in MediaWiki:
6110 - ProfilerOutputText: outputs profiling data in the web page body as
6111 a comment. You can make the profiling data in HTML render visibly
6112 instead by setting the 'visible' configuration flag.
6113 - ProfilerOutputStats: outputs profiling data as StatsD metrics.
6114 It expects that $wgStatsdServer is set to the host (or host:port)
6116 - ProfilerOutputDump: outputs dump files that are compatible
6117 with the XHProf gui. It expects that `$wgProfiler['outputDir']`
6122 'class' => ProfilerXhprof::class,
6123 'output' => ProfilerOutputText::class,
6128 'class' => ProfilerXhprof::class,
6129 'output' => [ ProfilerOutputText::class ],
6130 'sampling' => 50, // one in every 50 requests
6133 For performance, the profiler is always disabled for CLI scripts as they
6134 could be long running and the data would accumulate. Use the `--profiler`
6135 parameter of maintenance scripts to override this.
6140 Destination of statsd metrics.
6141 A host or host:port of a statsd server. Port defaults to 8125.
6142 If not set, statsd metrics will not be collected.
6143 @see MediaWiki::emitBufferedStatsdData()
6148 Prefix for metric names sent to $wgStatsdServer.
6149 @see \MediaWiki\MediaWikiServices::getInstance()->getStatsdDataFactory
6150 @see \BufferingStatsdDataFactory
6152 StatsdSamplingRates:
6156 Sampling rate for statsd metrics as an associative array of patterns and rates.
6157 Patterns are Unix shell patterns (e.g. 'MediaWiki.api.*').
6158 Rates are sampling probabilities (e.g. 0.1 means 1 in 10 events are sampled).
6166 Stats output target URI e.g. udp://127.0.0.1:8125
6167 If null, metrics will not be sent.
6168 Note: this only affects metrics instantiated by the StatsFactory service
6177 If null, metrics will not be rendered nor sent.
6178 Note: this only affects metrics instantiated by the StatsFactory service
6179 @see \Wikimedia\Stats\OutputFormats::SUPPORTED_FORMATS
6185 Stats service name prefix
6186 Required. Must not be zero-length.
6187 Defaults to: 'mediawiki'
6188 Note: this only affects metrics instantiated by the StatsFactory service
6190 PageInfoTransclusionLimit:
6193 InfoAction retrieves a list of transclusion links (both to and from).
6194 This number puts a limit on that query in the case of highly transcluded
6196 EnableJavaScriptTest:
6198 description: 'Allow running of QUnit tests via [[Special:JavaScriptTest]].'
6202 Overwrite the caching key prefix with custom value.
6207 Display the new debugging toolbar. This also enables profiling on database
6208 queries and other useful output.
6209 Will be ignored if $wgUseFileCache or $wgUseCdn is enabled.
6213 description: 'Set this to true to disable the full text search feature.'
6214 AdvancedSearchHighlighting:
6217 Set to true to have nicer highlighted text in search results,
6218 by default off due to execution overhead
6219 SearchHighlightBoundaries:
6220 default: '[\p{Z}\p{P}\p{C}]'
6222 Regexp to match word boundaries, defaults for non-CJK languages
6223 should be empty for CJK since the words are not separate
6227 since 1.25 Use $wgOpenSearchTemplates['application/x-suggestions+json']
6230 Template for OpenSearch suggestions, defaults to API action=opensearch
6231 Sites with heavy load would typically have these point to a custom
6232 PHP wrapper to avoid firing up mediawiki for every keystroke
6233 Placeholders: {searchTerms}
6234 @deprecated since 1.25 Use $wgOpenSearchTemplates['application/x-suggestions+json'] instead
6235 OpenSearchTemplates:
6237 application/x-suggestions+json: false
6238 application/x-suggestions+xml: false
6241 Templates for OpenSearch suggestions, defaults to API action=opensearch
6242 Sites with heavy load would typically have these point to a custom
6243 PHP wrapper to avoid firing up mediawiki for every keystroke
6244 Placeholders: {searchTerms}
6245 OpenSearchDefaultLimit:
6248 Integer defining default number of entries to show on
6250 OpenSearchDescriptionLength:
6253 Minimum length of extract in <Description>. Actual extracts will last until the end of
6255 SearchSuggestCacheExpiry:
6257 description: 'Expiry time for search suggestion responses'
6258 DisableSearchUpdate:
6261 If you've disabled search semi-permanently, this also disables updates to the
6262 table. If you ever re-enable, be sure to rebuild the search table.
6263 NamespacesToBeSearchedDefault:
6268 List of namespaces which are searched by default.
6271 $wgNamespacesToBeSearchedDefault[NS_MAIN] = true;
6272 $wgNamespacesToBeSearchedDefault[NS_PROJECT] = true;
6274 DisableInternalSearch:
6277 Disable the internal MySQL-based search, to allow it to be
6278 implemented by an extension instead.
6282 Set this to a URL to forward search requests to some external location.
6283 If the URL includes '$1', this will be replaced with the URL-encoded
6284 search term. Before using this, $wgDisableTextSearch must be set to true.
6286 To forward to Google you'd have something like:
6288 $wgSearchForwardUrl =
6289 'https://www.google.com/search?q=$1' .
6290 '&domains=https://example.com' .
6291 '&sitesearch=https://example.com' .
6292 '&ie=utf-8&oe=utf-8';
6300 Array of namespaces to generate a Google sitemap for when the
6301 maintenance/generateSitemap.php script is run, or false if one is to be
6302 generated for all namespaces.
6303 SitemapNamespacesPriorities:
6309 Custom namespace priorities for sitemaps. Setting this will allow you to
6310 set custom priorities to namespaces when sitemaps are generated using the
6311 maintenance/generateSitemap.php script.
6312 This should be a map of namespace IDs to priority
6315 $wgSitemapNamespacesPriorities = [
6320 EnableSearchContributorsByIP:
6323 If true, searches for IP addresses will be redirected to that IP's
6324 contributions page. E.g. searching for "1.2.3.4" will redirect to
6325 [[Special:Contributions/1.2.3.4]]
6326 SpecialSearchFormOptions:
6330 Options for Special:Search completion widget form created by SearchFormWidget class.
6331 Settings that can be used:
6332 - showDescriptions: true/false - whether to show opensearch description results
6333 - performSearchOnClick: true/false - whether to perform search on click
6334 See also TitleWidget.js UI widget.
6336 SearchMatchRedirectPreference:
6340 Set true to allow logged-in users to set a preference whether or not matches in
6341 search results should force redirection to that page. If false, the preference is
6342 not exposed and cannot be altered from site default. To change your site's default
6343 preference, set via $wgDefaultUserOptions['search-match-redirect'].
6345 SearchRunSuggestedQuery:
6349 Controls whether zero-result search queries with suggestions should display results for
6353 default: /usr/bin/diff3
6355 Path to the GNU diff3 utility. If the file doesn't exist, edit conflicts will
6356 fall back to the old behavior (no merging).
6358 default: /usr/bin/diff
6359 description: 'Path to the GNU diff utility.'
6360 PreviewOnOpenNamespaces:
6365 Which namespaces have special treatment where they should be preview-on-open
6366 Internally only Category: pages apply, but using this extensions (e.g. Semantic MediaWiki)
6367 can specify namespaces of pages they have special treatment for
6368 UniversalEditButton:
6371 Enable the UniversalEditButton for browsers that support it
6372 (currently only Firefox with an extension)
6373 See http://universaleditbutton.org for more background information
6374 UseAutomaticEditSummaries:
6377 If user doesn't specify any edit summary when making a an edit, MediaWiki
6378 will try to automatically create one. This feature can be disabled by set-
6379 ting this variable false.
6382 description: 'For colorized maintenance script output, is your terminal background dark ?'
6386 Set this to a string to put the wiki into read-only mode. The text will be
6387 used as an explanation to users.
6388 This prevents most write operations via the web interface. Cache updates may
6389 still be possible. To prevent database writes completely, use the read_only
6391 ReadOnlyWatchedItemStore:
6395 Set this to true to put the wiki watchlists into read-only mode.
6400 use: [UploadDirectory]
6401 callback: [MediaWiki\MainConfigSchema, getDefaultReadOnlyFile]
6403 If this lock file exists (size > 0), the wiki will be forced into read-only mode.
6404 Its contents will be shown to users as part of the read-only warning
6406 Will default to "{$wgUploadDirectory}/lock_yBgMBwiR" in Setup.php
6410 When you run the web-based upgrade utility, it will tell you what to set
6411 this to in order to authorize the upgrade process. It will subsequently be
6412 used as a password, to authorize further upgrades.
6413 For security, do not set this to a guessable string. Use the value supplied
6414 by the install/upgrade process. To cause the upgrader to generate a new key,
6415 delete the old key from LocalSettings.php.
6417 default: /usr/bin/git
6418 description: 'Fully specified path to git binary'
6419 GitRepositoryViewers:
6421 'https://(?:[a-z0-9_]+@)?gerrit.wikimedia.org/r/(?:p/)?(.*)': 'https://gerrit.wikimedia.org/g/%R/+/%H'
6422 'ssh://(?:[a-z0-9_]+@)?gerrit.wikimedia.org:29418/(.*)': 'https://gerrit.wikimedia.org/g/%R/+/%H'
6425 Map GIT repository URLs to viewer URLs to provide links in Special:Version
6426 Key is a pattern passed to preg_match() and preg_replace(),
6427 without the delimiters (which are #) and must match the whole URL.
6428 The value is the replacement for the key (it can contain $1, etc.)
6429 %h will be replaced by the short SHA-1 (7 first chars) and %H by the
6430 full SHA-1 of the HEAD revision.
6431 %r will be replaced with a URL-encoded version of $1.
6432 %R will be replaced with $1 and no URL-encoding
6437 Recentchanges items are periodically purged; entries older than this many
6439 Default: 90 days = about three months
6443 Page watchers inactive for more than this many seconds are considered inactive.
6444 Used mainly by action=info. Default: 180 days = about six months.
6446 UnwatchedPageSecret:
6449 If active watchers (per above) are this number or less, do not disclose it.
6450 Left to 1, prevents unprivileged users from knowing for sure that there are 0.
6451 Set to -1 if you want to always complement watchers count with this info.
6456 Filter $wgRCLinkDays by $wgRCMaxAge to avoid showing links for numbers
6457 higher than what will be stored. Note that this is disabled by default
6458 because we sometimes do have RC data which is beyond the limit for some
6459 reason, and some users may use the high numbers to display that data which
6469 List of Limits options to list in the Special:Recentchanges and
6470 Special:Recentchangeslinked pages.
6480 List of Days options to list in the Special:Recentchanges and
6481 Special:Recentchangeslinked pages.
6482 @see \MediaWiki\SpecialPage\ChangesListSpecialPage::getLinkDays
6487 Configuration for feeds to which notifications about recent changes will be sent.
6488 The following feed classes are available by default:
6489 - 'UDPRCFeedEngine' - sends recent changes over UDP to the specified server.
6490 - 'RedisPubSubFeedEngine' - send recent changes to Redis.
6491 Only 'class' or 'uri' is required. If 'uri' is set instead of 'class', then
6492 RecentChange::getEngine() is used to determine the class. All options are
6493 passed to the constructor.
6495 - 'class' -- The class to use for this feed (must implement RCFeed).
6496 - 'omit_bots' -- Exclude bot edits from the feed. (default: false)
6497 - 'omit_anon' -- Exclude anonymous edits from the feed. (default: false)
6498 - 'omit_user' -- Exclude edits by registered users from the feed. (default: false)
6499 - 'omit_minor' -- Exclude minor edits from the feed. (default: false)
6500 - 'omit_patrolled' -- Exclude patrolled edits from the feed. (default: false)
6501 FormattedRCFeed-specific options:
6502 - 'uri' -- [required] The address to which the messages are sent.
6503 The uri scheme of this string will be looked up in $wgRCEngines
6504 to determine which FormattedRCFeed class to use.
6505 - 'formatter' -- [required] The class (implementing RCFeedFormatter) which will
6506 produce the text to send. This can also be an object of the class.
6507 Formatters available by default: JSONRCFeedFormatter, XMLRCFeedFormatter,
6508 IRCColourfulRCFeedFormatter.
6509 IRCColourfulRCFeedFormatter-specific options:
6510 - 'add_interwiki_prefix' -- whether the titles should be prefixed with
6511 the first entry in the $wgLocalInterwikis array
6512 JSONRCFeedFormatter-specific options:
6513 - 'channel' -- if set, the 'channel' parameter is also set in JSON values.
6516 $wgRCFeeds['example'] = [
6517 'uri' => 'udp://localhost:1336',
6518 'formatter' => 'JSONRCFeedFormatter',
6519 'add_interwiki_prefix' => false,
6520 'omit_bots' => true,
6524 $wgRCFeeds['example'] = [
6525 'uri' => 'udp://localhost:1338',
6526 'formatter' => 'IRCColourfulRCFeedFormatter',
6527 'add_interwiki_prefix' => false,
6528 'omit_bots' => true,
6532 $wgRCFeeds['example'] = [
6533 'class' => ExampleRCFeed::class,
6539 redis: RedisPubSubFeedEngine
6540 udp: UDPRCFeedEngine
6543 Used by RecentChange::getEngine to find the correct engine for a given URI scheme.
6544 Keys are scheme names, values are names of FormattedRCFeed sub classes.
6546 RCWatchCategoryMembership:
6549 Treat category membership changes as a RecentChange.
6550 Changes are mentioned in RC for page actions as follows:
6551 - creation: pages created with categories are mentioned
6552 - edit: category additions/removals to existing pages are mentioned
6553 - move: nothing is mentioned (unless templates used depend on the title)
6554 - deletion: nothing is mentioned
6555 - undeletion: nothing is mentioned
6560 Use RC Patrolling to check for vandalism (from recent changes and watchlists)
6561 New pages and new files are included.
6562 @note If you disable all patrolling features, you probably also want to
6563 remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on
6565 StructuredChangeFiltersLiveUpdatePollingRate:
6568 Polling rate, in seconds, used by the 'live update' and 'view newest' features
6569 of the RCFilters app on SpecialRecentChanges and Special:Watchlist.
6570 0 to disable completely.
6574 Use new page patrolling to check new pages on Special:Newpages
6575 @note If you disable all patrolling features, you probably also want to
6576 remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on
6581 Use file patrolling to check new files on Special:Newfiles
6582 @note If you disable all patrolling features, you probably also want to
6583 remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on
6588 description: 'Provide syndication feeds (RSS, Atom) for, e.g., Recentchanges, Newpages'
6592 Set maximum number of results to return in syndication feeds (RSS, Atom) for
6593 eg Recentchanges, Newpages.
6597 _Minimum_ timeout for cached Recentchanges feed, in seconds.
6598 A cached version will continue to be served out even if changes
6599 are made, until this many seconds runs out since the last render.
6600 If set to 0, feed caching is disabled. Use this for debugging only;
6601 feed generation can be pretty slow with diffs.
6605 When generating Recentchanges RSS/Atom feed, diffs will not be generated for
6606 pages larger than this size.
6611 Override the site's default RSS/ATOM feed for recentchanges that appears on
6612 every page. Some sites might have a different feed they'd like to promote
6613 instead of the RC feed (maybe like a "Recent New Articles" or "Breaking news" one).
6614 Should be a format as key (either 'rss' or 'atom') and an URL to the feed
6617 Configure the 'atom' feed to https://example.com/somefeed.xml
6619 $wgSiteFeed['atom'] = "https://example.com/somefeed.xml";
6623 rss: MediaWiki\Feed\RSSFeed
6624 atom: MediaWiki\Feed\AtomFeed
6627 Available feeds objects.
6628 Should probably only be defined when a page is syndicated ie when
6629 $wgOut->isSyndicated() is true.
6630 AdvertisedFeedTypes:
6635 Which feed types should we provide by default? This can include 'rss',
6636 'atom', neither, or both.
6637 RCShowWatchingUsers:
6639 description: 'Show watching users in recent changes, watchlist and page history views'
6642 description: 'Show the amount of changed characters in recent changes'
6643 RCChangedSizeThreshold:
6646 If the difference between the character counts of the text
6647 before and after the edit is below that value, the value will be
6648 highlighted on the RC page.
6652 Show "Updated (since my last visit)" marker in RC view, watchlist and history
6653 view for watched pages with new changes
6657 Disable links to talk pages of anonymous users (IPs) in listings on special
6658 pages like page history, Special:Recentchanges, etc.
6662 Allow filtering by change tag in recentchanges, history, etc
6663 Has no effect if no tags are defined.
6666 mw-contentmodelchange: true
6667 mw-new-redirect: true
6668 mw-removed-redirect: true
6669 mw-changed-redirect-target: true
6674 mw-manual-revert: true
6676 mw-server-side-upload: true
6678 additionalProperties:
6681 List of core tags to enable.
6683 @since 1.36 Added 'mw-manual-revert' and 'mw-reverted'
6684 @see \ChangeTags::TAG_CONTENT_MODEL_CHANGE
6685 @see \ChangeTags::TAG_NEW_REDIRECT
6686 @see \ChangeTags::TAG_REMOVED_REDIRECT
6687 @see \ChangeTags::TAG_CHANGED_REDIRECT_TARGET
6688 @see \ChangeTags::TAG_BLANK
6689 @see \ChangeTags::TAG_REPLACE
6690 @see \ChangeTags::TAG_ROLLBACK
6691 @see \ChangeTags::TAG_UNDO
6692 @see \ChangeTags::TAG_MANUAL_REVERT
6693 @see \ChangeTags::TAG_REVERTED
6694 @see \ChangeTags::TAG_SERVER_SIDE_UPLOAD
6695 UnwatchedPageThreshold:
6698 If set to an integer, pages that are watched by this many users or more
6699 will not require the unwatchedpages permission to view the number of
6704 newpage: { letter: newpageletter, title: recentchanges-label-newpage, legend: recentchanges-legend-newpage, grouping: any }
6705 minor: { letter: minoreditletter, title: recentchanges-label-minor, legend: recentchanges-legend-minor, class: minoredit, grouping: all }
6706 bot: { letter: boteditletter, title: recentchanges-label-bot, legend: recentchanges-legend-bot, class: botedit, grouping: all }
6707 unpatrolled: { letter: unpatrolledletter, title: recentchanges-label-unpatrolled, legend: recentchanges-legend-unpatrolled, grouping: any }
6710 Flags (letter symbols) shown in recent changes and watchlist to indicate
6711 certain types of edits.
6712 To register a new one:
6714 $wgRecentChangesFlags['flag'] => [
6715 // message for the letter displayed next to rows on changes lists
6716 'letter' => 'letter-msg',
6717 // message for the tooltip of the letter
6718 'title' => 'tooltip-msg',
6719 // optional (defaults to 'tooltip-msg'), message to use in the legend box
6720 'legend' => 'legend-msg',
6721 // optional (defaults to 'flag'), CSS class to put on changes lists rows
6722 'class' => 'css-class',
6723 // optional (defaults to 'any'), how top-level flag is determined. 'any'
6724 // will set the top-level flag if any line contains the flag, 'all' will
6725 // only be set if all lines contain the flag.
6726 'grouping' => 'any',
6734 Whether to enable the watchlist expiry feature.
6740 Chance of expired watchlist items being purged on any page edit.
6741 Only has effect if $wgWatchlistExpiry is true.
6742 If this is zero, expired watchlist items will not be removed
6743 and the purgeExpiredWatchlistItems.php maintenance script should be run periodically.
6745 WatchlistExpiryMaxDuration:
6751 Relative maximum duration for watchlist expiries, as accepted by strtotime().
6752 This relates to finite watchlist expiries only. Pages can be watched indefinitely
6753 regardless of what this is set to.
6754 This is used to ensure the watchlist_expiry table doesn't grow to be too big.
6755 Only has effect if $wgWatchlistExpiry is true.
6756 Set to null to allow expiries of any duration.
6761 Override for copyright metadata.
6762 This is the name of the page containing information about the wiki's copyright status,
6763 which will be added as a link in the footer if it is specified. It overrides
6764 $wgRightsUrl if both are specified.
6768 Set this to specify an external URL containing details about the content license used on your
6770 If $wgRightsPage is set then this setting is ignored.
6774 If either $wgRightsUrl or $wgRightsPage is specified then this variable gives the text for
6775 the link. Otherwise, it will be treated as raw HTML.
6776 If using $wgRightsUrl then this value must be specified. If using $wgRightsPage then the
6778 of the page will also be used as the link text if this variable is not set.
6781 description: 'Override for copyright metadata.'
6784 description: 'Set this to true if you want detailed copyright information forms on Upload.'
6788 Set this to the number of authors that you want to be credited below an
6789 article text. Set it to zero to hide the attribution block, and a negative
6790 number (like -1) to show all authors. Note that this will require 2-3 extra
6791 database hits, which can have a not insignificant impact on performance for
6796 If there are more than $wgMaxCredits authors, show $wgMaxCredits of them.
6797 Otherwise, link to a separate credits page.
6802 List of interwiki prefixes for wikis we'll accept as sources for
6803 Special:Import and API action=import. Since complete page history can be
6804 imported, these should be 'trusted'.
6805 This can either be a regular array, or an associative map specifying
6806 subprojects on the interwiki map of the target wiki, or a mix of the two,
6809 $wgImportSources = [
6810 'wikipedia' => [ 'cs', 'en', 'fr', 'zh' ],
6812 'wikia' => [ 'animanga', 'brickipedia', 'desserts' ],
6815 If you have a very complex import sources setup, you can lazy-load it using
6816 the ImportSources hook.
6817 If a user has the 'import' permission but not the 'importupload' permission,
6818 they will only be able to run imports through this transwiki interface.
6819 ImportTargetNamespace:
6822 Optional default target namespace for interwiki imports.
6823 Can use this to create an incoming "transwiki"-style queue.
6824 Set to numeric key, not the name.
6825 Users may override this in the Special:Import dialog.
6829 If set to false, disables the full-history option on Special:Export.
6830 This is currently poorly optimized for long edit histories, so is
6831 disabled on Wikimedia's sites.
6835 If set nonzero, Special:Export requests for history of pages with
6836 more revisions than this will be rejected. On some big sites things
6837 could get bogged down by very very long pages.
6838 ExportAllowListContributors:
6840 description: 'Return distinct author list (when not returning full history)'
6844 If non-zero, Special:Export accepts a "pagelink-depth" parameter
6845 up to this specified level, which will cause it to include all
6846 pages linked to from the pages you specify. Since this number
6847 can become *really really large* and could easily break your wiki,
6848 it's disabled by default for now.
6849 @warning There's a HARD CODED limit of 5 levels of recursion to prevent a
6850 crazy-big export from being done by someone setting the depth number too
6851 high. In other words, last resort safety net.
6852 ExportFromNamespaces:
6854 description: 'Whether to allow the "export all pages in namespace" option'
6857 description: 'Whether to allow exporting the entire wiki into a single file'
6858 ExportPagelistLimit:
6861 Maximum number of pages returned by the GetPagesFromCategory and
6862 GetPagesFromNamespace functions.
6864 XmlDumpSchemaVersion:
6867 The schema to use per default when generating XML dumps. This allows sites to control
6868 explicitly when to make breaking changes to their export and dump format.
6869 WikiFarmSettingsDirectory:
6872 EXPERIMENTAL: A directory that contains site-specific
6873 configuration files. Setting this will enable multi-tenant ("wiki farm")
6874 mode, causing site-specific settings to be loaded based on information from
6878 WikiFarmSettingsExtension:
6881 EXPERIMENTAL: The file extension to be used when looking up
6882 site-specific settings files in $wgWikiFarmSettingsDirectory, such as 'json'
6890 A list of callback functions which are called once MediaWiki is fully
6892 ExtensionMessagesFiles:
6896 Extension messages files.
6897 Associative array mapping extension name to the filename where messages can be
6898 found. The file should contain variable assignments. Any of the variables
6899 present in languages/messages/MessagesEn.php may be defined, but $messages
6901 Variables defined in extensions will override conflicting variables defined
6903 Since MediaWiki 1.23, use of this variable to define messages is discouraged; instead, store
6904 messages in JSON format and use $wgMessagesDirs. For setting other variables than
6905 $messages, $wgExtensionMessagesFiles should still be used. Use a DIFFERENT key because
6906 any entry having a key that also exists in $wgMessagesDirs will be ignored.
6907 Extensions using the JSON message format can preserve backward compatibility with
6908 earlier versions of MediaWiki by using a compatibility shim, such as one generated
6909 by the generateJsonI18n.php maintenance script, listing it under the SAME key
6910 as for the $wgMessagesDirs entry.
6913 $wgExtensionMessagesFiles['ConfirmEdit'] = __DIR__.'/ConfirmEdit.i18n.php';
6919 Extension messages directories.
6920 Associative array mapping extension name to the path of the directory where message files can
6921 be found. The message files are expected to be JSON files named for their language code, e.g.
6922 en.json, de.json, etc. Extensions with messages in multiple places may specify an array of
6923 message directories.
6924 Message directories in core should be added to LocalisationCache::getMessagesDirs()
6927 $wgMessagesDirs['Example'] = __DIR__ . '/i18n';
6929 **Complex example:**
6931 $wgMessagesDirs['Example'] = [
6932 __DIR__ . '/lib/ve/i18n',
6933 __DIR__ . '/lib/ooui/i18n',
6938 ExtensionEntryPointListFiles:
6942 Array of files with list(s) of extension entry points to be used in
6943 maintenance/mergeMessageFileList.php
6945 EnableParserLimitReporting:
6947 description: 'Whether to include the NewPP limit report as a HTML comment'
6952 List of valid skin names
6953 The key should be the name in all lower case.
6954 As of 1.35, the value should be a an array in the form of the ObjectFactory specification.
6955 For example for 'foobarskin' where the PHP class is 'MediaWiki\Skins\FooBar\FooBarSkin' set:
6956 **skin.json Example:**
6960 "displayname": "FooBarSkin",
6961 "class": "MediaWiki\\Skins\\FooBar\\FooBarSkin"
6965 Historically, the value was a properly cased name for the skin (and is still currently
6966 supported). This value will be prefixed with "Skin" to create the class name of the
6967 skin to load. Use Skin::getSkinNames() as an accessor if you wish to have access to the
6973 Special page list. This is an associative array mapping the (canonical) names of
6974 special pages to either a class name or a ObjectFactory spec to be instantiated, or a callback to use for
6975 creating the special page object. In all cases, the result must be an instance of SpecialPage.
6980 Add information about an installed extension, keyed by its type.
6981 This is for use from LocalSettings.php and legacy PHP-entrypoint
6982 extensions. In general, extensions should (only) declare this
6983 information in their extension.json file.
6984 The 'name', 'path' and 'author' keys are required.
6986 $wgExtensionCredits['other'][] = [
6988 'name' => 'Example extension',
6989 'namemsg' => 'exampleextension-name',
6993 'version' => '0.0.1',
6994 'url' => 'https://example.org/example-extension/',
6995 'descriptionmsg' => 'exampleextension-desc',
6996 'license-name' => 'GPL-2.0-or-later',
6999 The extensions are listed on Special:Version. This page also looks for a file
7000 named COPYING or LICENSE (optional .txt extension) and provides a link to
7001 view said file. When the 'license-name' key is specified, this file is
7002 interpreted as wikitext.
7003 - $type: One of 'specialpage', 'parserhook', 'variable', 'media', 'antispam',
7004 'skin', 'api', or 'other', or any additional types as specified through the
7005 ExtensionTypes hook as used in SpecialVersion::getExtensionTypes().
7006 - name: Name of extension as an inline string instead of localizable message.
7007 Do not omit this even if 'namemsg' is provided, as it is used to override
7008 the path Special:Version uses to find extension's license info, and is
7009 required for backwards-compatibility with MediaWiki 1.23 and older.
7010 - namemsg (since MW 1.24): A message key for a message containing the
7011 extension's name, if the name is localizable. (For example, skin names
7013 - author: A string or an array of strings. Authors can be linked using
7014 the regular wikitext link syntax. To have an internationalized version of
7015 "and others" show, add an element "...". This element can also be linked,
7016 for instance "[https://example ...]".
7017 - descriptionmsg: A message key or an array with message key and parameters:
7018 `'descriptionmsg' => 'exampleextension-desc',`
7019 - description: Description of extension as an inline string instead of
7020 localizable message (omit in favour of 'descriptionmsg').
7021 - license-name: Short name of the license (used as label for the link), such
7022 as "GPL-2.0-or-later" or "MIT" (https://spdx.org/licenses/ for a list of identifiers).
7023 @see \MediaWiki\Specials\SpecialVersion::getCredits
7027 mergeStrategy: array_merge_recursive
7029 Global list of hooks.
7030 The key is one of the events made available by MediaWiki, you can find
7031 a description for most of them in their respective hook interfaces. For
7032 overview of the hook system see docs/Hooks.md. The array is used internally
7033 by HookContainer::run().
7034 The value can be one of:
7035 - A function name: `$wgHooks['event_name'][] = $function;`
7036 - A function with some data: `$wgHooks['event_name'][] = [ $function, $data ];`
7037 - A an object method: `$wgHooks['event_name'][] = [ $object, 'method' ];`
7040 $wgHooks['event_name'][] = function ( $hookParam ) {
7041 // Handler code goes here.
7044 @warning You should always append to an event array or you will end up
7045 deleting a previous registered hook.
7046 @warning Hook handlers should be registered at file scope. Registering
7047 handlers after file scope can lead to unexpected results due to caching.
7052 List of service wiring files to be loaded by the default instance of MediaWikiServices. Each
7053 file listed here is expected to return an associative array mapping service names to
7054 instantiator functions. Extensions may add wiring files to define their own services.
7055 However, this cannot be used to replace existing services - use the MediaWikiServices hook
7057 @note the default wiring file will be added automatically by Setup.php
7058 @see \MediaWiki\MediaWikiServices
7059 @see \Wikimedia\Services\ServiceContainer::loadWiringFiles() for details on loading
7060 service instantiator functions.
7061 @see docs/Injection.md for an overview of dependency
7062 injection in MediaWiki.
7065 deletePage: DeletePageJob
7066 refreshLinks: RefreshLinksJob
7067 deleteLinks: DeleteLinksJob
7068 htmlCacheUpdate: HTMLCacheUpdateJob
7069 sendMail: { class: EmaillingJob, services: [Emailer] }
7070 enotifNotify: EnotifNotifyJob
7071 fixDoubleRedirect: { class: DoubleRedirectJob, services: [RevisionLookup, MagicWordFactory, WikiPageFactory], needsPage: true }
7072 AssembleUploadChunks: AssembleUploadChunksJob
7073 PublishStashedFile: PublishStashedFileJob
7074 ThumbnailRender: ThumbnailRenderJob
7075 recentChangesUpdate: RecentChangesUpdateJob
7076 refreshLinksPrioritized: RefreshLinksJob
7077 refreshLinksDynamic: RefreshLinksJob
7078 activityUpdateJob: ActivityUpdateJob
7079 categoryMembershipChange: CategoryMembershipChangeJob
7080 clearUserWatchlist: ClearUserWatchlistJob
7081 watchlistExpiry: WatchlistExpiryJob
7082 cdnPurge: CdnPurgeJob
7083 userGroupExpiry: UserGroupExpiryJob
7084 clearWatchlistNotifications: ClearWatchlistNotificationsJob
7085 userOptionsUpdate: UserOptionsUpdateJob
7086 revertedTagUpdate: RevertedTagUpdateJob
7088 userEditCountInit: UserEditCountInitJob
7089 parsoidCachePrewarm: { class: ParsoidCachePrewarmJob, services: [ParsoidOutputAccess, PageStore, RevisionLookup], needsPage: false }
7090 renameUser: { class: RenameUserJob, services: [MainConfig, DBLoadBalancerFactory] }
7093 Maps jobs to their handlers; extensions
7094 can add to this to provide custom jobs.
7095 Since 1.40, job handlers can be specified as object specs
7096 for use with ObjectFactory, using an array, a plain class name,
7098 @note The constructor signature of job classes has to follow one of two patterns:
7099 Either it takes a parameter array as the first argument, followed by any services it
7100 needs to have injected: ( array $params, ... ).
7101 Or it takes a PageReference as the first parameter, followed by the parameter array,
7102 followed by any services: ( PageReference $page, array $params, ... ).
7103 In order to signal to the JobFactory that the $page parameter should be omitted from
7104 the constructor arguments, the job class has to be a subclass of GenericParameterJob,
7105 or the object specification for the job has to set the 'needsPage' key to false.
7106 If a callback is used, its signature follows the same rules.
7107 JobTypesExcludedFromDefaultQueue:
7109 - AssembleUploadChunks
7110 - PublishStashedFile
7113 Jobs that must be explicitly requested, i.e. aren't run by job runners unless
7114 special flags are set. The values here are keys of $wgJobClasses.
7116 - Very long-running jobs.
7117 - Jobs that you would never want to run as part of a page rendering request.
7118 - Jobs that you want to run on specialized machines ( like transcoding, or a particular
7119 machine on your cluster has 'outside' web access you could restrict uploadFromUrl )
7120 These settings should be global to all wikis.
7121 JobBackoffThrottling:
7124 additionalProperties:
7127 Map of job types to how many job "work items" should be run per second
7128 on each job runner process. The meaning of "work items" varies per job,
7129 but typically would be something like "pages to update". A single job
7130 may have a variable number of work items, as is the case with batch jobs.
7131 This is used by runJobs.php and not jobs run via $wgJobRunRate.
7132 These settings should be global to all wikis.
7135 default: { class: JobQueueDB, order: random, claimTTL: 3600 }
7136 additionalProperties:
7138 properties: { class: { type: string }, order: { type: string }, claimTTL: { type: integer } }
7141 Map of job types to configuration arrays.
7142 This determines which queue class and storage system is used for each job type.
7143 Job types that do not have explicit configuration will use the 'default' config.
7144 These settings should be global to all wikis.
7145 JobQueueIncludeInMaxLagFactor:
7148 Whether to include the number of jobs that are queued
7149 for the API's maxlag parameter.
7150 The total number of jobs will be divided by this to get an
7151 estimated second of maxlag. Typically bots backoff at maxlag=5,
7152 so setting this to the max number of jobs that should be in your
7153 queue divided by 5 should have the effect of stopping bots once
7156 SpecialPageCacheUpdates:
7158 Statistics: [MediaWiki\Deferred\SiteStatsUpdate, cacheUpdate]
7161 Additional functions to be performed with updateSpecialPages.
7162 Expensive Querypages are already updated.
7163 PagePropLinkInvalidations:
7165 hiddencat: categorylinks
7168 Page property link table invalidation lists. When a page property
7169 changes, this may require other link tables to be updated (eg
7170 adding __HIDDENCAT__ means the hiddencat tracking category will
7171 have been added, so the categorylinks table needs to be rebuilt).
7172 This array can be added to by extensions.
7173 CategoryMagicGallery:
7176 On category pages, show thumbnail gallery for images belonging to that
7177 category instead of listing them as articles.
7178 CategoryPagingLimit:
7180 description: 'Paging limit for categories'
7184 Specify how category names should be sorted, when listed on a category page.
7185 A sorting scheme is also known as a collation.
7186 Available values are:
7187 - uppercase: Converts the category name to upper case, and sorts by that.
7188 - identity: Does no conversion. Sorts by binary value of the string.
7189 - uca-default: Provides access to the Unicode Collation Algorithm with
7190 the default element table. This is a compromise collation which sorts
7191 all languages in a mediocre way. However, it is better than "uppercase".
7192 To use the uca-default collation, you must have PHP's intl extension
7193 installed. See https://www.php.net/manual/en/intl.setup.php . The details of the
7194 resulting collation will depend on the version of ICU installed on the
7196 After you change this, you must run maintenance/updateCollation.php to fix
7197 the sort keys in the database.
7198 Extensions can define there own collations by subclassing Collation
7199 and using the Collation::factory hook.
7200 TempCategoryCollations:
7204 Additional category collations to store during LinksUpdate. This can be used
7205 to perform online migration of categories from one collation to another. An
7206 array of associative arrays each having the following keys:
7207 - table: (string) The table name
7208 - collation: (string) The collation to use for cl_sortkey
7209 - fakeCollation: (string) The collation name to insert into cl_collation
7215 since 1.25 Extensions should now register tracking categories using the new
7216 extension registration system.
7218 Array holding default tracking category names.
7219 Array contains the system messages for each tracking category.
7220 Tracking categories allow pages with certain characteristics to be tracked.
7221 It works by adding any such page to a category automatically.
7222 A message with the suffix '-desc' should be added as a description message
7223 to have extra information on Special:TrackingCategories.
7224 @deprecated since 1.25 Extensions should now register tracking categories using
7225 the new extension registration system.
7246 The logging system has two levels: an event type, which describes the
7247 general category and can be viewed as a named subset of all logs; and
7248 an action, which is a specific kind of event that can exist in that
7250 Note that code should call LogPage::validTypes() to get a list of valid
7251 log types instead of checking the global variable.
7254 suppress: suppressionlog
7257 This restricts log access to those who have a certain right
7258 Users without this will not see it in the option menu and can not view it
7259 Restricted logs are not added to recent changes
7260 Logs should remain non-transcludable
7261 Format: logtype => permissiontype
7269 Show/hide links on Special:Log will be shown for these log types.
7270 This is associative array of log type => boolean "hide by default"
7271 See $wgLogTypes for a list of available log types.
7273 `$wgFilterLogTypes = [ 'move' => true, 'import' => false ];`
7274 Will display show/hide links for the move and import logs. Move logs will be
7275 hidden by default unless the link is clicked. Import logs will be shown by
7276 default, and hidden when the link is clicked.
7277 A message of the form logeventslist-[type]-log should be added, and will be
7278 used for the link text.
7283 protect: protectlogpage
7286 upload: uploadlogpage
7288 import: importlogpage
7289 patrol: patrol-log-page
7291 suppress: suppressionlog
7294 Lists the message key string for each log type. The localized messages
7295 will be listed in the user interface.
7296 Extensions with custom log types may add to this array.
7297 @since 1.19, if you follow the naming convention log-name-TYPE,
7298 where TYPE is your log type, you don't need to use this array.
7303 delete: dellogpagetext
7304 import: importlogpagetext
7305 merge: mergelogpagetext
7306 move: movelogpagetext
7307 patrol: patrol-log-header
7308 protect: protectlogtext
7309 rights: rightslogtext
7310 suppress: suppressionlogtext
7311 upload: uploadlogpagetext
7314 Lists the message key string for descriptive text to be shown at the
7315 top of each log type.
7316 Extensions with custom log types may add to this array.
7317 @since 1.19, if you follow the naming convention log-description-TYPE,
7318 where TYPE is your log type, yoy don't need to use this array.
7323 Maps log actions to message keys, for formatting log entries of each type
7324 and action when displaying logs to the user.
7325 The array keys are composed as "$type/$action".
7326 Extensions with custom log types may add to this array.
7329 block/block: BlockLogFormatter
7330 block/reblock: BlockLogFormatter
7331 block/unblock: BlockLogFormatter
7332 contentmodel/change: ContentModelLogFormatter
7333 contentmodel/new: ContentModelLogFormatter
7334 delete/delete: DeleteLogFormatter
7335 delete/delete_redir: DeleteLogFormatter
7336 delete/delete_redir2: DeleteLogFormatter
7337 delete/event: DeleteLogFormatter
7338 delete/restore: DeleteLogFormatter
7339 delete/revision: DeleteLogFormatter
7340 import/interwiki: ImportLogFormatter
7341 import/upload: ImportLogFormatter
7342 managetags/activate: LogFormatter
7343 managetags/create: LogFormatter
7344 managetags/deactivate: LogFormatter
7345 managetags/delete: LogFormatter
7346 merge/merge: MergeLogFormatter
7347 move/move: MoveLogFormatter
7348 move/move_redir: MoveLogFormatter
7349 patrol/patrol: PatrolLogFormatter
7350 patrol/autopatrol: PatrolLogFormatter
7351 protect/modify: ProtectLogFormatter
7352 protect/move_prot: ProtectLogFormatter
7353 protect/protect: ProtectLogFormatter
7354 protect/unprotect: ProtectLogFormatter
7355 renameuser/renameuser: RenameuserLogFormatter
7356 rights/autopromote: RightsLogFormatter
7357 rights/rights: RightsLogFormatter
7358 suppress/block: BlockLogFormatter
7359 suppress/delete: DeleteLogFormatter
7360 suppress/event: DeleteLogFormatter
7361 suppress/reblock: BlockLogFormatter
7362 suppress/revision: DeleteLogFormatter
7363 tag/update: TagLogFormatter
7364 upload/overwrite: UploadLogFormatter
7365 upload/revert: UploadLogFormatter
7366 upload/upload: UploadLogFormatter
7369 The same as above, but here values are names of classes,
7371 @see \LogPage::actionText
7375 block: { block: [block], reblock: [reblock], unblock: [unblock] }
7376 contentmodel: { change: [change], new: [new] }
7377 delete: { delete: [delete], delete_redir: [delete_redir, delete_redir2], restore: [restore], event: [event], revision: [revision] }
7378 import: { interwiki: [interwiki], upload: [upload] }
7379 managetags: { create: [create], delete: [delete], activate: [activate], deactivate: [deactivate] }
7380 move: { move: [move], move_redir: [move_redir] }
7381 newusers: { create: [create, newusers], create2: [create2], autocreate: [autocreate], byemail: [byemail] }
7382 protect: { protect: [protect], modify: [modify], unprotect: [unprotect], move_prot: [move_prot] }
7383 rights: { rights: [rights], autopromote: [autopromote] }
7384 suppress: { event: [event], revision: [revision], delete: [delete], block: [block], reblock: [reblock] }
7385 upload: { upload: [upload], overwrite: [overwrite], revert: [revert] }
7388 List of log types that can be filtered by action types
7389 To each action is associated the list of log_action
7390 subtypes to search for, usually one, but not necessarily so
7391 Extensions may append to this array
7395 description: 'Maintain a log of newusers at Special:Log/newusers?'
7399 Maintain a log of page creations at Special:Log/create?
7401 AllowSpecialInclusion:
7403 description: 'Allow special page inclusions such as {{Special:Allpages}}'
7404 DisableQueryPageUpdate:
7407 Set this to an array of special page names to prevent
7408 maintenance/updateSpecialPages.php from updating those pages.
7409 Mapping each special page name to a run mode like 'periodical' if a cronjob is set up.
7410 CountCategorizedImagesAsUsed:
7413 On Special:Unusedimages, consider images "used", if they are put
7414 into a category. Default (false) is not to count those as used.
7415 MaxRedirectLinksRetrieved:
7418 Maximum number of links to a redirect page listed on
7419 Special:Whatlinkshere/RedirectDestination
7420 RangeContributionsCIDRLimit:
7425 additionalProperties:
7428 Shortest CIDR limits that can be checked in any individual range check
7429 at Special:Contributions.
7435 Map of allowed values for the "title=foo&action=<action>" parameter.
7436 to the corrspeonding handler code.
7437 See ActionFactory for the syntax. Core defaults are in ActionFactory::CORE_ACTIONS,
7438 anything here overrides that.
7440 default: 'index,follow'
7442 Default robot policy. The default policy is to encourage indexing and fol-
7443 lowing of links. It may be overridden on a per-namespace and/or per-page
7445 NamespaceRobotPolicies:
7449 Robot policies per namespaces. The default policy is given above, the array
7450 is made of namespace constants as defined in includes/Defines.php. You can-
7451 not specify a different default policy for NS_SPECIAL: it is always noindex,
7452 nofollow. This is because a number of special pages (e.g., ListPages) have
7453 many permutations of options that display the same data under redundant
7454 URLs, so search engine spiders risk getting lost in a maze of twisty special
7455 pages, all alike, and never reaching your actual content.
7458 $wgNamespaceRobotPolicies = [ NS_TALK => 'noindex' ];
7460 ArticleRobotPolicies:
7464 Robot policies per article. These override the per-namespace robot policies.
7465 Must be in the form of an array where the key part is a properly canonicalised
7466 text form title and the value is a robot policy.
7469 $wgArticleRobotPolicies = [
7470 'Main Page' => 'noindex,follow',
7471 'User:Bob' => 'index,follow',
7474 **Example that DOES NOT WORK because the names are not canonical text**
7477 $wgArticleRobotPolicies = [
7478 // Underscore, not space!
7479 'Main_Page' => 'noindex,follow',
7480 // "Project", not the actual project name!
7481 'Project:X' => 'index,follow',
7482 // Needs to be "Abc", not "abc" (unless $wgCapitalLinks is false for that namespace)!
7483 'abc' => 'noindex,nofollow'
7486 ExemptFromUserRobotsControl:
7492 An array of namespace keys in which the __INDEX__/__NOINDEX__ magic words
7493 will not function, so users can't decide whether pages in that namespace are
7494 indexed by search engines. If set to null, default to $wgContentNamespaces.
7497 $wgExemptFromUserRobotsControl = [ NS_MAIN, NS_TALK, NS_PROJECT ];
7502 WARNING: SECURITY THREAT - debug use only
7503 Disables many security checks in the API for debugging purposes.
7504 This flag should never be used on the production servers, as it introduces
7505 a number of potential security holes. Even when enabled, the validation
7506 will still be performed, but instead of failing, API will return a warning.
7507 Also, there will always be a warning notifying that this flag is set.
7508 At this point, the flag allows GET requests to go through for modules
7515 API module extensions.
7516 Associative array mapping module name to modules specs;
7517 Each module spec is an associative array containing at least
7518 the 'class' key for the module's class, and optionally a
7519 'factory' key for the factory function to use for the module.
7520 That factory function will be called with two parameters,
7521 the parent module (an instance of ApiBase, usually ApiMain)
7522 and the name the module was registered under. The return
7523 value must be an instance of the class given in the 'class'
7525 For backward compatibility, the module spec may also be a
7526 simple string containing the module's class name. In that
7527 case, the class' constructor will be called with the parent
7528 module and module name as parameters, as described above.
7529 Examples for registering API modules:
7531 $wgAPIModules['foo'] = 'ApiFoo';
7532 $wgAPIModules['bar'] = [
7533 'class' => ApiBar::class,
7534 'factory' => function( $main, $name ) { ... }
7536 $wgAPIModules['xyzzy'] = [
7537 'class' => ApiXyzzy::class,
7538 'factory' => [ XyzzyFactory::class, 'newApiModule' ]
7541 Extension modules may override the core modules.
7542 See ApiMain::MODULES for a list of the core modules.
7547 API format module extensions.
7548 Associative array mapping format module name to module specs (see $wgAPIModules).
7549 Extension modules may override the core modules.
7550 See ApiMain::FORMATS for a list of the core format modules.
7555 API Query meta module extensions.
7556 Associative array mapping meta module name to module specs (see $wgAPIModules).
7557 Extension modules may override the core modules.
7558 See ApiQuery::QUERY_META_MODULES for a list of the core meta modules.
7563 API Query prop module extensions.
7564 Associative array mapping prop module name to module specs (see $wgAPIModules).
7565 Extension modules may override the core modules.
7566 See ApiQuery::QUERY_PROP_MODULES for a list of the core prop modules.
7571 API Query list module extensions.
7572 Associative array mapping list module name to module specs (see $wgAPIModules).
7573 Extension modules may override the core modules.
7574 See ApiQuery::QUERY_LIST_MODULES for a list of the core list modules.
7578 Maximum amount of rows to scan in a DB query in the API
7579 The default value is generally fine
7583 The maximum size (in bytes) of an API result.
7584 @warning Do not set this lower than $wgMaxArticleSize*1024
7585 APIMaxUncachedDiffs:
7588 The maximum number of uncached diffs that can be retrieved in one API
7589 request. Set this to 0 to disable API diffs altogether
7593 Maximum amount of DB lag on a majority of DB replica DBs to tolerate
7594 before forcing bots to retry any write requests via API errors.
7595 This should be lower than the 'max lag' value in $wgLBFactoryConf.
7599 Log file or URL (TCP or UDP) to log API requests to, or false to disable
7601 APICacheHelpTimeout:
7603 description: 'Set the timeout for the API help text cache. If set to 0, caching disabled'
7604 APIUselessQueryPages:
7610 The ApiQueryQueryPages module should skip pages that are redundant to true
7614 description: 'Enable previewing licences via AJAX.'
7615 CrossSiteAJAXdomains:
7619 Settings for incoming cross-site AJAX requests:
7620 Newer browsers support cross-site AJAX when the target resource allows requests
7621 from the origin domain by the Access-Control-Allow-Origin header.
7622 This is currently only used by the API (requests to api.php)
7623 $wgCrossSiteAJAXdomains can be set using a wildcard syntax:
7624 - '*' matches any number of characters
7625 - '?' matches any 1 character
7628 $wgCrossSiteAJAXdomains = [
7629 'www.mediawiki.org',
7635 CrossSiteAJAXdomainExceptions:
7639 Domains that should not be allowed to make AJAX requests,
7640 even if they match one of the domains allowed by $wgCrossSiteAJAXdomains
7641 Uses the same syntax as $wgCrossSiteAJAXdomains
7653 - Access-Control-Max-Age
7656 description: 'List of allowed headers for cross-origin API requests.'
7657 RestAPIAdditionalRouteFiles:
7661 Additional REST API Route files.
7662 A common usage is to enable development/experimental endpoints only on test wikis.
7665 description: 'Maximum amount of virtual memory available to shell processes under linux, in KiB.'
7669 Maximum file size created by shell processes under linux, in KiB
7670 ImageMagick convert for example can be fairly hungry for scratch space
7673 description: 'Maximum CPU time in seconds for shell processes under Linux'
7674 MaxShellWallClockTime:
7677 Maximum wall clock time (i.e. real time, of the kind the clock on the wall
7678 would measure) in seconds for shell processes under Linux
7682 Under Linux: a cgroup directory used to constrain memory usage of shell
7683 commands. The directory must be writable by the user which runs MediaWiki.
7684 If specified, this is used instead of ulimit, which is inaccurate, and
7685 causes malloc() to return NULL, which exposes bugs in C applications, making
7686 them segfault or deadlock.
7687 A wrapper script will create a cgroup for each shell command that runs, as
7688 a subgroup of the specified cgroup. If the memory limit is exceeded, the
7689 kernel will send a SIGKILL signal to a process in the subgroup.
7692 mkdir -p /sys/fs/cgroup/memory/mediawiki
7693 mkdir -m 0777 /sys/fs/cgroup/memory/mediawiki/job
7694 echo '$wgShellCgroup = "/sys/fs/cgroup/memory/mediawiki/job";' >> LocalSettings.php
7696 The reliability of cgroup cleanup can be improved by installing a
7697 notify_on_release script in the root cgroup, see e.g.
7698 https://gerrit.wikimedia.org/r/#/c/40784
7700 default: /usr/bin/php
7701 description: 'Executable path of the PHP cli binary. Should be set up on install.'
7702 ShellRestrictionMethod:
7708 Method to use to restrict shell commands
7710 - 'autodetect': Autodetect if any restriction methods are available
7711 - 'firejail': Use firejail <https://firejail.wordpress.com/>
7712 - false: Don't use any restrictions
7713 @note If using firejail with MediaWiki running in a home directory different
7714 from the webserver user, firejail 0.9.44+ is required.
7720 additionalProperties:
7721 type: [string, boolean, 'null']
7723 Shell commands can be run on a remote server using Shellbox. To use this
7724 feature, set this to the URLs mapped by the service, and also configure $wgShellboxSecretKey.
7725 You can also disable a certain service by setting it to false or null.
7726 'default' would be the default URL if no URL is defined for that service.
7727 For more information about installing Shellbox, see
7728 https://www.mediawiki.org/wiki/Shellbox
7736 The secret key for HMAC verification of Shellbox requests. Set this to
7737 a long random string.
7745 The POSIX-compatible shell to use when running scripts. This is used by
7746 some media handling shell commands.
7747 If ShellboxUrls is configured, this path should exist on the remote side.
7748 On Windows this should be the full path to bash.exe, not git-bash.exe.
7754 Timeout for HTTP requests done internally, in seconds.
7760 Timeout for connections done internally (in seconds).
7761 Only supported if cURL is installed, ignored otherwise.
7767 The maximum HTTP request timeout in seconds. If any specified or configured
7768 request timeout is larger than this, then this value will be used instead.
7769 Zero is interpreted as "no limit".
7771 HTTPMaxConnectTimeout:
7775 The maximum HTTP connect timeout in seconds. If any specified or configured
7776 connect timeout is larger than this, then this value will be used instead.
7777 Zero is interpreted as "no limit".
7782 Timeout for HTTP requests done internally for transwiki imports, in seconds.
7786 description: 'Timeout for Asynchronous (background) HTTP requests, in seconds.'
7789 description: 'Proxy to use for CURL requests.'
7794 Local virtual hosts.
7795 This lists domains that are configured as virtual hosts on the same machine.
7796 It is expected that each domain can be identified by its hostname alone,
7798 This affects the following:
7799 - MWHttpRequest: If a request is to be made to a domain listed here, or any
7800 subdomain thereof, then $wgLocalHTTPProxy will be used.
7801 Command-line scripts are not affected by this setting and will always use
7802 the proxy if it is configured.
7810 Reverse proxy to use for requests to domains in $wgLocalVirtualHosts
7811 When used, any port in the request URL will be dropped. The behavior of
7812 redirects and cookies is dependent upon the reverse proxy actually in use,
7813 as MediaWiki doesn't implement any special handling for them.
7814 If set to false, no reverse proxy will be used for local requests.
7819 Whether to respect/honour
7820 - request ID provided by the incoming request via the `X-Request-Id`
7821 - trace context provided by the incoming request via the `tracestate` and `traceparent`
7822 Set to `true` if the entity sitting in front of Mediawiki sanitises external requests.
7827 Number of jobs to perform per request. May be less than one in which case jobs are
7828 performed probabalistically. If this is zero, jobs will not be done during ordinary
7829 apache requests. In this case, maintenance/runJobs.php should be run in loop every
7830 few seconds via a service or cron job. If using a cron job, be sure to handle the
7831 case where the script is already running (e.g. via `/usr/bin/flock -n <lock_file>`).
7832 If this is set to a non-zero number, then it is highly recommended that PHP run in
7833 fastcgi mode (php_fpm). When using a standard Apache PHP handler (mod_php), it is
7834 recommended that output_buffering and zlib.output_compression both be set to "Off",
7835 allowing MediaWiki to install an unlimited size output buffer on the fly. Setting
7836 output_buffering to an integer (e.g. 4096) or enabling zlib.output_compression can
7837 cause user-visible slowness as background tasks execute during web requests.
7838 Regardless of the web server engine in use, be sure to configure a sufficient number
7839 processes/threads in order to avoid exhaustion (which will cause user-visible slowness).
7843 When $wgJobRunRate > 0, try to run jobs asynchronously, spawning a new process
7844 to handle the job execution, instead of blocking the request until the job
7849 description: 'Number of rows to update per job'
7852 description: 'Number of rows to update per query'
7856 Allow redirection to another page when a user logs in.
7857 To enable, set to a string like 'Main Page'
7862 global: { timeout: 360, forwardCookies: false, HTTPProxy: null }
7863 mergeStrategy: array_plus_2d
7866 Global configuration variable for Virtual REST Services.
7867 Use the 'path' key to define automatically mounted services. The value for this
7868 key is a map of path prefixes to service configuration. The latter is an array of:
7869 - class : the fully qualified class name
7870 - options : map of arguments to the class constructor
7871 Such services will be available to handle queries under their path from the VRS
7872 singleton, e.g. MediaWikiServices::getInstance()->getVirtualRESTServiceClient();
7873 Auto-mounting example for Parsoid:
7874 $wgVirtualRestConfig['paths']['/parsoid/'] = [
7875 'class' => ParsoidVirtualRESTService::class,
7877 'url' => 'http://localhost:8000',
7878 'prefix' => 'enwiki',
7879 'domain' => 'en.wikipedia.org'
7882 Parameters for different services can also be declared inside the 'modules' value,
7883 which is to be treated as an associative array. The parameters in 'global' will be
7884 merged with service-specific ones. The result will then be passed to
7885 VirtualRESTService::__construct() in the module.
7886 Example config for Parsoid:
7887 $wgVirtualRestConfig['modules']['parsoid'] = [
7888 'url' => 'http://localhost:8000',
7889 'prefix' => 'enwiki',
7890 'domain' => 'en.wikipedia.org',
7895 default: { class: Wikimedia\EventRelayer\EventRelayerNull }
7898 Mapping of event channels (or channel categories) to EventRelayer configuration.
7899 By setting up a PubSub system (like Kafka) and enabling a corresponding EventRelayer class
7900 that uses it, MediaWiki can broadcast events to all subscribers. Certain features like WAN
7901 cache purging and CDN cache purging will emit events to this system. Appropriate listers can
7902 subscribe to the channel and take actions based on the events. For example, a local daemon
7903 can run on each CDN cache node and perform local purges based on the URL purge channel
7905 Some extensions may want to use "channel categories" so that different channels can also
7906 share the same custom relayer instance (e.g. when it's likely to be overridden). They can use
7907 EventRelayerGroup::getRelayer() based on the category but call notify() on various different
7908 actual channels. One reason for this would be that some system have very different
7909 performance vs durability needs, so one system (e.g. Kafka) may not be suitable for all
7911 The 'default' key is for all channels (or channel categories) without an explicit entry
7918 Share data about this installation with MediaWiki developers
7919 When set to true, MediaWiki will periodically ping https://www.mediawiki.org/ with basic
7920 data about this MediaWiki instance. This data includes, for example, the type of system,
7921 PHP version, and chosen database backend. The Wikimedia Foundation shares this data with
7922 MediaWiki developers to help guide future development efforts.
7923 For details about what data is sent, see: https://www.mediawiki.org/wiki/Manual:$wgPingback
7924 For the pingback privacy policy, see:
7925 https://wikimediafoundation.org/wiki/MediaWiki_Pingback_Privacy_Statement
7926 Aggregate pingback data is available at: https://pingback.wmflabs.org/
7932 Origin Trials tokens.
7938 Expiry of the endpoint definition for the Reporting API.
7939 @warning EXPERIMENTAL!
7945 List of endpoints for the Reporting API.
7946 @warning EXPERIMENTAL!
7948 FeaturePolicyReportOnly:
7952 List of Feature Policy Reporting types to enable.
7953 Each entry is turned into a Feature-Policy-Report-Only header.
7954 @warning EXPERIMENTAL!
7962 List of preferred skins to be listed higher in Special:Preferences
7964 SpecialContributeSkinsEnabled:
7968 List of skins to not show the Special:Contribute page
7974 Whether to enable the client-side edit recovery feature.
7975 This is a temporary feature flag.
7979 description: 'Number of seconds to keep edit recovery data after the edit is stored.'