| 1 |
|
| 2 |
|
| 3 |
config-schema: |
| 4 |
ConfigRegistry: |
| 5 |
default: |
| 6 |
main: 'GlobalVarConfig::newInstance' |
| 7 |
type: object |
| 8 |
description: |- |
| 9 |
Registry of factory functions to create config objects: |
| 10 |
The 'main' key must be set, and the value should be a valid |
| 11 |
callable. |
| 12 |
@since 1.23 |
| 13 |
Sitename: |
| 14 |
default: MediaWiki |
| 15 |
description: 'Name of the site. It must be changed in LocalSettings.php' |
| 16 |
Server: |
| 17 |
default: false |
| 18 |
description: |- |
| 19 |
URL of the server. |
| 20 |
**Example:** |
| 21 |
``` |
| 22 |
$wgServer = 'http://example.com'; |
| 23 |
``` |
| 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. |
| 29 |
CanonicalServer: |
| 30 |
default: false |
| 31 |
description: |- |
| 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. |
| 35 |
@since 1.18 |
| 36 |
ServerName: |
| 37 |
default: false |
| 38 |
description: |- |
| 39 |
Server name. This is automatically computed by parsing the bare |
| 40 |
hostname out of $wgCanonicalServer. It should not be customized. |
| 41 |
@since 1.24 |
| 42 |
AssumeProxiesUseDefaultProtocolPorts: |
| 43 |
default: true |
| 44 |
type: boolean |
| 45 |
description: |- |
| 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). |
| 48 |
@since 1.26 |
| 49 |
HttpsPort: |
| 50 |
default: 443 |
| 51 |
description: |- |
| 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 |
| 57 |
@since 1.24 |
| 58 |
ForceHTTPS: |
| 59 |
default: false |
| 60 |
type: boolean |
| 61 |
description: |- |
| 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 |
| 69 |
the redirect. |
| 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. |
| 72 |
@since 1.35 |
| 73 |
ScriptPath: |
| 74 |
default: /wiki |
| 75 |
description: |- |
| 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 |
| 81 |
UsePathInfo: |
| 82 |
dynamicDefault: |
| 83 |
callback: [MediaWiki\MainConfigSchema, getDefaultUsePathInfo] |
| 84 |
description: |- |
| 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. |
| 93 |
@since 1.2.1 |
| 94 |
default: null |
| 95 |
Script: |
| 96 |
default: false |
| 97 |
dynamicDefault: |
| 98 |
use: [ScriptPath] |
| 99 |
callback: [MediaWiki\MainConfigSchema, getDefaultScript] |
| 100 |
description: |- |
| 101 |
The URL path to index.php. |
| 102 |
Defaults to "{$wgScriptPath}/index.php". |
| 103 |
LoadScript: |
| 104 |
default: false |
| 105 |
dynamicDefault: |
| 106 |
use: [ScriptPath] |
| 107 |
callback: [MediaWiki\MainConfigSchema, getDefaultLoadScript] |
| 108 |
description: |- |
| 109 |
The URL path to load.php. |
| 110 |
Defaults to "{$wgScriptPath}/load.php". |
| 111 |
@since 1.17 |
| 112 |
RestPath: |
| 113 |
default: false |
| 114 |
dynamicDefault: |
| 115 |
use: [ScriptPath] |
| 116 |
callback: [MediaWiki\MainConfigSchema, getDefaultRestPath] |
| 117 |
description: |- |
| 118 |
The URL path to the REST API. |
| 119 |
Defaults to "{$wgScriptPath}/rest.php" |
| 120 |
@since 1.34 |
| 121 |
StylePath: |
| 122 |
default: false |
| 123 |
dynamicDefault: |
| 124 |
use: [ResourceBasePath] |
| 125 |
callback: [MediaWiki\MainConfigSchema, getDefaultStylePath] |
| 126 |
description: |- |
| 127 |
The URL path of the skins directory. |
| 128 |
Defaults to "{$wgResourceBasePath}/skins". |
| 129 |
@since 1.3 |
| 130 |
LocalStylePath: |
| 131 |
default: false |
| 132 |
dynamicDefault: |
| 133 |
use: [ScriptPath] |
| 134 |
callback: [MediaWiki\MainConfigSchema, getDefaultLocalStylePath] |
| 135 |
description: |- |
| 136 |
The URL path of the skins directory. Should not point to an external domain. |
| 137 |
Defaults to "{$wgScriptPath}/skins". |
| 138 |
@since 1.17 |
| 139 |
ExtensionAssetsPath: |
| 140 |
default: false |
| 141 |
dynamicDefault: |
| 142 |
use: [ResourceBasePath] |
| 143 |
callback: [MediaWiki\MainConfigSchema, getDefaultExtensionAssetsPath] |
| 144 |
description: |- |
| 145 |
The URL path of the extensions directory. |
| 146 |
Defaults to "{$wgResourceBasePath}/extensions". |
| 147 |
@since 1.16 |
| 148 |
ExtensionDirectory: |
| 149 |
default: null |
| 150 |
type: |
| 151 |
- string |
| 152 |
- 'null' |
| 153 |
description: |- |
| 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. |
| 157 |
@since 1.25 |
| 158 |
StyleDirectory: |
| 159 |
default: null |
| 160 |
type: |
| 161 |
- string |
| 162 |
- 'null' |
| 163 |
description: |- |
| 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. |
| 167 |
@since 1.3 |
| 168 |
BaseDirectory: |
| 169 |
default: null |
| 170 |
description: |- |
| 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. |
| 176 |
@since 1.38 |
| 177 |
ArticlePath: |
| 178 |
default: false |
| 179 |
dynamicDefault: |
| 180 |
use: [Script, UsePathInfo] |
| 181 |
callback: [MediaWiki\MainConfigSchema, getDefaultArticlePath] |
| 182 |
description: |- |
| 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. |
| 187 |
UploadPath: |
| 188 |
default: false |
| 189 |
dynamicDefault: |
| 190 |
use: [ScriptPath] |
| 191 |
callback: [MediaWiki\MainConfigSchema, getDefaultUploadPath] |
| 192 |
description: |- |
| 193 |
The URL path for the images directory. |
| 194 |
Defaults to "{$wgScriptPath}/images". |
| 195 |
ImgAuthPath: |
| 196 |
default: false |
| 197 |
description: |- |
| 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 |
| 204 |
than $wgUploadPath. |
| 205 |
@since 1.35 |
| 206 |
ThumbPath: |
| 207 |
default: false |
| 208 |
description: |- |
| 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. |
| 211 |
@since 1.36 |
| 212 |
UploadDirectory: |
| 213 |
default: false |
| 214 |
dynamicDefault: |
| 215 |
use: [BaseDirectory] |
| 216 |
callback: [MediaWiki\MainConfigSchema, getDefaultUploadDirectory] |
| 217 |
description: 'The filesystem path of the images directory. Defaults to "{$IP}/images".' |
| 218 |
FileCacheDirectory: |
| 219 |
default: false |
| 220 |
dynamicDefault: |
| 221 |
use: [UploadDirectory] |
| 222 |
callback: [MediaWiki\MainConfigSchema, getDefaultFileCacheDirectory] |
| 223 |
description: |- |
| 224 |
Directory where the cached page will be saved. |
| 225 |
Defaults to "{$wgUploadDirectory}/cache". |
| 226 |
Logo: |
| 227 |
default: false |
| 228 |
dynamicDefault: |
| 229 |
use: [ResourceBasePath] |
| 230 |
callback: [MediaWiki\MainConfigSchema, getDefaultLogo] |
| 231 |
description: |- |
| 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. |
| 237 |
Logos: |
| 238 |
default: false |
| 239 |
type: |
| 240 |
- object |
| 241 |
- boolean |
| 242 |
description: |- |
| 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 |
| 261 |
@par Example: |
| 262 |
@code |
| 263 |
$wgLogos = [ |
| 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', |
| 269 |
'wordmark' => [ |
| 270 |
'src' => 'path/to/wordmark_version.png', |
| 271 |
'1x' => 'path/to/wordmark_version.svg', |
| 272 |
'width' => 135, |
| 273 |
'height' => 20, |
| 274 |
], |
| 275 |
'tagline' => [ |
| 276 |
'src' => 'path/to/tagline_version.png', |
| 277 |
'width' => 135, |
| 278 |
'height' => 15, |
| 279 |
] |
| 280 |
]; |
| 281 |
@endcode |
| 282 |
Defaults to [ "1x" => $wgLogo ], |
| 283 |
or [ "1x" => "$wgResourceBasePath/resources/assets/change-your-logo.svg" ] if $wgLogo is not set. |
| 284 |
@since 1.35 |
| 285 |
Favicon: |
| 286 |
default: /favicon.ico |
| 287 |
description: |- |
| 288 |
The URL path of the icon. |
| 289 |
@since 1.6 |
| 290 |
AppleTouchIcon: |
| 291 |
default: false |
| 292 |
description: |- |
| 293 |
The URL path of the icon for iPhone and iPod Touch web app bookmarks. |
| 294 |
Defaults to no icon. |
| 295 |
@since 1.12 |
| 296 |
ReferrerPolicy: |
| 297 |
default: false |
| 298 |
type: |
| 299 |
- array |
| 300 |
- string |
| 301 |
- boolean |
| 302 |
description: |- |
| 303 |
Value for the referrer policy meta tag. |
| 304 |
One or more of the values defined in the Referrer Policy specification: |
| 305 |
https://w3c.github.io/webappsec-referrer-policy/ |
| 306 |
('no-referrer', 'no-referrer-when-downgrade', 'same-origin', |
| 307 |
'origin', 'strict-origin', 'origin-when-cross-origin', |
| 308 |
'strict-origin-when-cross-origin', or 'unsafe-url') |
| 309 |
Setting it to false prevents the meta tag from being output |
| 310 |
(which results in falling back to the Referrer-Policy header, |
| 311 |
or 'no-referrer-when-downgrade' if that's not set either.) |
| 312 |
Setting it to an array (supported since 1.31) will create a meta tag for |
| 313 |
each value, in the reverse of the order (meaning that the first array element |
| 314 |
will be the default and the others used as fallbacks for browsers which do not |
| 315 |
understand it). |
| 316 |
@since 1.25 |
| 317 |
TmpDirectory: |
| 318 |
default: false |
| 319 |
description: |- |
| 320 |
The local filesystem path to a temporary directory. This must not be web-accessible. |
| 321 |
When this setting is set to false, its value will automatically be decided |
| 322 |
through the first call to wfTempDir(). See that method's implementation for |
| 323 |
the actual detection logic. |
| 324 |
To find the temporary path for the current wiki, developers must not use |
| 325 |
this variable directly. Use the global function wfTempDir() instead. |
| 326 |
The temporary directory is expected to be shared with other applications, |
| 327 |
including other MediaWiki instances (which might not run the same version |
| 328 |
or configuration). When storing files here, take care to avoid conflicts |
| 329 |
with other instances of MediaWiki. For example, when caching the result |
| 330 |
of a computation, the file name should incorporate the input of the |
| 331 |
computation so that it cannot be confused for the result of a similar |
| 332 |
computation by another MediaWiki instance. |
| 333 |
@see \wfTempDir() |
| 334 |
@note Default changed to false in MediaWiki 1.20. |
| 335 |
UploadBaseUrl: |
| 336 |
default: '' |
| 337 |
description: |- |
| 338 |
If set, this URL is added to the start of $wgUploadPath to form a complete |
| 339 |
upload URL. |
| 340 |
@since 1.4 |
| 341 |
UploadStashScalerBaseUrl: |
| 342 |
default: false |
| 343 |
deprecated: 'since 1.36 Use thumbProxyUrl in $wgLocalFileRepo' |
| 344 |
description: |- |
| 345 |
To enable remote on-demand scaling, set this to the thumbnail base URL. |
| 346 |
Full thumbnail URL will be like $wgUploadStashScalerBaseUrl/e/e6/Foo.jpg/123px-Foo.jpg |
| 347 |
where 'e6' are the first two characters of the MD5 hash of the file name. |
| 348 |
@deprecated since 1.36 Use thumbProxyUrl in $wgLocalFileRepo |
| 349 |
If $wgUploadStashScalerBaseUrl and thumbProxyUrl are both false, thumbs are |
| 350 |
rendered locally as needed. |
| 351 |
@since 1.17 |
| 352 |
ActionPaths: |
| 353 |
default: { } |
| 354 |
type: object |
| 355 |
description: |- |
| 356 |
To set 'pretty' URL paths for actions other than |
| 357 |
plain page views, add to this array. |
| 358 |
**Example:** |
| 359 |
Set pretty URL for the edit action: |
| 360 |
``` |
| 361 |
'edit' => "$wgScriptPath/edit/$1" |
| 362 |
``` |
| 363 |
There must be an appropriate script or rewrite rule in place to handle these URLs. |
| 364 |
@since 1.5 |
| 365 |
MainPageIsDomainRoot: |
| 366 |
default: false |
| 367 |
type: boolean |
| 368 |
description: |- |
| 369 |
When enabled, the domain root will show the wiki's main page, |
| 370 |
instead of redirecting to the main page. |
| 371 |
@since 1.34 |
| 372 |
EnableUploads: |
| 373 |
default: false |
| 374 |
description: |- |
| 375 |
Allow users to upload files. |
| 376 |
Use $wgLocalFileRepo to control how and where uploads are stored. |
| 377 |
Disabled by default as for security reasons. |
| 378 |
See <https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads>. |
| 379 |
@since 1.5 |
| 380 |
UploadStashMaxAge: |
| 381 |
default: 21600 |
| 382 |
description: 'The maximum age of temporary (incomplete) uploaded files' |
| 383 |
EnableAsyncUploads: |
| 384 |
default: false |
| 385 |
description: |- |
| 386 |
Enable deferred upload tasks that use the job queue. |
| 387 |
Only enable this if job runners are set up for both the |
| 388 |
'AssembleUploadChunks','PublishStashedFile' and 'UploadFromUrl' job types. |
| 389 |
EnableAsyncUploadsByURL: |
| 390 |
default: false |
| 391 |
description: |- |
| 392 |
Enable the async processing of upload by url in Special:Upload. |
| 393 |
Only works if EnableAsyncUploads is also enabled |
| 394 |
UploadMaintenance: |
| 395 |
default: false |
| 396 |
description: 'To disable file delete/restore temporarily' |
| 397 |
IllegalFileChars: |
| 398 |
default: ':\/\\' |
| 399 |
deprecated: 'since 1.41; no longer customizable' |
| 400 |
description: |- |
| 401 |
Additional characters that are not allowed in filenames. They are replaced with '-' when |
| 402 |
uploading. Like $wgLegalTitleChars, this is a regexp character class. |
| 403 |
Slashes and backslashes are disallowed regardless of this setting, but included here for |
| 404 |
completeness. |
| 405 |
@deprecated since 1.41; no longer customizable |
| 406 |
DeletedDirectory: |
| 407 |
default: false |
| 408 |
dynamicDefault: |
| 409 |
use: [UploadDirectory] |
| 410 |
callback: [MediaWiki\MainConfigSchema, getDefaultDeletedDirectory] |
| 411 |
description: |- |
| 412 |
What directory to place deleted uploads in. |
| 413 |
Defaults to "{$wgUploadDirectory}/deleted". |
| 414 |
ImgAuthDetails: |
| 415 |
default: false |
| 416 |
description: 'Set this to true if you use img_auth and want the user to see details on why access failed.' |
| 417 |
ImgAuthUrlPathMap: |
| 418 |
default: { } |
| 419 |
type: object |
| 420 |
description: |- |
| 421 |
Map of relative URL directories to match to internal mwstore:// base storage paths. |
| 422 |
For img_auth.php requests, everything after "img_auth.php/" is checked to see |
| 423 |
if starts with any of the prefixes defined here. The prefixes should not overlap. |
| 424 |
The prefix that matches has a corresponding storage path, which the rest of the URL |
| 425 |
is assumed to be relative to. The file at that path (or a 404) is send to the client. |
| 426 |
Example: |
| 427 |
$wgImgAuthUrlPathMap['/timeline/'] = 'mwstore://local-fs/timeline-render/'; |
| 428 |
The above maps ".../img_auth.php/timeline/X" to "mwstore://local-fs/timeline-render/". |
| 429 |
The name "local-fs" should correspond by name to an entry in $wgFileBackends. |
| 430 |
@see self::FileBackends |
| 431 |
LocalFileRepo: |
| 432 |
default: false |
| 433 |
type: |
| 434 |
- object |
| 435 |
- boolean |
| 436 |
dynamicDefault: |
| 437 |
use: [UploadDirectory, ScriptPath, Favicon, UploadBaseUrl, UploadPath, HashedUploadDirectory, ThumbnailScriptPath, GenerateThumbnailOnParse, DeletedDirectory, UpdateCompatibleMetadata] |
| 438 |
callback: [MediaWiki\MainConfigSchema, getDefaultLocalFileRepo] |
| 439 |
description: |- |
| 440 |
File repository structures |
| 441 |
$wgLocalFileRepo is a single repository structure, and $wgForeignFileRepos is |
| 442 |
an array of such structures. Each repository structure is an associative |
| 443 |
array of properties configuring the repository. |
| 444 |
Properties required for all repos: |
| 445 |
- class The class name for the repository. May come from the core or an extension. |
| 446 |
The core repository classes are FileRepo, LocalRepo, ForeignDBRepo. |
| 447 |
- name A unique name for the repository (but $wgLocalFileRepo should be 'local'). |
| 448 |
The name should consist of alpha-numeric characters. |
| 449 |
Optional common properties: |
| 450 |
- backend A file backend name (see $wgFileBackends). If not specified, or |
| 451 |
if the name is not present in $wgFileBackends, an FSFileBackend |
| 452 |
will automatically be configured. |
| 453 |
- lockManager If a file backend is automatically configured, this will be lock |
| 454 |
manager name used. A lock manager named in $wgLockManagers, or one of |
| 455 |
the default lock managers "fsLockManager" or "nullLockManager". Default |
| 456 |
"fsLockManager". |
| 457 |
- favicon URL to a favicon. This is exposed via FileRepo::getInfo and |
| 458 |
ApiQueryFileRepoInfo. Originally for use by MediaViewer (T77093). |
| 459 |
For most core repos: |
| 460 |
- zones Associative array of zone names that each map to an array with: |
| 461 |
container : backend container name the zone is in |
| 462 |
directory : root path within container for the zone |
| 463 |
url : base URL to the root of the zone |
| 464 |
urlsByExt : map of file extension types to base URLs |
| 465 |
(useful for using a different cache for videos) |
| 466 |
Zones default to using "<repo name>-<zone name>" as the container name |
| 467 |
and default to using the container root as the zone's root directory. |
| 468 |
Nesting of zone locations within other zones should be avoided. |
| 469 |
- url Public zone URL. The 'zones' settings take precedence. |
| 470 |
- hashLevels The number of directory levels for hash-based division of files. |
| 471 |
Set this to 0 if you do not want MediaWiki to divide your images |
| 472 |
directory into many subdirectories. |
| 473 |
It is recommended to leave this enabled. In previous versions of |
| 474 |
MediaWiki, some users set this to false to allow images to be added to |
| 475 |
the wiki by copying them into $wgUploadDirectory and then running |
| 476 |
maintenance/rebuildImages.php to register them in the database. |
| 477 |
This is no longer supported, use maintenance/importImages.php instead. |
| 478 |
Default: 2. |
| 479 |
- deletedHashLevels |
| 480 |
Optional 'hashLevels' override for the 'deleted' zone. |
| 481 |
- thumbScriptUrl The URL for thumb.php (optional, not recommended) |
| 482 |
- transformVia404 Whether to skip media file transformation on parse and rely on a 404 |
| 483 |
handler instead. |
| 484 |
- thumbProxyUrl Optional. URL of where to proxy thumb.php requests to. This is |
| 485 |
also used internally for remote thumbnailing of upload stash files. |
| 486 |
Example: http://127.0.0.1:8888/wiki/dev/thumb/ |
| 487 |
- thumbProxySecret Optional value of the X-Swift-Secret header to use in requests to |
| 488 |
thumbProxyUrl |
| 489 |
- disableLocalTransform |
| 490 |
If present and true, local image scaling will be disabled. If attempted, |
| 491 |
it will show an error to the user and log an error message. To avoid an |
| 492 |
error, thumbProxyUrl must be set, as well as either transformVia404 |
| 493 |
(preferred) or thumbScriptUrl. |
| 494 |
- initialCapital Equivalent to $wgCapitalLinks (or $wgCapitalLinkOverrides[NS_FILE], |
| 495 |
determines whether filenames implicitly start with a capital letter. |
| 496 |
The current implementation may give incorrect description page links |
| 497 |
when the local $wgCapitalLinks and initialCapital are mismatched. |
| 498 |
- pathDisclosureProtection |
| 499 |
May be 'paranoid' to remove all parameters from error messages, 'none' to |
| 500 |
leave the paths in unchanged, or 'simple' to replace paths with |
| 501 |
placeholders. Default for LocalRepo is 'simple'. |
| 502 |
- fileMode This allows wikis to set the file mode when uploading/moving files. Default |
| 503 |
is 0644. |
| 504 |
- directory The local filesystem directory where public files are stored. Not used for |
| 505 |
some remote repos. |
| 506 |
- thumbDir The base thumbnail directory. Defaults to "<directory>/thumb". |
| 507 |
- thumbUrl The base thumbnail URL. Defaults to "<url>/thumb". |
| 508 |
- isPrivate Set this if measures should always be taken to keep the files private. |
| 509 |
One should not trust this to assure that the files are not web readable; |
| 510 |
the server configuration should be done manually depending on the backend. |
| 511 |
- useJsonMetadata Whether handler metadata should be stored in JSON format. Default: true. |
| 512 |
- useSplitMetadata Whether handler metadata should be split up and stored in the text table. |
| 513 |
Default: false. |
| 514 |
- splitMetadataThreshold |
| 515 |
If the media handler opts in, large metadata items will be split into a |
| 516 |
separate blob in the database if the item is larger than this threshold. |
| 517 |
Default: 1000 |
| 518 |
- updateCompatibleMetadata |
| 519 |
When true, image metadata will be upgraded by reloading it from the original |
| 520 |
file, if the handler indicates that it is out of date. |
| 521 |
By default, when purging a file or otherwise refreshing file metadata, it |
| 522 |
is only reloaded when the metadata is invalid. Valid data originally loaded |
| 523 |
by a current or older compatible version is left unchanged. Enable this |
| 524 |
to also reload and upgrade metadata that was stored by an older compatible |
| 525 |
version. See also MediaHandler::isMetadataValid, and RefreshImageMetadata. |
| 526 |
Default: false. |
| 527 |
- reserializeMetadata |
| 528 |
If true, image metadata will be automatically rewritten to the database |
| 529 |
if its serialization format is out of date. Default: false |
| 530 |
These settings describe a foreign MediaWiki installation. They are optional, and will be ignored |
| 531 |
for local repositories: |
| 532 |
- descBaseUrl URL of image description pages, e.g. https://en.wikipedia.org/wiki/File: |
| 533 |
- scriptDirUrl URL of the MediaWiki installation, equivalent to $wgScriptPath, e.g. |
| 534 |
https://en.wikipedia.org/w |
| 535 |
- articleUrl Equivalent to $wgArticlePath, e.g. https://en.wikipedia.org/wiki/$1 |
| 536 |
- fetchDescription Fetch the text of the remote file description page and display them |
| 537 |
on the local wiki. |
| 538 |
- abbrvThreshold File names over this size will use the short form of thumbnail names. |
| 539 |
Short thumbnail names only have the width, parameters, and the extension. |
| 540 |
ForeignDBRepo: |
| 541 |
- dbType, dbServer, dbUser, dbPassword, dbName, dbFlags |
| 542 |
equivalent to the corresponding member of $wgDBservers |
| 543 |
- tablePrefix Table prefix, the foreign wiki's $wgDBprefix |
| 544 |
- hasSharedCache Set to true if the foreign wiki's $wgMainCacheType is identical to, |
| 545 |
and accessible from, this wiki. |
| 546 |
ForeignAPIRepo: |
| 547 |
- apibase Use for the foreign API's URL |
| 548 |
- apiThumbCacheExpiry How long to locally cache thumbs for |
| 549 |
If you leave $wgLocalFileRepo set to false, Setup will fill in appropriate values. |
| 550 |
Otherwise, set $wgLocalFileRepo to a repository structure as described above. |
| 551 |
If you set $wgUseInstantCommons to true, it will add an entry for Commons. |
| 552 |
If you set $wgForeignFileRepos to an array of repository structures, those will |
| 553 |
be searched after the local file repo. |
| 554 |
Otherwise, you will only have access to local media files. |
| 555 |
@see \FileRepo::__construct for the default options. |
| 556 |
@see Setup.php for an example usage and default initialization. |
| 557 |
ForeignFileRepos: |
| 558 |
default: [] |
| 559 |
type: array |
| 560 |
description: |- |
| 561 |
Enable the use of files from one or more other wikis. |
| 562 |
If you operate multiple wikis, you can declare a shared upload path here. |
| 563 |
Uploads to the local wiki will NOT be stored here - See $wgLocalFileRepo |
| 564 |
and $wgUploadDirectory for that. |
| 565 |
The wiki will only consider the foreign repository if no file of the given name |
| 566 |
is found in the local repository (e.g. via `[[File:..]]` syntax). |
| 567 |
@since 1.11 |
| 568 |
@see self::LocalFileRepo |
| 569 |
UseInstantCommons: |
| 570 |
default: false |
| 571 |
description: |- |
| 572 |
Use Wikimedia Commons as a foreign file repository. |
| 573 |
This is a shortcut for adding an entry to $wgForeignFileRepos |
| 574 |
for https://commons.wikimedia.org, using ForeignAPIRepo with the |
| 575 |
default settings. |
| 576 |
@since 1.16 |
| 577 |
UseSharedUploads: |
| 578 |
default: false |
| 579 |
type: boolean |
| 580 |
description: |- |
| 581 |
Shortcut for adding an entry to $wgForeignFileRepos. |
| 582 |
Uses the following variables: |
| 583 |
- directory: $wgSharedUploadDirectory. |
| 584 |
- url: $wgSharedUploadPath. |
| 585 |
- hashLevels: Based on $wgHashedSharedUploadDirectory. |
| 586 |
- thumbScriptUrl: $wgSharedThumbnailScriptPath. |
| 587 |
- transformVia404: Based on $wgGenerateThumbnailOnParse. |
| 588 |
- descBaseUrl: $wgRepositoryBaseUrl. |
| 589 |
- fetchDescription: $wgFetchCommonsDescriptions. |
| 590 |
If $wgSharedUploadDBname is set, it uses the ForeignDBRepo |
| 591 |
class, with also the following variables: |
| 592 |
- dbName: $wgSharedUploadDBname. |
| 593 |
- dbType: $wgDBtype. |
| 594 |
- dbServer: $wgDBserver. |
| 595 |
- dbUser: $wgDBuser. |
| 596 |
- dbPassword: $wgDBpassword. |
| 597 |
- dbFlags: Based on $wgDebugDumpSql. |
| 598 |
- tablePrefix: $wgSharedUploadDBprefix, |
| 599 |
- hasSharedCache: $wgCacheSharedUploads. |
| 600 |
@since 1.3 |
| 601 |
SharedUploadDirectory: |
| 602 |
default: null |
| 603 |
type: |
| 604 |
- string |
| 605 |
- 'null' |
| 606 |
description: |- |
| 607 |
Shortcut for the 'directory' setting of $wgForeignFileRepos. |
| 608 |
Only used if $wgUseSharedUploads is enabled. |
| 609 |
@since 1.3 |
| 610 |
SharedUploadPath: |
| 611 |
default: null |
| 612 |
type: |
| 613 |
- string |
| 614 |
- 'null' |
| 615 |
description: |- |
| 616 |
Shortcut for the 'url' setting of $wgForeignFileRepos. |
| 617 |
Only used if $wgUseSharedUploads is enabled. |
| 618 |
@since 1.3 |
| 619 |
HashedSharedUploadDirectory: |
| 620 |
default: true |
| 621 |
type: boolean |
| 622 |
description: |- |
| 623 |
Shortcut for the 'hashLevels' setting of $wgForeignFileRepos. |
| 624 |
Only used if $wgUseSharedUploads is enabled. |
| 625 |
@since 1.3 |
| 626 |
RepositoryBaseUrl: |
| 627 |
default: 'https://commons.wikimedia.org/wiki/File:' |
| 628 |
description: |- |
| 629 |
Shortcut for the 'descBaseUrl' setting of $wgForeignFileRepos. |
| 630 |
Only used if $wgUseSharedUploads is enabled. |
| 631 |
@since 1.5 |
| 632 |
FetchCommonsDescriptions: |
| 633 |
default: false |
| 634 |
type: boolean |
| 635 |
description: |- |
| 636 |
Shortcut for the 'fetchDescription' setting of $wgForeignFileRepos. |
| 637 |
Only used if $wgUseSharedUploads is enabled. |
| 638 |
@since 1.5 |
| 639 |
SharedUploadDBname: |
| 640 |
default: false |
| 641 |
type: |
| 642 |
- boolean |
| 643 |
- string |
| 644 |
description: |- |
| 645 |
Shortcut for the ForeignDBRepo 'dbName' setting in $wgForeignFileRepos. |
| 646 |
Set this to false if the uploads do not come from a wiki. |
| 647 |
Only used if $wgUseSharedUploads is enabled. |
| 648 |
@since 1.4 |
| 649 |
SharedUploadDBprefix: |
| 650 |
default: '' |
| 651 |
type: string |
| 652 |
description: |- |
| 653 |
Shortcut for the ForeignDBRepo 'tablePrefix' setting in $wgForeignFileRepos. |
| 654 |
Only used if $wgUseSharedUploads is enabled. |
| 655 |
@since 1.5 |
| 656 |
CacheSharedUploads: |
| 657 |
default: true |
| 658 |
type: boolean |
| 659 |
description: |- |
| 660 |
Shortcut for the ForeignDBRepo 'hasSharedCache' setting in $wgForeignFileRepos. |
| 661 |
Only used if $wgUseSharedUploads is enabled. |
| 662 |
@since 1.5 |
| 663 |
ForeignUploadTargets: |
| 664 |
default: |
| 665 |
- local |
| 666 |
type: array |
| 667 |
description: |- |
| 668 |
Array of foreign file repo names (set in $wgForeignFileRepos above) that |
| 669 |
are allowable upload targets. These wikis must have some method of |
| 670 |
authentication (i.e. CentralAuth), and be CORS-enabled for this wiki. |
| 671 |
The string 'local' signifies the default local file repository. |
| 672 |
Example: |
| 673 |
$wgForeignUploadTargets = [ 'shared' ]; |
| 674 |
UploadDialog: |
| 675 |
default: |
| 676 |
fields: { description: true, date: false, categories: false } |
| 677 |
licensemessages: { local: generic-local, foreign: generic-foreign } |
| 678 |
comment: { local: '', foreign: '' } |
| 679 |
format: { filepage: $DESCRIPTION, description: $TEXT, ownwork: '', license: '', uncategorized: '' } |
| 680 |
type: object |
| 681 |
description: |- |
| 682 |
Configuration for file uploads using the embeddable upload dialog |
| 683 |
(https://www.mediawiki.org/wiki/Upload_dialog). |
| 684 |
This applies also to foreign uploads to this wiki (the configuration is loaded by remote |
| 685 |
wikis using the action=query&meta=siteinfo API). |
| 686 |
See below for documentation of each property. None of the properties may be omitted. |
| 687 |
FileBackends: |
| 688 |
default: { } |
| 689 |
type: object |
| 690 |
description: |- |
| 691 |
File backend structure configuration. |
| 692 |
This is an array of file backend configuration arrays. |
| 693 |
Each backend configuration has the following parameters: |
| 694 |
- name : A unique name for the backend |
| 695 |
- class : The file backend class to use |
| 696 |
- wikiId : A unique string that identifies the wiki (container prefix) |
| 697 |
- lockManager : The name of a lock manager (see $wgLockManagers) [optional] |
| 698 |
See FileBackend::__construct() for more details. |
| 699 |
Additional parameters are specific to the file backend class used. |
| 700 |
These settings should be global to all wikis when possible. |
| 701 |
FileBackendMultiWrite::__construct() is augmented with a 'template' option that |
| 702 |
can be used in any of the values of the 'backends' array. Its value is the name of |
| 703 |
another backend in $wgFileBackends. When set, it pre-fills the array with all of the |
| 704 |
configuration of the named backend. Explicitly set values in the array take precedence. |
| 705 |
There are two particularly important aspects about each backend: |
| 706 |
- a) Whether it is fully qualified or wiki-relative. |
| 707 |
By default, the paths of files are relative to the current wiki, |
| 708 |
which works via prefixing them with the current wiki ID when accessed. |
| 709 |
Setting 'domainId' forces the backend to be fully qualified by prefixing |
| 710 |
all paths with the specified value instead. This can be useful if |
| 711 |
multiple wikis need to share the same data. Note that 'name' is *not* |
| 712 |
part of any prefix and thus should not be relied upon for namespacing. |
| 713 |
- b) Whether it is only defined for some wikis or is defined on all |
| 714 |
wikis in the wiki farm. Defining a backend globally is useful |
| 715 |
if multiple wikis need to share the same data. |
| 716 |
One should be aware of these aspects when configuring a backend for use with |
| 717 |
any basic feature or plugin. For example, suppose an extension stores data for |
| 718 |
different wikis in different directories and sometimes needs to access data from |
| 719 |
a foreign wiki's directory in order to render a page on given wiki. The extension |
| 720 |
would need a fully qualified backend that is defined on all wikis in the wiki farm. |
| 721 |
LockManagers: |
| 722 |
default: [] |
| 723 |
type: array |
| 724 |
description: |- |
| 725 |
List of lock manager backend configurations. |
| 726 |
Each backend configuration has the following parameters: |
| 727 |
- name : A unique name for the lock manager |
| 728 |
- class : The lock manager class to use |
| 729 |
See LockManager::__construct() for more details. |
| 730 |
Additional parameters are specific to the lock manager class used. |
| 731 |
These settings should be global to all wikis. |
| 732 |
ShowEXIF: |
| 733 |
dynamicDefault: |
| 734 |
callback: [MediaWiki\MainConfigSchema, getDefaultShowEXIF] |
| 735 |
description: |- |
| 736 |
Whether to show Exif data. |
| 737 |
The effective default value is determined at runtime: |
| 738 |
enabled if PHP's EXIF extension module is loaded. |
| 739 |
Requires PHP's Exif extension: https://www.php.net/manual/en/ref.exif.php |
| 740 |
@note FOR WINDOWS USERS: |
| 741 |
To enable Exif functions, add the following line to the "Windows |
| 742 |
extensions" section of php.ini: |
| 743 |
```{.ini} |
| 744 |
extension=extensions/php_exif.dll |
| 745 |
``` |
| 746 |
default: null |
| 747 |
UpdateCompatibleMetadata: |
| 748 |
default: false |
| 749 |
description: 'Shortcut for the ''updateCompatibleMetadata'' setting of $wgLocalFileRepo.' |
| 750 |
AllowCopyUploads: |
| 751 |
default: false |
| 752 |
description: |- |
| 753 |
Allow for upload to be copied from an URL. |
| 754 |
The timeout for copy uploads is set by $wgCopyUploadTimeout. |
| 755 |
You have to assign the user right 'upload_by_url' to a user group, to use this. |
| 756 |
CopyUploadsDomains: |
| 757 |
default: [] |
| 758 |
type: array |
| 759 |
description: |- |
| 760 |
A list of domains copy uploads can come from |
| 761 |
@since 1.20 |
| 762 |
CopyUploadsFromSpecialUpload: |
| 763 |
default: false |
| 764 |
description: |- |
| 765 |
Enable copy uploads from Special:Upload. $wgAllowCopyUploads must also be |
| 766 |
true. If $wgAllowCopyUploads is true, but this is false, you will only be |
| 767 |
able to perform copy uploads from the API or extensions (e.g. UploadWizard). |
| 768 |
CopyUploadProxy: |
| 769 |
default: false |
| 770 |
description: |- |
| 771 |
Proxy to use for copy upload requests. |
| 772 |
@since 1.20 |
| 773 |
CopyUploadTimeout: |
| 774 |
default: false |
| 775 |
type: |
| 776 |
- boolean |
| 777 |
- integer |
| 778 |
description: |- |
| 779 |
Different timeout for upload by url |
| 780 |
This could be useful since when fetching large files, you may want a |
| 781 |
timeout longer than the default $wgHTTPTimeout. False means fallback |
| 782 |
to default. |
| 783 |
@since 1.22 |
| 784 |
CopyUploadAllowOnWikiDomainConfig: |
| 785 |
default: false |
| 786 |
description: |- |
| 787 |
If true, the value of $wgCopyUploadsDomains will be merged with the |
| 788 |
contents of MediaWiki:Copyupload-allowed-domains. |
| 789 |
@since 1.39 |
| 790 |
MaxUploadSize: |
| 791 |
default: 104857600 |
| 792 |
description: |- |
| 793 |
Max size for uploads, in bytes. |
| 794 |
If not set to an array, applies to all uploads. If set to an array, per upload |
| 795 |
type maximums can be set, using the file and url keys. If the `*` key is set |
| 796 |
this value will be used as maximum for non-specified types. |
| 797 |
The below example would set the maximum for all uploads to 250 KiB except, |
| 798 |
for upload-by-url, which would have a maximum of 500 KiB. |
| 799 |
**Example:** |
| 800 |
``` |
| 801 |
$wgMaxUploadSize = [ |
| 802 |
'*' => 250 * 1024, |
| 803 |
'url' => 500 * 1024, |
| 804 |
]; |
| 805 |
``` |
| 806 |
Default: 100 MiB. |
| 807 |
MinUploadChunkSize: |
| 808 |
default: 1024 |
| 809 |
description: |- |
| 810 |
Minimum upload chunk size, in bytes. |
| 811 |
When using chunked upload, non-final chunks smaller than this will be rejected. |
| 812 |
Note that this may be further reduced by the `upload_max_filesize` and |
| 813 |
`post_max_size` PHP settings. Use ApiUpload::getMinUploadChunkSize to |
| 814 |
get the effective minimum chunk size used by MediaWiki. |
| 815 |
Default: 1 KiB. |
| 816 |
@since 1.26 |
| 817 |
@see \ApiUpload::getMinUploadChunkSize |
| 818 |
UploadNavigationUrl: |
| 819 |
default: false |
| 820 |
description: |- |
| 821 |
Point the upload navigation link to an external URL |
| 822 |
Useful if you want to use a shared repository by default |
| 823 |
without disabling local uploads (use $wgEnableUploads = false for that). |
| 824 |
**Example:** |
| 825 |
``` |
| 826 |
$wgUploadNavigationUrl = 'https://commons.wikimedia.org/wiki/Special:Upload'; |
| 827 |
``` |
| 828 |
UploadMissingFileUrl: |
| 829 |
default: false |
| 830 |
description: |- |
| 831 |
Point the upload link for missing files to an external URL, as with |
| 832 |
$wgUploadNavigationUrl. The URL will get "(?|&)wpDestFile=<filename>" |
| 833 |
appended to it as appropriate. |
| 834 |
ThumbnailScriptPath: |
| 835 |
default: false |
| 836 |
description: |- |
| 837 |
Give a path here to use thumb.php for thumbnail generation on client |
| 838 |
request, instead of generating them on render and outputting a static URL. |
| 839 |
This is necessary if some of your apache servers don't have read/write |
| 840 |
access to the thumbnail path. |
| 841 |
**Example:** |
| 842 |
``` |
| 843 |
$wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php"; |
| 844 |
``` |
| 845 |
SharedThumbnailScriptPath: |
| 846 |
default: false |
| 847 |
type: |
| 848 |
- string |
| 849 |
- boolean |
| 850 |
description: |- |
| 851 |
Shortcut for the 'thumbScriptUrl' setting of $wgForeignFileRepos. |
| 852 |
Only used if $wgUseSharedUploads is enabled. |
| 853 |
@since 1.3 |
| 854 |
HashedUploadDirectory: |
| 855 |
default: true |
| 856 |
type: boolean |
| 857 |
description: |- |
| 858 |
Shortcut for setting `hashLevels=2` in $wgLocalFileRepo. |
| 859 |
@note Only used if $wgLocalFileRepo is not set. |
| 860 |
FileExtensions: |
| 861 |
default: |
| 862 |
- png |
| 863 |
- gif |
| 864 |
- jpg |
| 865 |
- jpeg |
| 866 |
- webp |
| 867 |
type: array |
| 868 |
description: |- |
| 869 |
This is the list of preferred extensions for uploading files. Uploading files |
| 870 |
with extensions not in this list will trigger a warning. |
| 871 |
@warning If you add any OpenOffice or Microsoft Office file formats here, |
| 872 |
such as odt or doc, and untrusted users are allowed to upload files, then |
| 873 |
your wiki will be vulnerable to cross-site request forgery (CSRF). |
| 874 |
ProhibitedFileExtensions: |
| 875 |
default: |
| 876 |
- html |
| 877 |
- htm |
| 878 |
- js |
| 879 |
- jsb |
| 880 |
- mhtml |
| 881 |
- mht |
| 882 |
- xhtml |
| 883 |
- xht |
| 884 |
- php |
| 885 |
- phtml |
| 886 |
- php3 |
| 887 |
- php4 |
| 888 |
- php5 |
| 889 |
- phps |
| 890 |
- phar |
| 891 |
- shtml |
| 892 |
- jhtml |
| 893 |
- pl |
| 894 |
- py |
| 895 |
- cgi |
| 896 |
- exe |
| 897 |
- scr |
| 898 |
- dll |
| 899 |
- msi |
| 900 |
- vbs |
| 901 |
- bat |
| 902 |
- com |
| 903 |
- pif |
| 904 |
- cmd |
| 905 |
- vxd |
| 906 |
- cpl |
| 907 |
- xml |
| 908 |
type: array |
| 909 |
description: |- |
| 910 |
Files with these extensions will never be allowed as uploads. |
| 911 |
An array of file extensions to prevent being uploaded. You should |
| 912 |
append to this array if you want to prevent additional file extensions. |
| 913 |
@since 1.37; previously $wgFileBlacklist |
| 914 |
MimeTypeExclusions: |
| 915 |
default: |
| 916 |
- text/html |
| 917 |
- application/javascript |
| 918 |
- text/javascript |
| 919 |
- text/x-javascript |
| 920 |
- application/x-shellscript |
| 921 |
- application/x-php |
| 922 |
- text/x-php |
| 923 |
- text/x-python |
| 924 |
- text/x-perl |
| 925 |
- text/x-bash |
| 926 |
- text/x-sh |
| 927 |
- text/x-csh |
| 928 |
- text/scriptlet |
| 929 |
- application/x-msdownload |
| 930 |
- application/x-msmetafile |
| 931 |
- application/java |
| 932 |
- application/xml |
| 933 |
- text/xml |
| 934 |
type: array |
| 935 |
description: |- |
| 936 |
Files with these MIME types will never be allowed as uploads |
| 937 |
if $wgVerifyMimeType is enabled. |
| 938 |
@since 1.37; previously $wgMimeTypeBlacklist |
| 939 |
CheckFileExtensions: |
| 940 |
default: true |
| 941 |
description: |- |
| 942 |
This is a flag to determine whether or not to check file extensions on upload. |
| 943 |
@warning Setting this to false is insecure for public wikis. |
| 944 |
StrictFileExtensions: |
| 945 |
default: true |
| 946 |
description: |- |
| 947 |
If this is turned off, users may override the warning for files not covered |
| 948 |
by $wgFileExtensions. |
| 949 |
@warning Setting this to false is insecure for public wikis. |
| 950 |
DisableUploadScriptChecks: |
| 951 |
default: false |
| 952 |
description: |- |
| 953 |
Setting this to true will disable the upload system's checks for HTML/JavaScript. |
| 954 |
@warning THIS IS VERY DANGEROUS on a publicly editable site, so USE |
| 955 |
$wgGroupPermissions TO RESTRICT UPLOADING to only those that you trust |
| 956 |
UploadSizeWarning: |
| 957 |
default: false |
| 958 |
description: 'Warn if uploaded files are larger than this (in bytes), or false to disable' |
| 959 |
TrustedMediaFormats: |
| 960 |
default: |
| 961 |
- BITMAP |
| 962 |
- AUDIO |
| 963 |
- VIDEO |
| 964 |
- image/svg+xml |
| 965 |
- application/pdf |
| 966 |
type: array |
| 967 |
description: |- |
| 968 |
list of trusted media-types and MIME types. |
| 969 |
Use the MEDIATYPE_xxx constants to represent media types. |
| 970 |
This list is used by File::isSafeFile |
| 971 |
Types not listed here will have a warning about unsafe content |
| 972 |
displayed on the images description page. It would also be possible |
| 973 |
to use this for further restrictions, like disabling direct |
| 974 |
[[media:...]] links for non-trusted formats. |
| 975 |
MediaHandlers: |
| 976 |
default: { } |
| 977 |
type: object |
| 978 |
description: |- |
| 979 |
Plugins for media file type handling. |
| 980 |
Each entry in the array maps a MIME type to a class name |
| 981 |
Core media handlers are listed in MediaHandlerFactory, |
| 982 |
and extensions should use extension.json. |
| 983 |
NativeImageLazyLoading: |
| 984 |
default: false |
| 985 |
type: boolean |
| 986 |
description: |- |
| 987 |
Toggles native image lazy loading, via the "loading" attribute. |
| 988 |
@unstable EXPERIMENTAL |
| 989 |
@since 1.34 |
| 990 |
ParserTestMediaHandlers: |
| 991 |
default: |
| 992 |
image/jpeg: MockBitmapHandler |
| 993 |
image/png: MockBitmapHandler |
| 994 |
image/gif: MockBitmapHandler |
| 995 |
image/tiff: MockBitmapHandler |
| 996 |
image/webp: MockBitmapHandler |
| 997 |
image/x-ms-bmp: MockBitmapHandler |
| 998 |
image/x-bmp: MockBitmapHandler |
| 999 |
image/x-xcf: MockBitmapHandler |
| 1000 |
image/svg+xml: MockSvgHandler |
| 1001 |
image/vnd.djvu: MockDjVuHandler |
| 1002 |
type: object |
| 1003 |
description: |- |
| 1004 |
Media handler overrides for parser tests (they don't need to generate actual |
| 1005 |
thumbnails, so a mock will do) |
| 1006 |
UseImageResize: |
| 1007 |
default: true |
| 1008 |
description: |- |
| 1009 |
Whether to enable server-side image thumbnailing. If false, images will |
| 1010 |
always be sent to the client in full resolution, with appropriate width= and |
| 1011 |
height= attributes on the <img> tag for the client to do its own scaling. |
| 1012 |
UseImageMagick: |
| 1013 |
default: false |
| 1014 |
description: |- |
| 1015 |
Resizing can be done using PHP's internal image libraries or using |
| 1016 |
ImageMagick or another third-party converter, e.g. GraphicMagick. |
| 1017 |
These support more file formats than PHP, which only supports PNG, |
| 1018 |
GIF, JPG, XBM and WBMP. |
| 1019 |
Use Image Magick instead of PHP builtin functions. |
| 1020 |
ImageMagickConvertCommand: |
| 1021 |
default: /usr/bin/convert |
| 1022 |
description: 'The convert command shipped with ImageMagick' |
| 1023 |
MaxInterlacingAreas: |
| 1024 |
default: { } |
| 1025 |
type: object |
| 1026 |
description: |- |
| 1027 |
Array of max pixel areas for interlacing per MIME type |
| 1028 |
@since 1.27 |
| 1029 |
SharpenParameter: |
| 1030 |
default: 0x0.4 |
| 1031 |
description: 'Sharpening parameter to ImageMagick' |
| 1032 |
SharpenReductionThreshold: |
| 1033 |
default: 0.85 |
| 1034 |
description: 'Reduction in linear dimensions below which sharpening will be enabled' |
| 1035 |
ImageMagickTempDir: |
| 1036 |
default: false |
| 1037 |
description: |- |
| 1038 |
Temporary directory used for ImageMagick. The directory must exist. Leave |
| 1039 |
this set to false to let ImageMagick decide for itself. |
| 1040 |
CustomConvertCommand: |
| 1041 |
default: false |
| 1042 |
description: |- |
| 1043 |
Use another resizing converter, e.g. GraphicMagick |
| 1044 |
%s will be replaced with the source path, %d with the destination |
| 1045 |
%w and %h will be replaced with the width and height. |
| 1046 |
**Example for GraphicMagick:** |
| 1047 |
``` |
| 1048 |
$wgCustomConvertCommand = "gm convert %s -resize %wx%h %d" |
| 1049 |
``` |
| 1050 |
Leave as false to skip this. |
| 1051 |
JpegTran: |
| 1052 |
default: /usr/bin/jpegtran |
| 1053 |
description: |- |
| 1054 |
used for lossless jpeg rotation |
| 1055 |
@since 1.21 |
| 1056 |
JpegPixelFormat: |
| 1057 |
default: yuv420 |
| 1058 |
description: |- |
| 1059 |
At default setting of 'yuv420', JPEG thumbnails will use 4:2:0 chroma |
| 1060 |
subsampling to reduce file size, at the cost of possible color fringing |
| 1061 |
at sharp edges. |
| 1062 |
See https://en.wikipedia.org/wiki/Chroma_subsampling |
| 1063 |
Supported values: |
| 1064 |
false - use scaling system's default (same as pre-1.27 behavior) |
| 1065 |
'yuv444' - luma and chroma at same resolution |
| 1066 |
'yuv422' - chroma at 1/2 resolution horizontally, full vertically |
| 1067 |
'yuv420' - chroma at 1/2 resolution in both dimensions |
| 1068 |
This setting is currently supported only for the ImageMagick backend; |
| 1069 |
others may default to 4:2:0 or 4:4:4 or maintaining the source file's |
| 1070 |
sampling in the thumbnail. |
| 1071 |
@since 1.27 |
| 1072 |
JpegQuality: |
| 1073 |
default: 80 |
| 1074 |
description: |- |
| 1075 |
When scaling a JPEG thumbnail, this is the quality we request |
| 1076 |
from the backend. It should be an integer between 1 and 100, |
| 1077 |
with 100 indicating 100% quality. |
| 1078 |
@since 1.32 |
| 1079 |
Exiv2Command: |
| 1080 |
default: /usr/bin/exiv2 |
| 1081 |
description: |- |
| 1082 |
Some tests and extensions use exiv2 to manipulate the Exif metadata in some |
| 1083 |
image formats. |
| 1084 |
Exiftool: |
| 1085 |
default: /usr/bin/exiftool |
| 1086 |
description: |- |
| 1087 |
Path to exiftool binary. Used for lossless ICC profile swapping. |
| 1088 |
@since 1.26 |
| 1089 |
SVGConverters: |
| 1090 |
default: |
| 1091 |
ImageMagick: '$path/convert -background "#ffffff00" -thumbnail $widthx$height\! $input PNG:$output' |
| 1092 |
sodipodi: '$path/sodipodi -z -w $width -f $input -e $output' |
| 1093 |
inkscape: '$path/inkscape -z -w $width -f $input -e $output' |
| 1094 |
batik: 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input' |
| 1095 |
rsvg: '$path/rsvg-convert -w $width -h $height -o $output $input' |
| 1096 |
imgserv: '$path/imgserv-wrapper -i svg -o png -w$width $input $output' |
| 1097 |
ImagickExt: ['SvgHandler::rasterizeImagickExt'] |
| 1098 |
type: object |
| 1099 |
description: |- |
| 1100 |
Scalable Vector Graphics (SVG) may be uploaded as images. |
| 1101 |
Since SVG support is not yet standard in browsers, it is |
| 1102 |
necessary to rasterize SVGs to PNG as a fallback format. |
| 1103 |
An external program is required to perform this conversion. |
| 1104 |
If set to an array, the first item is a PHP callable and any further items |
| 1105 |
are passed as parameters after $srcPath, $dstPath, $width, $height |
| 1106 |
SVGConverter: |
| 1107 |
default: ImageMagick |
| 1108 |
description: 'Pick a converter defined in $wgSVGConverters' |
| 1109 |
SVGConverterPath: |
| 1110 |
default: '' |
| 1111 |
description: 'If not in the executable PATH, specify the SVG converter path.' |
| 1112 |
SVGMaxSize: |
| 1113 |
default: 5120 |
| 1114 |
description: 'Don''t scale a SVG larger than this' |
| 1115 |
SVGMetadataCutoff: |
| 1116 |
default: 5242880 |
| 1117 |
description: |- |
| 1118 |
Don't read SVG metadata beyond this point. |
| 1119 |
Default is 5 MiB |
| 1120 |
SVGNativeRendering: |
| 1121 |
default: false |
| 1122 |
type: |
| 1123 |
- string |
| 1124 |
- boolean |
| 1125 |
description: |- |
| 1126 |
Whether native rendering by the browser agent is allowed |
| 1127 |
Default is false. Setting it to true disables all SVG conversion. |
| 1128 |
Setting to the string 'partial' will only allow native rendering |
| 1129 |
when the filesize is below SVGNativeRenderingSizeLimit and if the |
| 1130 |
file contains at most 1 language. |
| 1131 |
@since 1.41 |
| 1132 |
SVGNativeRenderingSizeLimit: |
| 1133 |
default: 51200 |
| 1134 |
description: |- |
| 1135 |
Filesize limit for allowing SVGs to render natively by the browser agent |
| 1136 |
Default is 50kB. |
| 1137 |
@since 1.41 |
| 1138 |
MediaInTargetLanguage: |
| 1139 |
default: true |
| 1140 |
description: |- |
| 1141 |
Whether thumbnails should be generated in target language (usually, same as |
| 1142 |
page language), if available. |
| 1143 |
Currently, applies only to SVG images that use the systemLanguage attribute |
| 1144 |
to specify text language. |
| 1145 |
@since 1.33 |
| 1146 |
MaxImageArea: |
| 1147 |
default: 12500000 |
| 1148 |
type: |
| 1149 |
- string |
| 1150 |
- integer |
| 1151 |
- boolean |
| 1152 |
description: |- |
| 1153 |
The maximum number of pixels a source image can have if it is to be scaled |
| 1154 |
down by a scaler that requires the full source image to be decompressed |
| 1155 |
and stored in decompressed form, before the thumbnail is generated. |
| 1156 |
This provides a limit on memory usage for the decompression side of the |
| 1157 |
image scaler. The limit is used when scaling PNGs with any of the |
| 1158 |
built-in image scalers, such as ImageMagick or GD. It is ignored for |
| 1159 |
JPEGs with ImageMagick, and when using the VipsScaler extension. |
| 1160 |
If set to false, MediaWiki will not check the size of the image before |
| 1161 |
attempting to scale it. Extensions may still override this setting by |
| 1162 |
using the BitmapHandlerCheckImageArea hook. |
| 1163 |
The default is 50 MB if decompressed to RGBA form, which corresponds to |
| 1164 |
12.5 million pixels or 3500x3500. |
| 1165 |
MaxAnimatedGifArea: |
| 1166 |
default: 12500000 |
| 1167 |
description: |- |
| 1168 |
Force thumbnailing of animated GIFs above this size to a single |
| 1169 |
frame instead of an animated thumbnail. As of MW 1.17 this limit |
| 1170 |
is checked against the total size of all frames in the animation. |
| 1171 |
It probably makes sense to keep this equal to $wgMaxImageArea. |
| 1172 |
TiffThumbnailType: |
| 1173 |
default: [] |
| 1174 |
type: array |
| 1175 |
mergeStrategy: replace |
| 1176 |
description: |- |
| 1177 |
Browsers don't support TIFF inline generally... |
| 1178 |
For inline display, we need to convert to PNG or JPEG. |
| 1179 |
Note scaling should work with ImageMagick, but may not with GD scaling. |
| 1180 |
**Example:** |
| 1181 |
``` |
| 1182 |
// PNG is lossless, but inefficient for photos |
| 1183 |
$wgTiffThumbnailType = [ 'png', 'image/png' ]; |
| 1184 |
// JPEG is good for photos, but has no transparency support. Bad for diagrams. |
| 1185 |
$wgTiffThumbnailType = [ 'jpg', 'image/jpeg' ]; |
| 1186 |
``` |
| 1187 |
ThumbnailEpoch: |
| 1188 |
default: '20030516000000' |
| 1189 |
description: |- |
| 1190 |
If rendered thumbnail files are older than this timestamp, they |
| 1191 |
will be rerendered on demand as if the file didn't already exist. |
| 1192 |
Update if there is some need to force thumbs and SVG rasterizations |
| 1193 |
to rerender, such as fixes to rendering bugs. |
| 1194 |
AttemptFailureEpoch: |
| 1195 |
default: 1 |
| 1196 |
description: |- |
| 1197 |
Certain operations are avoided if there were too many recent failures, |
| 1198 |
for example, thumbnail generation. Bump this value to invalidate all |
| 1199 |
memory of failed operations and thus allow further attempts to resume. |
| 1200 |
This is useful when a cause for the failures has been found and fixed. |
| 1201 |
IgnoreImageErrors: |
| 1202 |
default: false |
| 1203 |
description: |- |
| 1204 |
If set, inline scaled images will still produce "<img>" tags ready for |
| 1205 |
output instead of showing an error message. |
| 1206 |
This may be useful if errors are transitory, especially if the site |
| 1207 |
is configured to automatically render thumbnails on request. |
| 1208 |
On the other hand, it may obscure error conditions from debugging. |
| 1209 |
Enable the debug log or the 'thumbnail' log group to make sure errors |
| 1210 |
are logged to a file for review. |
| 1211 |
GenerateThumbnailOnParse: |
| 1212 |
default: true |
| 1213 |
type: boolean |
| 1214 |
description: |- |
| 1215 |
Render thumbnails while parsing wikitext. |
| 1216 |
If set to false, then the Parser will output valid thumbnail URLs without |
| 1217 |
generating or storing the thumbnail files. This can significantly speed up |
| 1218 |
processing on the web server. The site admin needs to configure a 404 handler |
| 1219 |
in order for the URLs in question to regenerate the thumbnails in question |
| 1220 |
on-demand. This can enable concurrency and also save computing resources |
| 1221 |
as not every resolution of every image on every page is accessed between |
| 1222 |
re-parses of the article. For example, re-parses triggered by bot edits, |
| 1223 |
or cascading updates from template edits. |
| 1224 |
If you use $wgLocalFileRepo, then you will also need to set the following: |
| 1225 |
``` |
| 1226 |
$wgLocalFileRepo['transformVia404'] = true; |
| 1227 |
``` |
| 1228 |
@since 1.7.0 |
| 1229 |
ShowArchiveThumbnails: |
| 1230 |
default: true |
| 1231 |
description: 'Show thumbnails for old images on the image description page' |
| 1232 |
EnableAutoRotation: |
| 1233 |
default: null |
| 1234 |
type: |
| 1235 |
- boolean |
| 1236 |
- 'null' |
| 1237 |
description: |- |
| 1238 |
If set to true, images that contain certain the exif orientation tag will |
| 1239 |
be rotated accordingly. If set to null, try to auto-detect whether a scaler |
| 1240 |
is available that can rotate. |
| 1241 |
Antivirus: |
| 1242 |
default: null |
| 1243 |
type: |
| 1244 |
- string |
| 1245 |
- 'null' |
| 1246 |
description: |- |
| 1247 |
Internal name of virus scanner. This serves as a key to the |
| 1248 |
$wgAntivirusSetup array. Set this to NULL to disable virus scanning. If not |
| 1249 |
null, every file uploaded will be scanned for viruses. |
| 1250 |
AntivirusSetup: |
| 1251 |
default: |
| 1252 |
clamav: { command: 'clamscan --no-summary ', codemap: { 0: 0, 1: 1, 52: -1, '*': false }, messagepattern: '/.*?:(.*)/sim' } |
| 1253 |
type: object |
| 1254 |
description: |- |
| 1255 |
Configuration for different virus scanners. This an associative array of |
| 1256 |
associative arrays. It contains one setup array per known scanner type. |
| 1257 |
The entry is selected by $wgAntivirus, i.e. |
| 1258 |
valid values for $wgAntivirus are the keys defined in this array. |
| 1259 |
The configuration array for each scanner contains the following keys: |
| 1260 |
"command", "codemap", "messagepattern": |
| 1261 |
"command" is the full command to call the virus scanner - %f will be |
| 1262 |
replaced with the name of the file to scan. If not present, the filename |
| 1263 |
will be appended to the command. Note that this must be overwritten if the |
| 1264 |
scanner is not in the system path; in that case, please set |
| 1265 |
$wgAntivirusSetup[$wgAntivirus]['command'] to the desired command with full |
| 1266 |
path. |
| 1267 |
"codemap" is a mapping of exit code to return codes of the detectVirus |
| 1268 |
function in SpecialUpload. |
| 1269 |
- An exit code mapped to AV_SCAN_FAILED causes the function to consider |
| 1270 |
the scan to be failed. This will pass the file if $wgAntivirusRequired |
| 1271 |
is not set. |
| 1272 |
- An exit code mapped to AV_SCAN_ABORTED causes the function to consider |
| 1273 |
the file to have an unsupported format, which is probably immune to |
| 1274 |
viruses. This causes the file to pass. |
| 1275 |
- An exit code mapped to AV_NO_VIRUS will cause the file to pass, meaning |
| 1276 |
no virus was found. |
| 1277 |
- All other codes (like AV_VIRUS_FOUND) will cause the function to report |
| 1278 |
a virus. |
| 1279 |
- You may use "*" as a key in the array to catch all exit codes not mapped otherwise. |
| 1280 |
"messagepattern" is a perl regular expression to extract the meaningful part of the scanners |
| 1281 |
output. The relevant part should be matched as group one (\1). |
| 1282 |
If not defined or the pattern does not match, the full message is shown to the user. |
| 1283 |
AntivirusRequired: |
| 1284 |
default: true |
| 1285 |
description: 'Determines if a failed virus scan (AV_SCAN_FAILED) will cause the file to be rejected.' |
| 1286 |
VerifyMimeType: |
| 1287 |
default: true |
| 1288 |
description: 'Determines if the MIME type of uploaded files should be checked' |
| 1289 |
MimeTypeFile: |
| 1290 |
default: internal |
| 1291 |
description: |- |
| 1292 |
Sets the MIME type definition file to use by includes/libs/mime/MimeAnalyzer.php. |
| 1293 |
When this is set to the path of a mime.types file, MediaWiki will use this |
| 1294 |
file to map MIME types to file extensions and vice versa, in lieu of its |
| 1295 |
internal MIME map. Note that some MIME mappings are considered "baked in" |
| 1296 |
and cannot be overridden. See includes/libs/mime/MimeMapMinimal.php for a |
| 1297 |
full list. |
| 1298 |
example: $wgMimeTypeFile = '/etc/mime.types'; |
| 1299 |
MimeInfoFile: |
| 1300 |
default: internal |
| 1301 |
description: |- |
| 1302 |
Sets the MIME type info file to use by includes/libs/mime/MimeAnalyzer.php. |
| 1303 |
Set to null to use the minimum set of built-in defaults only. |
| 1304 |
MimeDetectorCommand: |
| 1305 |
default: null |
| 1306 |
type: |
| 1307 |
- string |
| 1308 |
- 'null' |
| 1309 |
description: |- |
| 1310 |
Sets an external MIME detector program. The command must print only |
| 1311 |
the MIME type to standard output. |
| 1312 |
The name of the file to process will be appended to the command given here. |
| 1313 |
If not set or NULL, PHP's mime_content_type function will be used. |
| 1314 |
**Example:** |
| 1315 |
``` |
| 1316 |
#$wgMimeDetectorCommand = "file -bi"; // use external MIME detector (Linux) |
| 1317 |
``` |
| 1318 |
TrivialMimeDetection: |
| 1319 |
default: false |
| 1320 |
description: |- |
| 1321 |
Switch for trivial MIME detection. Used by thumb.php to disable all fancy |
| 1322 |
things, because only a few types of images are needed and file extensions |
| 1323 |
can be trusted. |
| 1324 |
XMLMimeTypes: |
| 1325 |
default: |
| 1326 |
'http://www.w3.org/2000/svg:svg': image/svg+xml |
| 1327 |
svg: image/svg+xml |
| 1328 |
'http://www.lysator.liu.se/~alla/dia/:diagram': application/x-dia-diagram |
| 1329 |
'http://www.w3.org/1999/xhtml:html': text/html |
| 1330 |
html: text/html |
| 1331 |
type: object |
| 1332 |
description: |- |
| 1333 |
Additional XML types we can allow via MIME-detection. |
| 1334 |
array = [ 'rootElement' => 'associatedMimeType' ] |
| 1335 |
ImageLimits: |
| 1336 |
default: |
| 1337 |
- [320, 240] |
| 1338 |
- [640, 480] |
| 1339 |
- [800, 600] |
| 1340 |
- [1024, 768] |
| 1341 |
- [1280, 1024] |
| 1342 |
- [2560, 2048] |
| 1343 |
type: array |
| 1344 |
description: |- |
| 1345 |
Limit images on image description pages to a user-selectable limit. |
| 1346 |
In order to reduce disk usage, limits can only be selected from this list. |
| 1347 |
The user preference is saved as an array offset in the database, by default |
| 1348 |
the offset is set with $wgDefaultUserOptions['imagesize']. Make sure you |
| 1349 |
change it if you alter the array (see T10858). |
| 1350 |
This list is also used by ImagePage for alternate size links. |
| 1351 |
ThumbLimits: |
| 1352 |
default: |
| 1353 |
- 120 |
| 1354 |
- 150 |
| 1355 |
- 180 |
| 1356 |
- 200 |
| 1357 |
- 250 |
| 1358 |
- 300 |
| 1359 |
type: array |
| 1360 |
description: |- |
| 1361 |
Adjust thumbnails on image pages according to a user setting. In order to |
| 1362 |
reduce disk usage, the values can only be selected from a list. This is the |
| 1363 |
list of settings the user can choose from: |
| 1364 |
ThumbnailNamespaces: |
| 1365 |
default: |
| 1366 |
- 6 |
| 1367 |
type: array |
| 1368 |
items: |
| 1369 |
type: integer |
| 1370 |
description: |- |
| 1371 |
Defines what namespaces thumbnails will be displayed for in Special:Search. |
| 1372 |
This is the list of namespaces for which thumbnails (or a placeholder in |
| 1373 |
the absence of a thumbnail) will be shown: |
| 1374 |
ThumbnailSteps: |
| 1375 |
default: null |
| 1376 |
type: |
| 1377 |
- array |
| 1378 |
- 'null' |
| 1379 |
description: |- |
| 1380 |
Array of image widths used as steps for thumbnail sizes. |
| 1381 |
Requested thumbnail widths are rounded up to the nearest step |
| 1382 |
The thumbnail with smallest step that has larger value than requested will be shown |
| 1383 |
but it will be downsized via HTML values. |
| 1384 |
It increases the bandwidth to the users by serving slightly large thumbnail sizes they |
| 1385 |
have requested but it will save resources by de-duplicating thumbnail generation and storage. |
| 1386 |
Note that these steps are "best effort" and MediaWiki might decide to use the requested size |
| 1387 |
for any reason. |
| 1388 |
@see MediaWiki\Media\ImageHandler::getSteppedThumbWidth |
| 1389 |
@since 1.43.7 |
| 1390 |
ThumbnailStepsRatio: |
| 1391 |
default: null |
| 1392 |
type: |
| 1393 |
- number |
| 1394 |
- 'null' |
| 1395 |
description: |- |
| 1396 |
Ratio of images that will use the thumbnail steps |
| 1397 |
This is to allow for gradual roll out of thumbnail steps. It should be a number between 0 and 1. |
| 1398 |
The precision of this value is up to 0.001, anything below that will be ignored. |
| 1399 |
ThumbnailBuckets: |
| 1400 |
default: null |
| 1401 |
type: |
| 1402 |
- array |
| 1403 |
- 'null' |
| 1404 |
description: |- |
| 1405 |
When defined, is an array of image widths used as buckets for thumbnail generation. |
| 1406 |
The goal is to save resources by generating thumbnails based on reference buckets instead of |
| 1407 |
always using the original. This will incur a speed gain but cause a quality loss. |
| 1408 |
The buckets generation is chained, with each bucket generated based on the above bucket |
| 1409 |
when possible. File handlers have to opt into using that feature. For now only BitmapHandler |
| 1410 |
supports it. |
| 1411 |
ThumbnailMinimumBucketDistance: |
| 1412 |
default: 50 |
| 1413 |
description: |- |
| 1414 |
When using thumbnail buckets as defined above, this sets the minimum distance to the bucket |
| 1415 |
above the requested size. The distance represents how many extra pixels of width the bucket |
| 1416 |
needs in order to be used as the reference for a given thumbnail. For example, with the |
| 1417 |
following buckets: |
| 1418 |
$wgThumbnailBuckets = [ 128, 256, 512 ]; |
| 1419 |
and a distance of 50: |
| 1420 |
$wgThumbnailMinimumBucketDistance = 50; |
| 1421 |
If we want to render a thumbnail of width 220px, the 512px bucket will be used, |
| 1422 |
because 220 + 50 = 270 and the closest bucket bigger than 270px is 512. |
| 1423 |
UploadThumbnailRenderMap: |
| 1424 |
default: { } |
| 1425 |
type: object |
| 1426 |
description: |- |
| 1427 |
When defined, is an array of thumbnail widths to be rendered at upload time. The idea is to |
| 1428 |
prerender common thumbnail sizes, in order to avoid the necessity to render them on demand, |
| 1429 |
which has a performance impact for the first client to view a certain size. |
| 1430 |
This obviously means that more disk space is needed per upload upfront. |
| 1431 |
@since 1.25 |
| 1432 |
UploadThumbnailRenderMethod: |
| 1433 |
default: jobqueue |
| 1434 |
description: |- |
| 1435 |
The method through which the thumbnails will be prerendered for the entries in |
| 1436 |
$wgUploadThumbnailRenderMap |
| 1437 |
The method can be either "http" or "jobqueue". The former uses an http request to hit the |
| 1438 |
thumbnail's URL. |
| 1439 |
This method only works if thumbnails are configured to be rendered by a 404 handler. The |
| 1440 |
latter option uses the job queue to render the thumbnail. |
| 1441 |
@since 1.25 |
| 1442 |
UploadThumbnailRenderHttpCustomHost: |
| 1443 |
default: false |
| 1444 |
description: |- |
| 1445 |
When using the "http" $wgUploadThumbnailRenderMethod, lets one specify a custom Host HTTP |
| 1446 |
header. |
| 1447 |
@since 1.25 |
| 1448 |
UploadThumbnailRenderHttpCustomDomain: |
| 1449 |
default: false |
| 1450 |
description: |- |
| 1451 |
When using the "http" $wgUploadThumbnailRenderMethod, lets one specify a custom domain to |
| 1452 |
send the HTTP request to. |
| 1453 |
@since 1.25 |
| 1454 |
UseTinyRGBForJPGThumbnails: |
| 1455 |
default: false |
| 1456 |
description: |- |
| 1457 |
When this variable is true and JPGs use the sRGB ICC profile, swaps it for the more |
| 1458 |
lightweight |
| 1459 |
(and free) TinyRGB profile when generating thumbnails. |
| 1460 |
@since 1.26 |
| 1461 |
GalleryOptions: |
| 1462 |
default: { } |
| 1463 |
type: object |
| 1464 |
description: |- |
| 1465 |
Parameters for the "<gallery>" tag. |
| 1466 |
Fields are: |
| 1467 |
- imagesPerRow: Default number of images per-row in the gallery. 0 -> Adapt to screensize |
| 1468 |
- imageWidth: Width of the cells containing images in galleries (in "px") |
| 1469 |
- imageHeight: Height of the cells containing images in galleries (in "px") |
| 1470 |
- captionLength: Length to truncate filename to in caption when using "showfilename". |
| 1471 |
A value of 'true' will truncate the filename to one line using CSS |
| 1472 |
and will be the behaviour after deprecation. |
| 1473 |
@deprecated since 1.28 |
| 1474 |
- showBytes: Show the filesize in bytes in categories |
| 1475 |
- showDimensions: Show the dimensions (width x height) in categories |
| 1476 |
- mode: Gallery mode |
| 1477 |
ThumbUpright: |
| 1478 |
default: 0.75 |
| 1479 |
description: |- |
| 1480 |
Adjust width of upright images when parameter 'upright' is used |
| 1481 |
This allows a nicer look for upright images without the need to fix the width |
| 1482 |
by hardcoded px in wiki sourcecode. |
| 1483 |
DirectoryMode: |
| 1484 |
default: 511 |
| 1485 |
description: 'Default value for chmod-ing of new directories.' |
| 1486 |
ResponsiveImages: |
| 1487 |
default: true |
| 1488 |
description: |- |
| 1489 |
Generate and use thumbnails suitable for screens with 1.5 and 2.0 pixel densities. |
| 1490 |
This means a 320x240 use of an image on the wiki will also generate 480x360 and 640x480 |
| 1491 |
thumbnails, output via the srcset attribute. |
| 1492 |
ImagePreconnect: |
| 1493 |
default: false |
| 1494 |
description: |- |
| 1495 |
Add a preconnect link for browsers to a remote FileRepo host. |
| 1496 |
This is an optional performance enhancement designed for wiki farm where |
| 1497 |
$wgForeignFileRepos or $wgLocalFileRepo is set to serve thumbnails from a |
| 1498 |
separate hostname (e.g. not local `/w/images`). The feature expects at most |
| 1499 |
a single remote hostname to be used. |
| 1500 |
If multiple foreign repos are registered that serve images from different hostnames, |
| 1501 |
only the first will be preconnected. |
| 1502 |
This may cause unneeded HTTP connections in browsers on wikis where a foreign repo is |
| 1503 |
enabled but where a local repo is more commonly used. |
| 1504 |
@since 1.35 |
| 1505 |
DjvuUseBoxedCommand: |
| 1506 |
default: false |
| 1507 |
description: |- |
| 1508 |
Whether to use BoxedCommand or not. |
| 1509 |
@unstable Temporary feature flag for T352515 |
| 1510 |
@since 1.42 |
| 1511 |
DjvuDump: |
| 1512 |
default: null |
| 1513 |
type: |
| 1514 |
- string |
| 1515 |
- 'null' |
| 1516 |
description: |- |
| 1517 |
Path of the djvudump executable |
| 1518 |
Enable this and $wgDjvuRenderer to enable djvu rendering |
| 1519 |
example: $wgDjvuDump = 'djvudump'; |
| 1520 |
If this is set, {@link self::ShellboxShell} must be set to the correct |
| 1521 |
shell path. |
| 1522 |
DjvuRenderer: |
| 1523 |
default: null |
| 1524 |
type: |
| 1525 |
- string |
| 1526 |
- 'null' |
| 1527 |
description: |- |
| 1528 |
Path of the ddjvu DJVU renderer |
| 1529 |
Enable this and $wgDjvuDump to enable djvu rendering |
| 1530 |
example: $wgDjvuRenderer = 'ddjvu'; |
| 1531 |
DjvuTxt: |
| 1532 |
default: null |
| 1533 |
type: |
| 1534 |
- string |
| 1535 |
- 'null' |
| 1536 |
description: |- |
| 1537 |
Path of the djvutxt DJVU text extraction utility |
| 1538 |
Enable this and $wgDjvuDump to enable text layer extraction from djvu files |
| 1539 |
example: $wgDjvuTxt = 'djvutxt'; |
| 1540 |
If this is set, {@link self::ShellboxShell} must be set to the correct |
| 1541 |
shell path. |
| 1542 |
DjvuPostProcessor: |
| 1543 |
default: pnmtojpeg |
| 1544 |
type: |
| 1545 |
- string |
| 1546 |
- 'null' |
| 1547 |
description: |- |
| 1548 |
Shell command for the DJVU post processor |
| 1549 |
Default: pnmtojpeg, since ddjvu generates ppm output |
| 1550 |
Set this to false to output the ppm file directly. |
| 1551 |
DjvuOutputExtension: |
| 1552 |
default: jpg |
| 1553 |
description: 'File extension for the DJVU post processor output' |
| 1554 |
EmergencyContact: |
| 1555 |
default: false |
| 1556 |
description: |- |
| 1557 |
Site admin email address. |
| 1558 |
Defaults to "wikiadmin@$wgServerName" (in Setup.php). |
| 1559 |
PasswordSender: |
| 1560 |
default: false |
| 1561 |
description: |- |
| 1562 |
Sender email address for e-mail notifications. |
| 1563 |
The address we use as sender when a user requests a password reminder, |
| 1564 |
as well as other e-mail notifications. |
| 1565 |
Defaults to "apache@$wgServerName" (in Setup.php). |
| 1566 |
NoReplyAddress: |
| 1567 |
default: false |
| 1568 |
description: |- |
| 1569 |
Reply-To address for e-mail notifications. |
| 1570 |
Defaults to $wgPasswordSender (in Setup.php). |
| 1571 |
EnableEmail: |
| 1572 |
default: true |
| 1573 |
description: |- |
| 1574 |
Set to true to enable the e-mail basic features: |
| 1575 |
Password reminders, etc. If sending e-mail on your |
| 1576 |
server doesn't work, you might want to disable this. |
| 1577 |
EnableUserEmail: |
| 1578 |
default: true |
| 1579 |
description: |- |
| 1580 |
Set to true to enable user-to-user e-mail. |
| 1581 |
This can potentially be abused, as it's hard to track. |
| 1582 |
EnableSpecialMute: |
| 1583 |
default: false |
| 1584 |
description: |- |
| 1585 |
Set to true to enable the Special Mute page. This allows users |
| 1586 |
to mute unwanted communications from other users, and is linked |
| 1587 |
to from emails originating from Special:Email. |
| 1588 |
@since 1.34 |
| 1589 |
EnableUserEmailMuteList: |
| 1590 |
default: false |
| 1591 |
description: |- |
| 1592 |
Set to true to enable user-to-user e-mail mutelist. |
| 1593 |
@since 1.37; previously $wgEnableUserEmailBlacklist |
| 1594 |
UserEmailUseReplyTo: |
| 1595 |
default: true |
| 1596 |
description: |- |
| 1597 |
If true put the sending user's email in a Reply-To header |
| 1598 |
instead of From (false). ($wgPasswordSender will be used as From.) |
| 1599 |
Some mailers (eg SMTP) set the SMTP envelope sender to the From value, |
| 1600 |
which can cause problems with SPF validation and leak recipient addresses |
| 1601 |
when bounces are sent to the sender. In addition, DMARC restrictions |
| 1602 |
can cause emails to fail to be received when false. |
| 1603 |
PasswordReminderResendTime: |
| 1604 |
default: 24 |
| 1605 |
description: |- |
| 1606 |
Minimum time, in hours, which must elapse between password reminder |
| 1607 |
emails for a given account. This is to prevent abuse by mail flooding. |
| 1608 |
NewPasswordExpiry: |
| 1609 |
default: 604800 |
| 1610 |
description: 'The time, in seconds, when an emailed temporary password expires.' |
| 1611 |
UserEmailConfirmationTokenExpiry: |
| 1612 |
default: 604800 |
| 1613 |
description: 'The time, in seconds, when an email confirmation email expires' |
| 1614 |
PasswordExpirationDays: |
| 1615 |
default: false |
| 1616 |
description: |- |
| 1617 |
The number of days that a user's password is good for. After this number of days, the |
| 1618 |
user will be asked to reset their password. Set to false to disable password expiration. |
| 1619 |
PasswordExpireGrace: |
| 1620 |
default: 604800 |
| 1621 |
description: |- |
| 1622 |
If a user's password is expired, the number of seconds when they can still login, |
| 1623 |
and cancel their password change, but are sent to the password change form on each login. |
| 1624 |
SMTP: |
| 1625 |
default: false |
| 1626 |
type: |
| 1627 |
- boolean |
| 1628 |
- object |
| 1629 |
description: |- |
| 1630 |
SMTP Mode. |
| 1631 |
For using a direct (authenticated) SMTP server connection. |
| 1632 |
Default to false or fill an array : |
| 1633 |
``` |
| 1634 |
$wgSMTP = [ |
| 1635 |
'host' => 'SMTP domain', |
| 1636 |
'IDHost' => 'domain for MessageID', |
| 1637 |
'port' => '25', |
| 1638 |
'auth' => [true|false], |
| 1639 |
'username' => [SMTP username], |
| 1640 |
'password' => [SMTP password], |
| 1641 |
]; |
| 1642 |
``` |
| 1643 |
AdditionalMailParams: |
| 1644 |
default: null |
| 1645 |
description: 'Additional email parameters, will be passed as the last argument to mail() call.' |
| 1646 |
AllowHTMLEmail: |
| 1647 |
default: false |
| 1648 |
description: |- |
| 1649 |
For parts of the system that have been updated to provide HTML email content, send |
| 1650 |
both text and HTML parts as the body of the email |
| 1651 |
EnotifFromEditor: |
| 1652 |
default: false |
| 1653 |
type: boolean |
| 1654 |
description: |- |
| 1655 |
Allow sending of e-mail notifications with the editor's address as sender. |
| 1656 |
This setting depends on $wgEnotifRevealEditorAddress also being enabled. |
| 1657 |
If both are enabled, notifications for actions from users that have opted-in, |
| 1658 |
will be sent to other users with their address as "From" instead of "Reply-To". |
| 1659 |
If disabled, or not opted-in, notifications come from $wgPasswordSender. |
| 1660 |
EmailAuthentication: |
| 1661 |
default: true |
| 1662 |
description: |- |
| 1663 |
Require email authentication before sending mail to an email address. |
| 1664 |
This is highly recommended. It prevents MediaWiki from being used as an open |
| 1665 |
spam relay. |
| 1666 |
EnotifWatchlist: |
| 1667 |
default: false |
| 1668 |
description: 'Allow users to enable email notification ("enotif") on watchlist changes.' |
| 1669 |
EnotifUserTalk: |
| 1670 |
default: false |
| 1671 |
description: |- |
| 1672 |
Allow users to enable email notification ("enotif") when someone edits their |
| 1673 |
user talk page. |
| 1674 |
The owner of the user talk page must also have the 'enotifusertalkpages' user |
| 1675 |
preference set to true. |
| 1676 |
EnotifRevealEditorAddress: |
| 1677 |
default: false |
| 1678 |
type: boolean |
| 1679 |
description: |- |
| 1680 |
Allow sending of e-mail notifications with the editor's address in "Reply-To". |
| 1681 |
Note, enabling this only actually uses it in notification e-mails if the user |
| 1682 |
opted-in to this feature. This feature flag also controls visibility of the |
| 1683 |
'enotifrevealaddr' preference, which, if users opt into, will make e-mail |
| 1684 |
notifications about their actions use their address as "Reply-To". |
| 1685 |
To set the address as "From" instead of "Reply-To", also enable $wgEnotifFromEditor. |
| 1686 |
If disabled, or not opted-in, notifications come from $wgPasswordSender. |
| 1687 |
EnotifMinorEdits: |
| 1688 |
default: true |
| 1689 |
description: |- |
| 1690 |
Potentially send notification mails on minor edits to pages. This is enabled |
| 1691 |
by default. If this is false, users will never be notified on minor edits. |
| 1692 |
If it is true, editors with the 'nominornewtalk' right (typically bots) will still not |
| 1693 |
trigger notifications for minor edits they make (to any page, not just user talk). |
| 1694 |
Finally, if the watcher/recipient has the 'enotifminoredits' user preference set to |
| 1695 |
false, they will not receive notifications for minor edits. |
| 1696 |
User talk notifications are also affected by $wgEnotifMinorEdits, the above settings, |
| 1697 |
$wgEnotifUserTalk, and the preference described there. |
| 1698 |
EnotifImpersonal: |
| 1699 |
default: false |
| 1700 |
description: |- |
| 1701 |
Send a generic mail instead of a personalised mail for each user. This |
| 1702 |
always uses UTC as the time zone, and doesn't include the username. |
| 1703 |
For pages with many users watching, this can significantly reduce mail load. |
| 1704 |
Has no effect when using sendmail rather than SMTP. |
| 1705 |
EnotifMaxRecips: |
| 1706 |
default: 500 |
| 1707 |
description: |- |
| 1708 |
Maximum number of users to mail at once when using impersonal mail. Should |
| 1709 |
match the limit on your mail server. |
| 1710 |
EnotifUseRealName: |
| 1711 |
default: false |
| 1712 |
description: 'Use real name instead of username in e-mail "from" field.' |
| 1713 |
UsersNotifiedOnAllChanges: |
| 1714 |
default: { } |
| 1715 |
type: object |
| 1716 |
description: |- |
| 1717 |
Array of usernames who will be sent a notification email for every change |
| 1718 |
which occurs on a wiki. Users will not be notified of their own changes. |
| 1719 |
DBname: |
| 1720 |
default: my_wiki |
| 1721 |
description: |- |
| 1722 |
Current wiki database name |
| 1723 |
This should only contain alphanumeric and underscore characters ([A-Za-z0-9_]+). |
| 1724 |
Spaces, quotes, backticks, dots, and hyphens are likely to be problematic. |
| 1725 |
This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain). |
| 1726 |
This should still be set even if $wgLBFactoryConf is configured. |
| 1727 |
DBmwschema: |
| 1728 |
default: null |
| 1729 |
type: |
| 1730 |
- string |
| 1731 |
- 'null' |
| 1732 |
description: |- |
| 1733 |
Current wiki database schema name |
| 1734 |
This should only contain alphanumeric and underscore characters ([A-Za-z0-9_]+). |
| 1735 |
Spaces, quotes, backticks, dots, and hyphens are likely to be problematic. |
| 1736 |
This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain). |
| 1737 |
This should still be set even if $wgLBFactoryConf is configured. |
| 1738 |
DBprefix: |
| 1739 |
default: '' |
| 1740 |
description: |- |
| 1741 |
Current wiki database table name prefix |
| 1742 |
This should only contain alphanumeric and underscore characters ([A-Za-z0-9_]+). |
| 1743 |
If it's a non-empty string, then it preferably should end with an underscore. |
| 1744 |
Spaces, quotes, backticks, dots, and hyphens are especially likely to be problematic. |
| 1745 |
This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain). |
| 1746 |
This should still be set even if $wgLBFactoryConf is configured. |
| 1747 |
DBserver: |
| 1748 |
default: localhost |
| 1749 |
description: 'Database host name or IP address' |
| 1750 |
DBport: |
| 1751 |
default: 5432 |
| 1752 |
description: 'Database port number' |
| 1753 |
DBuser: |
| 1754 |
default: wikiuser |
| 1755 |
description: 'Database username' |
| 1756 |
DBpassword: |
| 1757 |
default: '' |
| 1758 |
description: 'Database user''s password' |
| 1759 |
DBtype: |
| 1760 |
default: mysql |
| 1761 |
description: 'Database type' |
| 1762 |
DBssl: |
| 1763 |
default: false |
| 1764 |
description: |- |
| 1765 |
Whether to use SSL in DB connection. |
| 1766 |
This setting is only used if $wgLBFactoryConf['class'] is set to |
| 1767 |
'\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise |
| 1768 |
the 'ssl' parameter of the server array must be set to achieve the same functionality. |
| 1769 |
DBcompress: |
| 1770 |
default: false |
| 1771 |
description: |- |
| 1772 |
Whether to use compression in DB connection. |
| 1773 |
This setting is only used $wgLBFactoryConf['class'] is set to |
| 1774 |
'\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise |
| 1775 |
the DBO_COMPRESS flag must be set in the 'flags' option of the database |
| 1776 |
connection to achieve the same functionality. |
| 1777 |
DBStrictWarnings: |
| 1778 |
default: false |
| 1779 |
description: |- |
| 1780 |
Check for warnings after DB queries and throw an exception if an |
| 1781 |
unacceptable warning is detected. |
| 1782 |
This setting is only used if $wgLBFactoryConf['class'] is set to |
| 1783 |
'\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array. |
| 1784 |
Otherwise, the 'strictWarnings' parameter of the server array must be set |
| 1785 |
to achieve the same functionality. |
| 1786 |
@since 1.42 |
| 1787 |
DBadminuser: |
| 1788 |
default: null |
| 1789 |
description: 'Separate username for maintenance tasks. Leave as null to use the default.' |
| 1790 |
DBadminpassword: |
| 1791 |
default: null |
| 1792 |
description: 'Separate password for maintenance tasks. Leave as null to use the default.' |
| 1793 |
SearchType: |
| 1794 |
default: null |
| 1795 |
description: |- |
| 1796 |
Search type. |
| 1797 |
Leave as null to select the default search engine for the |
| 1798 |
selected database type (eg SearchMySQL), or set to a class |
| 1799 |
name to override to a custom search engine. |
| 1800 |
If the canonical name for the search engine doesn't match the class name |
| 1801 |
(because it's namespaced for example), you can add a mapping for this in |
| 1802 |
SearchMappings in extension.json. |
| 1803 |
SearchTypeAlternatives: |
| 1804 |
default: null |
| 1805 |
description: |- |
| 1806 |
Alternative search types |
| 1807 |
Sometimes you want to support multiple search engines for testing. This |
| 1808 |
allows users to select their search engine of choice via url parameters |
| 1809 |
to Special:Search and the action=search API. If using this, there's no |
| 1810 |
need to add $wgSearchType to it, that is handled automatically. |
| 1811 |
If the canonical name for the search engine doesn't match the class name |
| 1812 |
(because it's namespaced for example), you can add a mapping for this in |
| 1813 |
SearchMappings in extension.json. |
| 1814 |
DBTableOptions: |
| 1815 |
default: 'ENGINE=InnoDB, DEFAULT CHARSET=binary' |
| 1816 |
description: 'MySQL table options to use during installation or update' |
| 1817 |
SQLMode: |
| 1818 |
default: '' |
| 1819 |
description: |- |
| 1820 |
SQL Mode - default is turning off all modes, including strict, if set. |
| 1821 |
null can be used to skip the setting for performance reasons and assume |
| 1822 |
DBA has done his best job. |
| 1823 |
String override can be used for some additional fun :-) |
| 1824 |
DBDefaultGroup: |
| 1825 |
default: null |
| 1826 |
description: |- |
| 1827 |
Default group to use when getting database connections. |
| 1828 |
Will be used as default query group in ILoadBalancer::getConnection. |
| 1829 |
@since 1.32 |
| 1830 |
SQLiteDataDir: |
| 1831 |
default: '' |
| 1832 |
description: 'To override default SQLite data directory ($docroot/../data)' |
| 1833 |
SharedDB: |
| 1834 |
default: null |
| 1835 |
description: |- |
| 1836 |
Shared database for multiple wikis. Commonly used for storing a user table |
| 1837 |
for single sign-on. The server for this database must be the same as for the |
| 1838 |
main database. |
| 1839 |
For backwards compatibility the shared prefix is set to the same as the local |
| 1840 |
prefix, and the user table is listed in the default list of shared tables. |
| 1841 |
The user_properties table is also added so that users will continue to have their |
| 1842 |
preferences shared (preferences were stored in the user table prior to 1.16) |
| 1843 |
$wgSharedTables may be customized with a list of tables to share in the shared |
| 1844 |
database. However it is advised to limit what tables you do share as many of |
| 1845 |
MediaWiki's tables may have side effects if you try to share them. |
| 1846 |
$wgSharedPrefix is the table prefix for the shared database. It defaults to |
| 1847 |
$wgDBprefix. |
| 1848 |
$wgSharedSchema is the table schema for the shared database. It defaults to |
| 1849 |
$wgDBmwschema. |
| 1850 |
SharedPrefix: |
| 1851 |
default: false |
| 1852 |
dynamicDefault: |
| 1853 |
use: [DBprefix] |
| 1854 |
callback: [MediaWiki\MainConfigSchema, getDefaultSharedPrefix] |
| 1855 |
description: '@see self::SharedDB' |
| 1856 |
SharedTables: |
| 1857 |
default: |
| 1858 |
- user |
| 1859 |
- user_properties |
| 1860 |
- user_autocreate_serial |
| 1861 |
type: array |
| 1862 |
description: |- |
| 1863 |
@see self::SharedDB |
| 1864 |
The installer will add 'actor' to this list for all new wikis. |
| 1865 |
SharedSchema: |
| 1866 |
default: false |
| 1867 |
dynamicDefault: |
| 1868 |
use: [DBmwschema] |
| 1869 |
callback: [MediaWiki\MainConfigSchema, getDefaultSharedSchema] |
| 1870 |
description: |- |
| 1871 |
@see self::SharedDB |
| 1872 |
@since 1.23 |
| 1873 |
DBservers: |
| 1874 |
default: false |
| 1875 |
type: |
| 1876 |
- boolean |
| 1877 |
- array |
| 1878 |
description: |- |
| 1879 |
Database load balancer |
| 1880 |
This is a two-dimensional array, a list of server info structures |
| 1881 |
Fields are: |
| 1882 |
- host: Host name |
| 1883 |
- dbname: Default database name |
| 1884 |
- user: DB user |
| 1885 |
- password: DB password |
| 1886 |
- type: DB type |
| 1887 |
- driver: DB driver (when there are multiple drivers) |
| 1888 |
- load: Ratio of DB_REPLICA load, must be >=0, the sum of all loads must be >0. |
| 1889 |
If this is zero for any given server, no normal query traffic will be |
| 1890 |
sent to it. It will be excluded from lag checks in maintenance scripts. |
| 1891 |
The only way it can receive traffic is if groupLoads is used. |
| 1892 |
- groupLoads: (optional) Array of load ratios, the key is the query group name. A query |
| 1893 |
may belong to several groups, the most specific group defined here is used. |
| 1894 |
- flags: (optional) Bit field of properties: |
| 1895 |
- DBO_DEFAULT: Transactional-ize web requests and use autocommit otherwise |
| 1896 |
- DBO_DEBUG: Equivalent of $wgDebugDumpSql |
| 1897 |
- DBO_SSL: Use TLS connection encryption if available (deprecated) |
| 1898 |
- DBO_COMPRESS: Use protocol compression with database connections |
| 1899 |
- DBO_PERSISTENT: Enables persistent database connections |
| 1900 |
- ssl: (optional) Boolean, whether to use TLS encryption. Overrides DBO_SSL. |
| 1901 |
- max lag: (optional) Maximum replication lag before a replica DB goes out of rotation |
| 1902 |
- is static: (optional) Set to true if the dataset is static and no replication is used. |
| 1903 |
- cliMode: (optional) Connection handles will not assume that requests are short-lived |
| 1904 |
nor that INSERT..SELECT can be rewritten into a buffered SELECT and INSERT. |
| 1905 |
This is what DBO_DEFAULT uses to determine when a web request is present. |
| 1906 |
[Default: true if MW_ENTRY_POINT is 'cli', otherwise false] |
| 1907 |
These and any other user-defined properties will be assigned to the mLBInfo member |
| 1908 |
variable of the Database object. |
| 1909 |
Leave at false to use the single-server variables above. If you set this |
| 1910 |
variable, the single-server variables will generally be ignored (except |
| 1911 |
perhaps in some command-line scripts). |
| 1912 |
The first server listed in this array (with key 0) will be the primary. The |
| 1913 |
rest of the servers will be replica DBs. To prevent writes to your replica DBs due to |
| 1914 |
accidental misconfiguration or MediaWiki bugs, set read_only=1 on all your |
| 1915 |
replica DBs in my.cnf. You can set read_only mode at runtime using: |
| 1916 |
``` |
| 1917 |
SET @@read_only=1; |
| 1918 |
``` |
| 1919 |
Since the effect of writing to a replica DB is so damaging and difficult to clean |
| 1920 |
up, we at Wikimedia set read_only=1 in my.cnf on all our DB servers, even |
| 1921 |
our primaries, and then set read_only=0 on primaries at runtime. |
| 1922 |
LBFactoryConf: |
| 1923 |
default: |
| 1924 |
class: Wikimedia\Rdbms\LBFactorySimple |
| 1925 |
type: object |
| 1926 |
mergeStrategy: replace |
| 1927 |
description: |- |
| 1928 |
Configuration for the ILBFactory service |
| 1929 |
The "class" setting must point to a LBFactory subclass, which is also responsible |
| 1930 |
for reading $wgDBservers, $wgDBserver, etc. |
| 1931 |
To set up a wiki farm with multiple database clusters, set the "class" to |
| 1932 |
LBFactoryMulti. See {@link Wikimedia::Rdbms::LBFactoryMulti LBFactoryMulti} docs for |
| 1933 |
information on how to configure the rest of the $wgLBFactoryConf array. |
| 1934 |
DataCenterUpdateStickTTL: |
| 1935 |
default: 10 |
| 1936 |
description: |- |
| 1937 |
After a state-changing request is done by a client, this determines |
| 1938 |
how many seconds that client should keep using the primary datacenter. |
| 1939 |
This avoids unexpected stale or 404 responses due to replication lag. |
| 1940 |
This must be greater than or equal to |
| 1941 |
Wikimedia\Rdbms\ChronologyProtector::POSITION_COOKIE_TTL. |
| 1942 |
@since 1.27 |
| 1943 |
DBerrorLog: |
| 1944 |
default: false |
| 1945 |
description: 'File to log database errors to' |
| 1946 |
DBerrorLogTZ: |
| 1947 |
default: false |
| 1948 |
dynamicDefault: |
| 1949 |
use: [Localtimezone] |
| 1950 |
callback: [MediaWiki\MainConfigSchema, getDefaultDBerrorLogTZ] |
| 1951 |
description: |- |
| 1952 |
Timezone to use in the error log. |
| 1953 |
Defaults to the wiki timezone ($wgLocaltimezone). |
| 1954 |
A list of usable timezones can found at: |
| 1955 |
https://www.php.net/manual/en/timezones.php |
| 1956 |
**Examples:** |
| 1957 |
``` |
| 1958 |
$wgDBerrorLogTZ = 'UTC'; |
| 1959 |
$wgDBerrorLogTZ = 'GMT'; |
| 1960 |
$wgDBerrorLogTZ = 'PST8PDT'; |
| 1961 |
$wgDBerrorLogTZ = 'Europe/Sweden'; |
| 1962 |
$wgDBerrorLogTZ = 'CET'; |
| 1963 |
``` |
| 1964 |
@since 1.20 |
| 1965 |
LocalDatabases: |
| 1966 |
default: [] |
| 1967 |
type: array |
| 1968 |
items: |
| 1969 |
type: string |
| 1970 |
description: |- |
| 1971 |
Other wikis on this site, can be administered from a single developer account. |
| 1972 |
List of wiki DB domain IDs; the format of each ID consist of 1-3 hyphen |
| 1973 |
delimited alphanumeric components (each with no hyphens nor spaces) of any of the forms: |
| 1974 |
- "<DB NAME>-<DB SCHEMA>-<TABLE PREFIX>" |
| 1975 |
- "<DB NAME>-<TABLE PREFIX>" |
| 1976 |
- "<DB NAME>" |
| 1977 |
If hyphens appear in any of the components, then the domain ID parsing may not work |
| 1978 |
in all cases and site functionality might be affected. If the schema ($wgDBmwschema) |
| 1979 |
is left to the default "mediawiki" for all wikis, then the schema should be omitted |
| 1980 |
from these IDs. |
| 1981 |
DatabaseReplicaLagWarning: |
| 1982 |
default: 10 |
| 1983 |
description: |- |
| 1984 |
If lag is higher than $wgDatabaseReplicaLagWarning, show a warning in some special |
| 1985 |
pages (like watchlist). If the lag is higher than $wgDatabaseReplicaLagCritical, |
| 1986 |
show a more obvious warning. |
| 1987 |
@since 1.36 |
| 1988 |
DatabaseReplicaLagCritical: |
| 1989 |
default: 30 |
| 1990 |
description: |- |
| 1991 |
@see self::DatabaseReplicaLagWarning |
| 1992 |
@since 1.36 |
| 1993 |
MaxExecutionTimeForExpensiveQueries: |
| 1994 |
default: 0 |
| 1995 |
description: |- |
| 1996 |
Max execution time for queries of several expensive special pages such as RecentChanges |
| 1997 |
in milliseconds. |
| 1998 |
@since 1.38 |
| 1999 |
VirtualDomainsMapping: |
| 2000 |
default: { } |
| 2001 |
type: object |
| 2002 |
description: |- |
| 2003 |
Mapping of virtual domain to external cluster db. |
| 2004 |
If no entry is set, the code assumes local database. |
| 2005 |
For example, for routing queries of virtual domain 'vdomain' |
| 2006 |
to 'wikishared' database in 'extension1' cluster. The config should be like this: |
| 2007 |
[ 'vdomain' => [ 'cluster' => 'extension1', 'db' => 'wikishared' ] ] |
| 2008 |
If the database needs to be the local domain, just set the 'db' to false. |
| 2009 |
If you want to get another db in the main cluster, just omit 'cluster'. For example: |
| 2010 |
[ 'centralauth' => [ 'db' => 'centralauth' ] ] |
| 2011 |
@since 1.41 |
| 2012 |
PageLinksSchemaMigrationStage: |
| 2013 |
default: 768 |
| 2014 |
type: integer |
| 2015 |
description: |- |
| 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_NEW | SCHEMA_COMPAT_READ_NEW (SCHEMA_COMPAT_NEW) |
| 2019 |
History: |
| 2020 |
- 1.41: Added |
| 2021 |
- 1.43: Default has changed to SCHEMA_COMPAT_NEW. |
| 2022 |
ExternalLinksDomainGaps: |
| 2023 |
default: { } |
| 2024 |
type: object |
| 2025 |
description: |- |
| 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.) |
| 2037 |
History: |
| 2038 |
- 1.41: Added |
| 2039 |
ContentHandlers: |
| 2040 |
default: |
| 2041 |
wikitext: { class: MediaWiki\Content\WikitextContentHandler, services: [TitleFactory, ParserFactory, GlobalIdGenerator, LanguageNameUtils, LinkRenderer, MagicWordFactory, ParsoidParserFactory] } |
| 2042 |
javascript: MediaWiki\Content\JavaScriptContentHandler |
| 2043 |
json: MediaWiki\Content\JsonContentHandler |
| 2044 |
css: MediaWiki\Content\CssContentHandler |
| 2045 |
text: MediaWiki\Content\TextContentHandler |
| 2046 |
unknown: MediaWiki\Content\FallbackContentHandler |
| 2047 |
type: object |
| 2048 |
description: |- |
| 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. |
| 2052 |
@since 1.21 |
| 2053 |
NamespaceContentModels: |
| 2054 |
default: { } |
| 2055 |
type: object |
| 2056 |
description: |- |
| 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(). |
| 2064 |
@since 1.21 |
| 2065 |
TextModelsToParse: |
| 2066 |
default: |
| 2067 |
- wikitext |
| 2068 |
- javascript |
| 2069 |
- css |
| 2070 |
type: array |
| 2071 |
description: |- |
| 2072 |
Determines which types of text are parsed as wikitext. This does not imply that these kinds |
| 2073 |
of texts are also rendered as wikitext, it only means that links, magic words, etc will have |
| 2074 |
the effect on the database they would have on a wikitext page. |
| 2075 |
Note that table of contents information will be *suppressed* for all |
| 2076 |
text models in this list other than wikitext. |
| 2077 |
@todo Make the ToC suppression configurable by the content model |
| 2078 |
(T313455), not a side effect of inclusion here. |
| 2079 |
@todo On the long run, it would be nice to put categories etc into a separate structure, |
| 2080 |
or at least parse only the contents of comments in the scripts. |
| 2081 |
@since 1.21 |
| 2082 |
CompressRevisions: |
| 2083 |
default: false |
| 2084 |
description: |- |
| 2085 |
We can also compress text stored in the 'text' table. If this is set on, new |
| 2086 |
revisions will be compressed on page save if zlib support is available. Any |
| 2087 |
compressed revisions will be decompressed on load regardless of this setting, |
| 2088 |
but will not be readable at all if zlib support is not available. |
| 2089 |
ExternalStores: |
| 2090 |
default: [] |
| 2091 |
type: array |
| 2092 |
description: |- |
| 2093 |
List of enabled ExternalStore protocols. |
| 2094 |
@see \ExternalStoreAccess |
| 2095 |
``` |
| 2096 |
$wgExternalStores = [ "DB" ]; |
| 2097 |
``` |
| 2098 |
ExternalServers: |
| 2099 |
default: { } |
| 2100 |
type: object |
| 2101 |
description: |- |
| 2102 |
Shortcut for setting `$wgLBFactoryConf["externalClusters"]`. |
| 2103 |
This is only applicable when using the default LBFactory |
| 2104 |
of {@link Wikimedia::Rdbms::LBFactorySimple LBFactorySimple}. |
| 2105 |
It is ignored if a different LBFactory is set, or if `externalClusters` |
| 2106 |
is already set explicitly. |
| 2107 |
@see \ExternalStoreAccess |
| 2108 |
**Example:** |
| 2109 |
Create a cluster named 'blobs_cluster1': |
| 2110 |
``` |
| 2111 |
$wgExternalServers = [ |
| 2112 |
'blobs_cluster1' => <array in the same format as $wgDBservers> |
| 2113 |
]; |
| 2114 |
``` |
| 2115 |
DefaultExternalStore: |
| 2116 |
default: false |
| 2117 |
type: |
| 2118 |
- array |
| 2119 |
- boolean |
| 2120 |
description: |- |
| 2121 |
The place to put new text blobs or false to put them in the text table |
| 2122 |
of the local wiki database. |
| 2123 |
@see \ExternalStoreAccess |
| 2124 |
**Example:** |
| 2125 |
``` |
| 2126 |
$wgDefaultExternalStore = [ 'DB://cluster1', 'DB://cluster2' ]; |
| 2127 |
``` |
| 2128 |
RevisionCacheExpiry: |
| 2129 |
default: 604800 |
| 2130 |
type: integer |
| 2131 |
description: |- |
| 2132 |
Revision text may be cached in the main WAN cache to reduce load on external |
| 2133 |
storage servers and object extraction overhead for frequently-loaded revisions. |
| 2134 |
Set to 0 to disable, or number of seconds before cache expiry. |
| 2135 |
RevisionSlotsCacheExpiry: |
| 2136 |
default: |
| 2137 |
local: 3600 |
| 2138 |
WAN: 86400 |
| 2139 |
type: object |
| 2140 |
description: |- |
| 2141 |
Revision slots may be cached in the main WAN cache and/or the local server cache |
| 2142 |
to reduce load on the database. |
| 2143 |
Set to 0 to disable, or number of seconds before cache expiry. |
| 2144 |
PageLanguageUseDB: |
| 2145 |
default: false |
| 2146 |
type: boolean |
| 2147 |
description: |- |
| 2148 |
Enable page language feature |
| 2149 |
Allows setting page language in database |
| 2150 |
@since 1.24 |
| 2151 |
DiffEngine: |
| 2152 |
default: null |
| 2153 |
type: |
| 2154 |
- string |
| 2155 |
- 'null' |
| 2156 |
description: |- |
| 2157 |
Specify the difference engine to use. |
| 2158 |
Supported values: |
| 2159 |
- 'external': Use an external diff engine, which must be specified via $wgExternalDiffEngine |
| 2160 |
- 'wikidiff2': Use the wikidiff2 PHP extension |
| 2161 |
- 'php': PHP implementations included in MediaWiki |
| 2162 |
The default (null) is to use the first engine that's available. |
| 2163 |
@since 1.35 |
| 2164 |
ExternalDiffEngine: |
| 2165 |
default: false |
| 2166 |
type: |
| 2167 |
- string |
| 2168 |
- boolean |
| 2169 |
description: 'Name of the external diff engine to use.' |
| 2170 |
Wikidiff2Options: |
| 2171 |
default: { } |
| 2172 |
type: object |
| 2173 |
description: |- |
| 2174 |
Options for wikidiff2: |
| 2175 |
- useMultiFormat: (bool) Whether to use wikidiff2_multi_format_diff() |
| 2176 |
if it is available. This temporarily defaults to false, during |
| 2177 |
migration to the new code. It is available in wikidiff2 1.14.0+. |
| 2178 |
The following options are only effective if wikidiff2_multi_format_diff() |
| 2179 |
is enabled. See README.md in wikidiff2 for details: |
| 2180 |
- numContextLines |
| 2181 |
- changeThreshold |
| 2182 |
- movedLineThreshold |
| 2183 |
- maxMovedLines |
| 2184 |
- maxWordLevelDiffComplexity |
| 2185 |
- maxSplitSize |
| 2186 |
- initialSplitThreshold |
| 2187 |
- finalSplitThreshold |
| 2188 |
Also: |
| 2189 |
- formatOptions: An array of format-specific overrides. The key may |
| 2190 |
be "inline" or "table" and the value is an array with keys |
| 2191 |
numContextLines, changeThreshold, etc. |
| 2192 |
@since 1.41 |
| 2193 |
RequestTimeLimit: |
| 2194 |
default: null |
| 2195 |
type: |
| 2196 |
- integer |
| 2197 |
- 'null' |
| 2198 |
description: |- |
| 2199 |
Set a limit on server request wall clock time. |
| 2200 |
If the Excimer extension is enabled, setting this will cause an exception |
| 2201 |
to be thrown after the specified number of seconds. If the extension is |
| 2202 |
not available, set_time_limit() will be called instead. |
| 2203 |
@since 1.36 |
| 2204 |
TransactionalTimeLimit: |
| 2205 |
default: 120 |
| 2206 |
description: |- |
| 2207 |
The request time limit for "slow" write requests that should not be |
| 2208 |
interrupted due to the risk of data corruption. |
| 2209 |
The limit will only be raised. If the pre-existing time limit is larger, |
| 2210 |
then this will have no effect. |
| 2211 |
@since 1.26 |
| 2212 |
CriticalSectionTimeLimit: |
| 2213 |
default: 180.0 |
| 2214 |
type: number |
| 2215 |
description: |- |
| 2216 |
The maximum time critical sections are allowed to stay open. Critical |
| 2217 |
sections are used to defer Excimer request timeouts. If Excimer is available |
| 2218 |
and this time limit is exceeded, an exception will be thrown at the next |
| 2219 |
opportunity, typically after a long-running function like a DB query returns. |
| 2220 |
Critical sections may wrap long-running queries, and it's generally better |
| 2221 |
for the timeout to be handled a few milliseconds later when the critical |
| 2222 |
section exits, so this should be a large number. |
| 2223 |
This limit is ignored in command-line mode. |
| 2224 |
@since 1.36 |
| 2225 |
MiserMode: |
| 2226 |
default: false |
| 2227 |
description: 'Disable database-intensive features' |
| 2228 |
DisableQueryPages: |
| 2229 |
default: false |
| 2230 |
description: 'Disable all query pages if miser mode is on, not just some' |
| 2231 |
QueryCacheLimit: |
| 2232 |
default: 1000 |
| 2233 |
description: 'Number of rows to cache in ''querycache'' table when miser mode is on' |
| 2234 |
WantedPagesThreshold: |
| 2235 |
default: 1 |
| 2236 |
description: 'Number of links to a page required before it is deemed "wanted"' |
| 2237 |
AllowSlowParserFunctions: |
| 2238 |
default: false |
| 2239 |
description: 'Enable slow parser functions' |
| 2240 |
AllowSchemaUpdates: |
| 2241 |
default: true |
| 2242 |
description: 'Allow schema updates' |
| 2243 |
MaxArticleSize: |
| 2244 |
default: 2048 |
| 2245 |
description: 'Maximum article size in kibibytes' |
| 2246 |
MemoryLimit: |
| 2247 |
default: 50M |
| 2248 |
description: |- |
| 2249 |
The minimum amount of memory that MediaWiki "needs"; MediaWiki will try to |
| 2250 |
raise PHP's memory limit if it's below this amount. |
| 2251 |
PoolCounterConf: |
| 2252 |
default: null |
| 2253 |
type: |
| 2254 |
- object |
| 2255 |
- 'null' |
| 2256 |
description: |- |
| 2257 |
Configuration for processing pool control, for use in high-traffic wikis. |
| 2258 |
An implementation is provided in the PoolCounter extension. |
| 2259 |
This configuration array maps pool types to an associative array. The only |
| 2260 |
defined key in the associative array is "class", which gives the class name. |
| 2261 |
The remaining elements are passed through to the class as constructor |
| 2262 |
parameters. |
| 2263 |
**Example using local redis instance:** |
| 2264 |
``` |
| 2265 |
$wgPoolCounterConf = [ 'ArticleView' => [ |
| 2266 |
'class' => PoolCounterRedis::class, |
| 2267 |
'timeout' => 15, // wait timeout in seconds |
| 2268 |
'workers' => 1, // maximum number of active threads in each pool |
| 2269 |
'maxqueue' => 5, // maximum number of total threads in each pool |
| 2270 |
'servers' => [ '127.0.0.1' ], |
| 2271 |
'redisConfig' => [] |
| 2272 |
] ]; |
| 2273 |
``` |
| 2274 |
**Example using C daemon from <https://gerrit.wikimedia.org/g/mediawiki/services/poolcounter>** |
| 2275 |
``` |
| 2276 |
$wgPoolCountClientConf = [ |
| 2277 |
'servers' => [ '127.0.0.1' ], |
| 2278 |
'timeout' => 0.5, |
| 2279 |
'connect_timeout' => 0.01, |
| 2280 |
]; |
| 2281 |
$wgPoolCounterConf = [ 'ArticleView' => [ |
| 2282 |
'class' => 'PoolCounter_Client', |
| 2283 |
'timeout' => 15, // wait timeout in seconds |
| 2284 |
'workers' => 5, // maximum number of active threads in each pool |
| 2285 |
'maxqueue' => 50, // maximum number of total threads in each pool |
| 2286 |
... any extension-specific options... |
| 2287 |
] ]; |
| 2288 |
``` |
| 2289 |
@since 1.16 |
| 2290 |
PoolCountClientConf: |
| 2291 |
default: |
| 2292 |
servers: [127.0.0.1] |
| 2293 |
timeout: 0.1 |
| 2294 |
type: object |
| 2295 |
description: |- |
| 2296 |
Configuration array for the PoolCounter client. |
| 2297 |
- servers: Array of hostnames, or hostname:port. The default port is 7531. |
| 2298 |
- timeout: Connection timeout. |
| 2299 |
- connect_timeout: [Since 1.28] Alternative connection timeout. If set, it is used |
| 2300 |
instead of `timeout` and will be retried once if a connection fails |
| 2301 |
to be established. Background: https://phabricator.wikimedia.org/T105378. |
| 2302 |
@see \MediaWiki\PoolCounter\PoolCounterClient |
| 2303 |
@since 1.16 |
| 2304 |
MaxUserDBWriteDuration: |
| 2305 |
default: false |
| 2306 |
type: |
| 2307 |
- integer |
| 2308 |
- boolean |
| 2309 |
description: |- |
| 2310 |
Max time (in seconds) a user-generated transaction can spend in writes. |
| 2311 |
If exceeded, the transaction is rolled back with an error instead of being committed. |
| 2312 |
@since 1.27 |
| 2313 |
MaxJobDBWriteDuration: |
| 2314 |
default: false |
| 2315 |
type: |
| 2316 |
- integer |
| 2317 |
- boolean |
| 2318 |
description: |- |
| 2319 |
Max time (in seconds) a job-generated transaction can spend in writes. |
| 2320 |
If exceeded, the transaction is rolled back with an error instead of being committed. |
| 2321 |
@since 1.30 |
| 2322 |
LinkHolderBatchSize: |
| 2323 |
default: 1000 |
| 2324 |
description: |- |
| 2325 |
LinkHolderArray batch size |
| 2326 |
For debugging |
| 2327 |
MaximumMovedPages: |
| 2328 |
default: 100 |
| 2329 |
description: 'Maximum number of pages to move at once when moving subpages with a page.' |
| 2330 |
ForceDeferredUpdatesPreSend: |
| 2331 |
default: false |
| 2332 |
description: |- |
| 2333 |
Force deferred updates to be run before sending a response to the client, |
| 2334 |
instead of attempting to run them after sending the response. Setting this |
| 2335 |
to true is useful for end-to-end testing, to ensure that the effects of a |
| 2336 |
request are visible to any subsequent requests, even if they are made |
| 2337 |
immediately after the first one. Note however that this does not ensure |
| 2338 |
that database replication is complete, nor does it execute any jobs |
| 2339 |
enqueued for later. |
| 2340 |
There should be no reason to set this in a normal production environment. |
| 2341 |
@since 1.38 |
| 2342 |
MultiShardSiteStats: |
| 2343 |
default: false |
| 2344 |
type: boolean |
| 2345 |
description: |- |
| 2346 |
Whether site_stats table should have multiple rows. If set to true, in each update, |
| 2347 |
one of ten rows gets updated at random to reduce lock wait time in wikis |
| 2348 |
that have lots of concurrent edits. |
| 2349 |
It should be set to true in really large wikis with big flow of edits, |
| 2350 |
Otherwise it can cause inaccuracy in data. |
| 2351 |
@since 1.39 |
| 2352 |
CacheDirectory: |
| 2353 |
default: false |
| 2354 |
description: |- |
| 2355 |
Directory for caching data in the local filesystem. Should not be accessible |
| 2356 |
from the web. |
| 2357 |
Note: if multiple wikis share the same localisation cache directory, they |
| 2358 |
must all have the same set of extensions. You can set a directory just for |
| 2359 |
the localisation cache using $wgLocalisationCacheConf['storeDirectory']. |
| 2360 |
MainCacheType: |
| 2361 |
default: 0 |
| 2362 |
description: |- |
| 2363 |
Main cache type. This should be a cache with fast access, but it may have |
| 2364 |
limited space. By default, it is disabled, since the stock database cache |
| 2365 |
is not fast enough to make it worthwhile. |
| 2366 |
The options are: |
| 2367 |
- CACHE_ANYTHING: Use anything, as long as it works |
| 2368 |
- CACHE_NONE: Do not cache |
| 2369 |
- CACHE_DB: Store cache objects in the DB |
| 2370 |
- CACHE_MEMCACHED: MemCached, must specify servers in $wgMemCachedServers |
| 2371 |
- CACHE_ACCEL: APC or APCu |
| 2372 |
- (other): A string may be used which identifies a cache |
| 2373 |
configuration in $wgObjectCaches. |
| 2374 |
For a multi-datacenter setup, the underlying service should be configured |
| 2375 |
to broadcast operations by WANObjectCache using Mcrouter or Dynomite. |
| 2376 |
See @ref wanobjectcache-deployment "Deploying WANObjectCache". |
| 2377 |
To configure the `broadcastRoutingPrefix` WANObjectCache parameter, |
| 2378 |
use $wgWANObjectCache. |
| 2379 |
@see self::MessageCacheType |
| 2380 |
@see self::ParserCacheType |
| 2381 |
MessageCacheType: |
| 2382 |
default: -1 |
| 2383 |
description: |- |
| 2384 |
The cache type for storing the contents of the MediaWiki namespace. This |
| 2385 |
cache is used for a small amount of data which is expensive to regenerate. |
| 2386 |
For available types see $wgMainCacheType. |
| 2387 |
ParserCacheType: |
| 2388 |
default: -1 |
| 2389 |
description: |- |
| 2390 |
The cache type for storing page content HTML (e.g. parsed from wikitext). |
| 2391 |
Parsing wikitext is considered an expensive operation. It is recommended |
| 2392 |
to give your parser cache plenty of storage space, such that long tail cache |
| 2393 |
hits are possible. |
| 2394 |
The default parser cache backend (when MainCacheType is left to CACHE_NONE) |
| 2395 |
is effectively CACHE_DB (SqlBagOStuff). If you set up a main cache type |
| 2396 |
such as memcached, it is recommended to set this explicitly to CACHE_DB. |
| 2397 |
Advice for large wiki farms: |
| 2398 |
- Consider allocating a dedicated database to ParserCache. |
| 2399 |
Register it in $wgObjectCaches and point $wgParserCacheType to it. |
| 2400 |
- Consider using MultiWriteBagOStuff to add a higher tier with Memcached |
| 2401 |
in front of the lower database tier. |
| 2402 |
- Consider setting `'purgePeriod' => 0` in the dedicated SqlBagOStuff |
| 2403 |
entry in $wgObjectCaches. This disables the automatic purging of |
| 2404 |
expired rows (which would normally happen in the background of |
| 2405 |
write requests). You can then schedule the purgeParserCache.php script |
| 2406 |
to e.g. once a day prune expired rows from the a dedicated maintenance |
| 2407 |
server. |
| 2408 |
For available types see $wgMainCacheType. |
| 2409 |
SessionCacheType: |
| 2410 |
default: -1 |
| 2411 |
description: |- |
| 2412 |
The cache backend for storing session data. |
| 2413 |
Used by MediaWiki\Session\SessionManager. See $wgMainCacheType for available types. |
| 2414 |
See [SessionManager Storage expectations](@ref SessionManager-storage-expectations). |
| 2415 |
LanguageConverterCacheType: |
| 2416 |
default: -1 |
| 2417 |
description: |- |
| 2418 |
The cache type for storing language conversion tables, |
| 2419 |
which are used when parsing certain text and interface messages. |
| 2420 |
For available types see $wgMainCacheType. |
| 2421 |
@since 1.20 |
| 2422 |
ObjectCaches: |
| 2423 |
default: |
| 2424 |
0: { class: Wikimedia\ObjectCache\EmptyBagOStuff, reportDupes: false } |
| 2425 |
1: { class: SqlBagOStuff, loggroup: SQLBagOStuff } |
| 2426 |
memcached-php: { class: Wikimedia\ObjectCache\MemcachedPhpBagOStuff, loggroup: memcached } |
| 2427 |
memcached-pecl: { class: Wikimedia\ObjectCache\MemcachedPeclBagOStuff, loggroup: memcached } |
| 2428 |
hash: { class: Wikimedia\ObjectCache\HashBagOStuff, reportDupes: false } |
| 2429 |
apc: { class: Wikimedia\ObjectCache\APCUBagOStuff, reportDupes: false } |
| 2430 |
apcu: { class: Wikimedia\ObjectCache\APCUBagOStuff, reportDupes: false } |
| 2431 |
type: object |
| 2432 |
description: |- |
| 2433 |
Advanced object cache configuration. |
| 2434 |
Use this to define the class names and constructor parameters which are used |
| 2435 |
for the various cache types. Custom cache types may be defined here and |
| 2436 |
referenced from $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType, |
| 2437 |
or $wgLanguageConverterCacheType. |
| 2438 |
The format is an associative array where the key is a cache identifier, and |
| 2439 |
the value is an associative array of parameters. One of the following |
| 2440 |
parameters specifying the class must be given: |
| 2441 |
- class: The class name which will be used. |
| 2442 |
- factory: A callable function which will generate a suitable cache object. |
| 2443 |
The following parameters are shared and understood by most classes: |
| 2444 |
- loggroup: The log channel to use. |
| 2445 |
For SqlBagOStuff, the main configured database will be used, unless one of the following |
| 2446 |
three parameters is given: |
| 2447 |
- server: Server config map for Database::factory() that describes the database to |
| 2448 |
use for all key operations in the current region. This is overridden by "servers". |
| 2449 |
- servers: Map of tag strings to server config maps, each for Database::factory(), |
| 2450 |
describing the set of database servers on which to distribute key operations in the |
| 2451 |
current region. Data is distributed among the servers via key hashing based on the |
| 2452 |
server tags. Therefore, each tag represents a shard of the dataset. Tags are useful |
| 2453 |
for failover using cold-standby servers and for managing shards with replica servers |
| 2454 |
in multiple regions (each having different hostnames). |
| 2455 |
- cluster: The ExternalStore cluster name to use. |
| 2456 |
SqlBagOStuff also accepts the following optional parameters: |
| 2457 |
- dbDomain: The database name to pass to the LoadBalancer. |
| 2458 |
- multiPrimaryMode: Whether the portion of the dataset belonging to each tag/shard is |
| 2459 |
replicated among one or more regions, with one "co-primary" server in each region. |
| 2460 |
Queries are issued in a manner that provides Last-Write-Wins eventual consistency. |
| 2461 |
This option requires the "server" or "servers" options. Only MySQL, with statement |
| 2462 |
based replication (log_bin='ON' and binlog_format='STATEMENT') is supported. Also, |
| 2463 |
the `modtoken` column must exist on the `objectcache` table(s). |
| 2464 |
- purgePeriod: The average number of object cache writes in between garbage collection |
| 2465 |
operations, where expired entries are removed from the database. Or in other words, |
| 2466 |
the probability of performing a purge is one in every this number. If set to zero, |
| 2467 |
purging will never be done at runtime (for use with PurgeParserCache). |
| 2468 |
- purgeLimit: Maximum number of rows to purge at once. |
| 2469 |
- tableName: The table name to use, default is "objectcache". |
| 2470 |
- shards: The number of tables to use for data storage on each server. If greater than |
| 2471 |
1, table names are formed in the style objectcacheNNN where NNN is the shard index, |
| 2472 |
between 0 and shards-1. The number of digits used in the suffix is the minimum number |
| 2473 |
required to hold the largest shard index. Data is distributed among the tables via |
| 2474 |
key hashing. This helps mitigate MySQL bugs 61735 and 61736. |
| 2475 |
- writeBatchSize: Default maximum number of rows to change in each query for write |
| 2476 |
operations that can be chunked into a set of smaller writes. |
| 2477 |
For MemcachedPhpBagOStuff parameters see {@link MemcachedPhpBagOStuff::__construct} |
| 2478 |
For MemcachedPeclBagOStuff parameters see {@link MemcachedPeclBagOStuff::__construct} |
| 2479 |
For RedisBagOStuff parameters see {@link Wikimedia\ObjectCache\RedisBagOStuff::__construct} |
| 2480 |
WANObjectCache: |
| 2481 |
default: { } |
| 2482 |
type: object |
| 2483 |
description: |- |
| 2484 |
Extra parameters to the WANObjectCache constructor. |
| 2485 |
See @ref wanobjectcache-deployment "Deploying WANObjectCache". |
| 2486 |
@since 1.40 |
| 2487 |
MicroStashType: |
| 2488 |
default: -1 |
| 2489 |
type: |
| 2490 |
- string |
| 2491 |
- integer |
| 2492 |
description: |- |
| 2493 |
The stash store backend for MicroStash. |
| 2494 |
This store should be optimized for ephemeral data, and should be able to handle |
| 2495 |
a high volume of writes and reads. The dataset access scope should be across |
| 2496 |
all servers that serve the application. |
| 2497 |
Note that the TTL of the data written to this store must be respected completely |
| 2498 |
before the data gets evicted from the store (whether the data is used or not). |
| 2499 |
The store must not evict data based on LRU or popularity before the TTL expires. |
| 2500 |
Expectations for sysadmins: |
| 2501 |
1. The data written to this store is generally short-lived (seconds/minutes), |
| 2502 |
2. This store must reliably persist and should not evict data until the TTL expires, |
| 2503 |
3. The same store must be accessed by all application servers (i.e. no visible lag or |
| 2504 |
split reality), |
| 2505 |
4. This store should handle a high volume of both writes and reads, |
| 2506 |
with reads completing with consistently low latencies. |
| 2507 |
Examples users: |
| 2508 |
- {@link MediaWiki::Permissions::RateLimiter RateLimiter} (via RStatsFactory) |
| 2509 |
- {@link Wikimedia::Rdbms::ChronologyProtector ChronologyProtector} |
| 2510 |
See also [ChronologyProtector requirements](@ref ChronologyProtector-storage-requirements), |
| 2511 |
for more detailed system administrator requirements for multi-DC operations. |
| 2512 |
Valid options are the keys of {@link $wgObjectCaches}, e.g. CACHE_* constants. |
| 2513 |
@see \Wikimedia\ObjectCache\BagOStuff |
| 2514 |
@since 1.42 |
| 2515 |
MainStash: |
| 2516 |
default: 1 |
| 2517 |
description: |- |
| 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 |
| 2534 |
these kinds of anomalies should use other storage mediums. |
| 2535 |
Valid options are the keys of {@link $wgObjectCaches}, e.g. CACHE_* constants. |
| 2536 |
@see \Wikimedia\ObjectCache\BagOStuff |
| 2537 |
@since 1.26 |
| 2538 |
ParsoidCacheConfig: |
| 2539 |
type: object |
| 2540 |
properties: |
| 2541 |
StashType: { type: [integer, string, 'null'], default: null } |
| 2542 |
StashDuration: { type: integer, default: 86400 } |
| 2543 |
WarmParsoidParserCache: { type: boolean, default: false } |
| 2544 |
description: |- |
| 2545 |
Configuration for the caching related to parsoid output. The configuration contains the |
| 2546 |
following keys: |
| 2547 |
- StashType: The type of object store to be used by the ParsoidOutputStash service, |
| 2548 |
which stores the base state of HTML based edits. |
| 2549 |
Valid options are the keys of {@link $wgObjectCaches}, e.g. CACHE_* constants. |
| 2550 |
By default, the value of the MainStash setting will be used. |
| 2551 |
This should be an object store that provides fairly solid persistence guarantees, |
| 2552 |
since losing an entry from the stash may mean that the user can't save their edit. |
| 2553 |
If null, the value of the MainStash configuration setting will be used. |
| 2554 |
- StashDuration: The number of seconds for which an entry in the stash should be kept. |
| 2555 |
Should be long enough for users to finish editing, |
| 2556 |
since losing an entry from the stash may mean that the user can't save their edit. |
| 2557 |
This is set to one day by default. |
| 2558 |
- WarmParsoidParserCache: Setting this to true will pre-populate the parsoid parser cache |
| 2559 |
with parsoid outputs on page edits. This speeds up loading HTML into Visual Editor. |
| 2560 |
@since 1.39 |
| 2561 |
@unstable Per MediaWiki 1.39, the structure of this configuration is still subject to |
| 2562 |
change. |
| 2563 |
default: null |
| 2564 |
ParsoidSelectiveUpdateSampleRate: |
| 2565 |
type: integer |
| 2566 |
default: 0 |
| 2567 |
description: |- |
| 2568 |
Sample rate for collecting statistics on Parsoid selective update. |
| 2569 |
Zero disables collection; 1000 means "1 in every 1000 parses will |
| 2570 |
be sampled". |
| 2571 |
@warning This is EXPERIMENTAL and will disappear once analysis is |
| 2572 |
complete. |
| 2573 |
ParserCacheFilterConfig: |
| 2574 |
type: object |
| 2575 |
default: |
| 2576 |
pcache: { default: { minCpuTime: 0 } } |
| 2577 |
parsoid-pcache: { default: { minCpuTime: 0 } } |
| 2578 |
additionalProperties: |
| 2579 |
type: object |
| 2580 |
description: 'A map of namespace IDs to filter definitions.' |
| 2581 |
additionalProperties: { type: object, description: 'A map of filter names to values.', properties: { minCpuTime: { type: number } } } |
| 2582 |
description: |- |
| 2583 |
Per-namespace configuration for the ParserCache filter. |
| 2584 |
There is one top level key for each cache name supported in ParserCacheFactory. |
| 2585 |
The per-namespace configuration is given separately for each cache. |
| 2586 |
For each namespace, this defines a set of filter options, which are represented |
| 2587 |
as an associative array. The following keys are supported in this array: |
| 2588 |
- minCpuTime: causes the parser cache to not save any output that took fewer |
| 2589 |
than the given number of seconds of CPU time to generate, according to |
| 2590 |
ParserOutput::getTimeProfile(). Set to 0 to always cache, or to |
| 2591 |
PHP_INT_MAX to disable caching for this namespace. |
| 2592 |
If no filter options are defined for a given namespace, the filter options |
| 2593 |
under the "default" key will be used for pages in that namespace. |
| 2594 |
@since 1.42 |
| 2595 |
ChronologyProtectorSecret: |
| 2596 |
default: '' |
| 2597 |
type: string |
| 2598 |
description: |- |
| 2599 |
Secret string for HMAC hashing in ChronologyProtector [optional] |
| 2600 |
@since 1.41 |
| 2601 |
ParserCacheExpireTime: |
| 2602 |
default: 86400 |
| 2603 |
description: |- |
| 2604 |
The expiry time for the parser cache, in seconds. |
| 2605 |
The default is 86400 (one day). |
| 2606 |
OldRevisionParserCacheExpireTime: |
| 2607 |
default: 3600 |
| 2608 |
description: |- |
| 2609 |
The expiry time for the parser cache for old revisions, in seconds. |
| 2610 |
The default is 3600 (cache disabled). |
| 2611 |
ObjectCacheSessionExpiry: |
| 2612 |
default: 3600 |
| 2613 |
description: 'The expiry time to use for session storage, in seconds.' |
| 2614 |
PHPSessionHandling: |
| 2615 |
default: enable |
| 2616 |
type: string |
| 2617 |
description: |- |
| 2618 |
Whether to use PHP session handling ($_SESSION and session_*() functions) |
| 2619 |
If the constant MW_NO_SESSION is defined, this is forced to 'disable'. |
| 2620 |
If the constant MW_NO_SESSION_HANDLER is defined, this is ignored and PHP |
| 2621 |
session handling will function independently of SessionHandler. |
| 2622 |
SessionHandler and PHP's session handling may attempt to override each |
| 2623 |
others' cookies. |
| 2624 |
@since 1.27 |
| 2625 |
SuspiciousIpExpiry: |
| 2626 |
default: false |
| 2627 |
type: |
| 2628 |
- integer |
| 2629 |
- boolean |
| 2630 |
description: |- |
| 2631 |
Time in seconds to remember IPs for, for the purposes of logging IP changes within the |
| 2632 |
same session. This is meant more for debugging errors in the authentication system than |
| 2633 |
for detecting abuse. |
| 2634 |
@since 1.36 |
| 2635 |
SessionPbkdf2Iterations: |
| 2636 |
default: 10001 |
| 2637 |
description: |- |
| 2638 |
Number of internal PBKDF2 iterations to use when deriving session secrets. |
| 2639 |
@since 1.28 |
| 2640 |
MemCachedServers: |
| 2641 |
default: |
| 2642 |
- '127.0.0.1:11211' |
| 2643 |
type: array |
| 2644 |
description: 'The list of MemCached servers and port numbers' |
| 2645 |
MemCachedPersistent: |
| 2646 |
default: false |
| 2647 |
description: |- |
| 2648 |
Use persistent connections to MemCached, which are shared across multiple |
| 2649 |
requests. |
| 2650 |
MemCachedTimeout: |
| 2651 |
default: 500000 |
| 2652 |
description: 'Read/write timeout for MemCached server communication, in microseconds.' |
| 2653 |
UseLocalMessageCache: |
| 2654 |
default: false |
| 2655 |
description: |- |
| 2656 |
Set this to true to maintain a copy of the message cache on the local server. |
| 2657 |
This layer of message cache is in addition to the one configured by $wgMessageCacheType. |
| 2658 |
The local copy is put in APC. If APC is not installed, this setting does nothing. |
| 2659 |
Note that this is about the message cache, which stores interface messages |
| 2660 |
maintained as wiki pages. This is separate from the localisation cache for interface |
| 2661 |
messages provided by the software, which is configured by $wgLocalisationCacheConf. |
| 2662 |
AdaptiveMessageCache: |
| 2663 |
default: false |
| 2664 |
description: |- |
| 2665 |
Instead of caching everything, only cache those messages which have |
| 2666 |
been customised in the site content language. This means that |
| 2667 |
MediaWiki:Foo/ja is ignored if MediaWiki:Foo doesn't exist. |
| 2668 |
This option is probably only useful for translatewiki.net. |
| 2669 |
LocalisationCacheConf: |
| 2670 |
properties: |
| 2671 |
class: { type: string, default: LocalisationCache } |
| 2672 |
store: { type: string, default: detect } |
| 2673 |
storeClass: { type: [boolean, string], default: false } |
| 2674 |
storeDirectory: { type: [boolean, string], default: false } |
| 2675 |
storeServer: { type: object, default: [] } |
| 2676 |
forceRecache: { type: boolean, default: false } |
| 2677 |
manualRecache: { type: boolean, default: false } |
| 2678 |
type: object |
| 2679 |
description: |- |
| 2680 |
Localisation cache configuration. |
| 2681 |
Used by service wiring to decide how to construct the |
| 2682 |
LocalisationCache instance. Associative array with keys: |
| 2683 |
class: The class to use for constructing the LocalisationCache object. |
| 2684 |
This may be overridden by extensions to a subclass of LocalisationCache. |
| 2685 |
Sub classes are expected to still honor the 'storeClass', 'storeDirectory' |
| 2686 |
and 'manualRecache' options where applicable. |
| 2687 |
storeClass: Which LCStore class implementation to use. This is optional. |
| 2688 |
The default LocalisationCache class offers the 'store' option |
| 2689 |
as abstraction for this. |
| 2690 |
store: How and where to store localisation cache data. |
| 2691 |
This option is ignored if 'storeClass' is explicitly set to a class name. |
| 2692 |
Must be one of: |
| 2693 |
- 'detect' (default): Automatically select 'files' if 'storeDirectory' |
| 2694 |
or $wgCacheDirectory is set, and fall back to 'db' otherwise. |
| 2695 |
- 'files': Store in $wgCacheDirectory as CDB files. |
| 2696 |
- 'array': Store in $wgCacheDirectory as PHP static array files. |
| 2697 |
- 'db': Store in the l10n_cache database table. |
| 2698 |
storeDirectory: If the selected LCStore class puts its data in files, then it |
| 2699 |
will use this directory. If set to false (default), then |
| 2700 |
$wgCacheDirectory is used instead. |
| 2701 |
manualRecache: Set this to true to disable cache updates on web requests. |
| 2702 |
Use maintenance/rebuildLocalisationCache.php instead. |
| 2703 |
default: null |
| 2704 |
CachePages: |
| 2705 |
default: true |
| 2706 |
description: 'Allow client-side caching of pages' |
| 2707 |
CacheEpoch: |
| 2708 |
default: '20030516000000' |
| 2709 |
description: |- |
| 2710 |
Set this to current time to invalidate all prior cached pages. Affects both |
| 2711 |
client-side and server-side caching. |
| 2712 |
You can get the current date on your server by using the command: |
| 2713 |
@verbatim date +%Y%m%d%H%M%S |
| 2714 |
@endverbatim |
| 2715 |
GitInfoCacheDirectory: |
| 2716 |
default: false |
| 2717 |
description: |- |
| 2718 |
Directory where GitInfo will look for pre-computed cache files. If false, |
| 2719 |
$wgCacheDirectory/gitinfo will be used. |
| 2720 |
UseFileCache: |
| 2721 |
default: false |
| 2722 |
description: |- |
| 2723 |
This will cache static pages for non-logged-in users to reduce |
| 2724 |
database traffic on public sites. ResourceLoader requests to default |
| 2725 |
language and skins are cached as well as single module requests. |
| 2726 |
FileCacheDepth: |
| 2727 |
default: 2 |
| 2728 |
description: |- |
| 2729 |
Depth of the subdirectory hierarchy to be created under |
| 2730 |
$wgFileCacheDirectory. The subdirectories will be named based on |
| 2731 |
the MD5 hash of the title. A value of 0 means all cache files will |
| 2732 |
be put directly into the main file cache directory. |
| 2733 |
RenderHashAppend: |
| 2734 |
default: '' |
| 2735 |
description: |- |
| 2736 |
Append a configured value to the parser cache and the sitenotice key so |
| 2737 |
that they can be kept separate for some class of activity. |
| 2738 |
EnableSidebarCache: |
| 2739 |
default: false |
| 2740 |
description: |- |
| 2741 |
If on, the sidebar navigation links are cached for users with the |
| 2742 |
current language set. This can save a touch of load on a busy site |
| 2743 |
by shaving off extra message lookups. |
| 2744 |
However it is also fragile: changing the site configuration, or |
| 2745 |
having a variable $wgArticlePath, can produce broken links that |
| 2746 |
don't update as expected. |
| 2747 |
SidebarCacheExpiry: |
| 2748 |
default: 86400 |
| 2749 |
description: 'Expiry time for the sidebar cache, in seconds' |
| 2750 |
UseGzip: |
| 2751 |
default: false |
| 2752 |
description: |- |
| 2753 |
When using the file cache, we can store the cached HTML gzipped to save disk |
| 2754 |
space. Pages will then also be served compressed to clients that support it. |
| 2755 |
Requires zlib support enabled in PHP. |
| 2756 |
InvalidateCacheOnLocalSettingsChange: |
| 2757 |
default: true |
| 2758 |
description: |- |
| 2759 |
Invalidate various caches when LocalSettings.php changes. This is equivalent |
| 2760 |
to setting $wgCacheEpoch to the modification time of LocalSettings.php, as |
| 2761 |
was previously done in the default LocalSettings.php file. |
| 2762 |
On high-traffic wikis, this should be set to false, to avoid the need to |
| 2763 |
check the file modification time, and to avoid the performance impact of |
| 2764 |
unnecessary cache invalidations. |
| 2765 |
ExtensionInfoMTime: |
| 2766 |
default: false |
| 2767 |
type: |
| 2768 |
- integer |
| 2769 |
- boolean |
| 2770 |
description: |- |
| 2771 |
When loading extensions through the extension registration system, this |
| 2772 |
can be used to invalidate the cache. A good idea would be to set this to |
| 2773 |
one file, you can just `touch` that one to invalidate the cache |
| 2774 |
**Example:** |
| 2775 |
``` |
| 2776 |
$wgExtensionInfoMTime = filemtime( "$IP/LocalSettings.php" ); |
| 2777 |
``` |
| 2778 |
If set to false, the mtime for each individual JSON file will be checked, |
| 2779 |
which can be slow if a large number of extensions are being loaded. |
| 2780 |
EnableRemoteBagOStuffTests: |
| 2781 |
default: false |
| 2782 |
description: |- |
| 2783 |
If this is set to true, phpunit will run integration tests against remote |
| 2784 |
caches defined in $wgObjectCaches. |
| 2785 |
@since 1.38 |
| 2786 |
UseCdn: |
| 2787 |
default: false |
| 2788 |
description: |- |
| 2789 |
Enable/disable CDN. |
| 2790 |
See https://www.mediawiki.org/wiki/Manual:Performance_tuning#Page_view_caching |
| 2791 |
@since 1.34 Renamed from $wgUseSquid. |
| 2792 |
VaryOnXFP: |
| 2793 |
default: false |
| 2794 |
description: |- |
| 2795 |
Add X-Forwarded-Proto to the Vary and Key headers for API requests and |
| 2796 |
RSS/Atom feeds. Use this if you have an SSL termination setup |
| 2797 |
and need to split the cache between HTTP and HTTPS for API requests, |
| 2798 |
feed requests and HTTP redirect responses in order to prevent cache |
| 2799 |
pollution. This does not affect 'normal' requests to index.php other than |
| 2800 |
HTTP redirects. |
| 2801 |
InternalServer: |
| 2802 |
default: false |
| 2803 |
description: |- |
| 2804 |
Internal server name as known to CDN, if different. |
| 2805 |
**Example:** |
| 2806 |
``` |
| 2807 |
$wgInternalServer = 'http://yourinternal.tld:8000'; |
| 2808 |
``` |
| 2809 |
CdnMaxAge: |
| 2810 |
default: 18000 |
| 2811 |
description: |- |
| 2812 |
Cache TTL for the CDN sent as s-maxage (without ESI) or |
| 2813 |
Surrogate-Control (with ESI). Without ESI, you should strip |
| 2814 |
out s-maxage in the CDN config. |
| 2815 |
18000 seconds = 5 hours, more cache hits with 2678400 = 31 days. |
| 2816 |
@since 1.34 Renamed from $wgSquidMaxage |
| 2817 |
CdnMaxageLagged: |
| 2818 |
default: 30 |
| 2819 |
description: |- |
| 2820 |
Cache timeout for the CDN when DB replica DB lag is high |
| 2821 |
@see self::CdnMaxAge |
| 2822 |
@since 1.27 |
| 2823 |
CdnMaxageStale: |
| 2824 |
default: 10 |
| 2825 |
description: |- |
| 2826 |
Cache timeout when delivering a stale ParserCache response due to PoolCounter |
| 2827 |
contention. |
| 2828 |
@since 1.35 |
| 2829 |
CdnReboundPurgeDelay: |
| 2830 |
default: 0 |
| 2831 |
description: |- |
| 2832 |
If set, any SquidPurge call on a URL or URLs will send a second purge no less than |
| 2833 |
this many seconds later via the job queue. This requires delayed job support. |
| 2834 |
This should be safely higher than the 'max lag' value in $wgLBFactoryConf, so that |
| 2835 |
replica DB lag does not cause page to be stuck in stales states in CDN. |
| 2836 |
This also fixes race conditions in two-tiered CDN setups (e.g. cdn2 => cdn1 => MediaWiki). |
| 2837 |
If a purge for a URL reaches cdn2 before cdn1 and a request reaches cdn2 for that URL, |
| 2838 |
it will populate the response from the stale cdn1 value. When cdn1 gets the purge, cdn2 |
| 2839 |
will still be stale. If the rebound purge delay is safely higher than the time to relay |
| 2840 |
a purge to all nodes, then the rebound purge will clear cdn2 after cdn1 was cleared. |
| 2841 |
@since 1.27 |
| 2842 |
CdnMaxageSubstitute: |
| 2843 |
default: 60 |
| 2844 |
description: |- |
| 2845 |
Cache timeout for the CDN when a response is known to be wrong or incomplete (due to load) |
| 2846 |
@see self::CdnMaxAge |
| 2847 |
@since 1.27 |
| 2848 |
ForcedRawSMaxage: |
| 2849 |
default: 300 |
| 2850 |
description: |- |
| 2851 |
Default maximum age for raw CSS/JS accesses |
| 2852 |
300 seconds = 5 minutes. |
| 2853 |
CdnServers: |
| 2854 |
default: { } |
| 2855 |
type: object |
| 2856 |
description: |- |
| 2857 |
List of proxy servers to purge on changes; default port is 80. Use IP addresses. |
| 2858 |
When MediaWiki is running behind a proxy, it will trust X-Forwarded-For |
| 2859 |
headers sent/modified from these proxies when obtaining the remote IP address |
| 2860 |
For a list of trusted servers which *aren't* purged, see $wgSquidServersNoPurge. |
| 2861 |
@since 1.34 Renamed from $wgSquidServers. |
| 2862 |
CdnServersNoPurge: |
| 2863 |
default: { } |
| 2864 |
type: object |
| 2865 |
description: |- |
| 2866 |
As with $wgCdnServers, except these servers aren't purged on page changes; |
| 2867 |
use to set a list of trusted proxies, etc. Supports both individual IP |
| 2868 |
addresses and CIDR blocks. |
| 2869 |
@since 1.23 Supports CIDR ranges |
| 2870 |
@since 1.34 Renamed from $wgSquidServersNoPurge |
| 2871 |
HTCPRouting: |
| 2872 |
default: { } |
| 2873 |
type: object |
| 2874 |
description: |- |
| 2875 |
Routing configuration for HTCP multicast purging. Add elements here to |
| 2876 |
enable HTCP and determine which purges are sent where. If set to an empty |
| 2877 |
array, HTCP is disabled. |
| 2878 |
Each key in this array is a regular expression to match against the purged |
| 2879 |
URL, or an empty string to match all URLs. The purged URL is matched against |
| 2880 |
the regexes in the order specified, and the first rule whose regex matches |
| 2881 |
is used, all remaining rules will thus be ignored. |
| 2882 |
**Example configuration to send purges for upload.wikimedia.org to one** |
| 2883 |
multicast group and all other purges to another: |
| 2884 |
``` |
| 2885 |
$wgHTCPRouting = [ |
| 2886 |
'|^https?://upload\.wikimedia\.org|' => [ |
| 2887 |
'host' => '239.128.0.113', |
| 2888 |
'port' => 4827, |
| 2889 |
], |
| 2890 |
'' => [ |
| 2891 |
'host' => '239.128.0.112', |
| 2892 |
'port' => 4827, |
| 2893 |
], |
| 2894 |
]; |
| 2895 |
``` |
| 2896 |
You can also pass an array of hosts to send purges too. This is useful when |
| 2897 |
you have several multicast groups or unicast address that should receive a |
| 2898 |
given purge. Multiple hosts support was introduced in MediaWiki 1.22. |
| 2899 |
**Example of sending purges to multiple hosts:** |
| 2900 |
``` |
| 2901 |
$wgHTCPRouting = [ |
| 2902 |
'' => [ |
| 2903 |
// Purges to text caches using multicast |
| 2904 |
[ 'host' => '239.128.0.114', 'port' => '4827' ], |
| 2905 |
// Purges to a hardcoded list of caches |
| 2906 |
[ 'host' => '10.88.66.1', 'port' => '4827' ], |
| 2907 |
[ 'host' => '10.88.66.2', 'port' => '4827' ], |
| 2908 |
[ 'host' => '10.88.66.3', 'port' => '4827' ], |
| 2909 |
], |
| 2910 |
]; |
| 2911 |
``` |
| 2912 |
@since 1.22 |
| 2913 |
@see self::HTCPMulticastTTL |
| 2914 |
HTCPMulticastTTL: |
| 2915 |
default: 1 |
| 2916 |
description: |- |
| 2917 |
HTCP multicast TTL. |
| 2918 |
@see self::HTCPRouting |
| 2919 |
UsePrivateIPs: |
| 2920 |
default: false |
| 2921 |
description: 'Should forwarded Private IPs be accepted?' |
| 2922 |
CdnMatchParameterOrder: |
| 2923 |
default: true |
| 2924 |
description: |- |
| 2925 |
Set this to false if MediaWiki is behind a CDN that re-orders query |
| 2926 |
parameters on incoming requests. |
| 2927 |
MediaWiki sets a large 'Cache-Control: s-maxage=' directive on page |
| 2928 |
views only if the request URL matches one of the normal CDN URL forms. |
| 2929 |
When 'CdnMatchParameterOrder' is false, the matching algorithm ignores |
| 2930 |
the order of URL parameters. |
| 2931 |
@since 1.39 |
| 2932 |
LanguageCode: |
| 2933 |
default: en |
| 2934 |
description: |- |
| 2935 |
Site language code. See includes/languages/data/Names.php for languages |
| 2936 |
supported by MediaWiki out of the box. Not all languages listed there have |
| 2937 |
translations, see languages/messages/ for the list of languages with some |
| 2938 |
localisation. |
| 2939 |
Warning: Don't use any of MediaWiki's deprecated language codes listed in |
| 2940 |
LanguageCode::getDeprecatedCodeMapping or $wgDummyLanguageCodes, like "no" |
| 2941 |
for Norwegian (use "nb" instead). If you do, things will break unexpectedly. |
| 2942 |
This defines the default interface language for all users, but users can |
| 2943 |
change it in their preferences. |
| 2944 |
This also defines the language of pages in the wiki. The content is wrapped |
| 2945 |
in a html element with lang=XX attribute. This behavior can be overridden |
| 2946 |
via hooks, see Title::getPageLanguage. |
| 2947 |
GrammarForms: |
| 2948 |
default: { } |
| 2949 |
type: object |
| 2950 |
description: |- |
| 2951 |
Some languages need different word forms, usually for different cases. |
| 2952 |
Used in Language::convertGrammar(). |
| 2953 |
**Example:** |
| 2954 |
``` |
| 2955 |
$wgGrammarForms['en']['genitive']['car'] = 'car\'s'; |
| 2956 |
``` |
| 2957 |
InterwikiMagic: |
| 2958 |
default: true |
| 2959 |
description: 'Treat language links as magic connectors, not inline links' |
| 2960 |
HideInterlanguageLinks: |
| 2961 |
default: false |
| 2962 |
description: 'Hide interlanguage links from the sidebar' |
| 2963 |
ExtraInterlanguageLinkPrefixes: |
| 2964 |
default: [] |
| 2965 |
type: array |
| 2966 |
description: |- |
| 2967 |
List of additional interwiki prefixes that should be treated as |
| 2968 |
interlanguage links (i.e. placed in the sidebar). |
| 2969 |
Notes: |
| 2970 |
- This will not do anything unless the prefixes are defined in the interwiki |
| 2971 |
map. |
| 2972 |
- The display text for these custom interlanguage links will be fetched from |
| 2973 |
the system message "interlanguage-link-xyz" where xyz is the prefix in |
| 2974 |
this array. |
| 2975 |
- A friendly name for each site, used for tooltip text, may optionally be |
| 2976 |
placed in the system message "interlanguage-link-sitename-xyz" where xyz is |
| 2977 |
the prefix in this array. |
| 2978 |
- This should be a list of "interwiki prefixes" (ie, what appears in |
| 2979 |
wikitext), and you probably want to add an entry to |
| 2980 |
InterlanguageLinkCodeMap as well to specify which mediawiki internal |
| 2981 |
(or custom) language code this prefix corresponds to, and perhaps |
| 2982 |
then map that custom language code to a language name in |
| 2983 |
ExtraLanguageNames. |
| 2984 |
InterlanguageLinkCodeMap: |
| 2985 |
default: { } |
| 2986 |
type: object |
| 2987 |
description: |- |
| 2988 |
Map of interlanguage link codes to language codes. This is useful to override |
| 2989 |
what is shown as the language name when the interwiki code does not match it |
| 2990 |
exactly |
| 2991 |
@since 1.35 |
| 2992 |
ExtraLanguageNames: |
| 2993 |
default: { } |
| 2994 |
type: object |
| 2995 |
description: 'List of language names or overrides for default names in Names.php' |
| 2996 |
ExtraLanguageCodes: |
| 2997 |
default: |
| 2998 |
bh: bho |
| 2999 |
'no': nb |
| 3000 |
simple: en |
| 3001 |
type: object |
| 3002 |
description: |- |
| 3003 |
List of mappings from one language code to another. |
| 3004 |
This array makes the codes not appear as a selectable language on the |
| 3005 |
installer. |
| 3006 |
In Setup.php, the variable $wgDummyLanguageCodes is created by combining |
| 3007 |
these codes with a list of "deprecated" codes, which are mostly leftovers |
| 3008 |
from renames or other legacy things, and the internal codes 'qqq' and 'qqx'. |
| 3009 |
If a mapping in $wgExtraLanguageCodes collide with a built-in mapping, the |
| 3010 |
value in $wgExtraLanguageCodes will be used. |
| 3011 |
@since 1.29 |
| 3012 |
DummyLanguageCodes: |
| 3013 |
default: { } |
| 3014 |
type: object |
| 3015 |
description: |- |
| 3016 |
Functionally the same as $wgExtraLanguageCodes, but deprecated. Instead of |
| 3017 |
appending values to this array, append them to $wgExtraLanguageCodes. |
| 3018 |
@note Since 1.29, this should not be set directly in LocalSettings, |
| 3019 |
ExtraLanguageCodes should be set instead. However, DummyLanguageCodes |
| 3020 |
will be initialized and can be read internally. |
| 3021 |
AllUnicodeFixes: |
| 3022 |
default: false |
| 3023 |
description: |- |
| 3024 |
Set this to always convert certain Unicode sequences to modern ones |
| 3025 |
regardless of the content language. This has a small performance |
| 3026 |
impact. |
| 3027 |
@since 1.17 |
| 3028 |
LegacyEncoding: |
| 3029 |
default: false |
| 3030 |
description: |- |
| 3031 |
Set this to eg 'ISO-8859-1' to perform character set conversion when |
| 3032 |
loading old revisions not marked with "utf-8" flag. Use this when |
| 3033 |
converting a wiki from MediaWiki 1.4 or earlier to UTF-8 without the |
| 3034 |
burdensome mass conversion of old text data. |
| 3035 |
@note This DOES NOT touch any fields other than old_text. Titles, comments, |
| 3036 |
user names, etc still must be converted en masse in the database before |
| 3037 |
continuing as a UTF-8 wiki. |
| 3038 |
AmericanDates: |
| 3039 |
default: false |
| 3040 |
description: |- |
| 3041 |
Enable dates like 'May 12' instead of '12 May', if the default date format |
| 3042 |
is 'dmy or mdy'. |
| 3043 |
TranslateNumerals: |
| 3044 |
default: true |
| 3045 |
description: |- |
| 3046 |
For Hindi and Arabic use local numerals instead of Western style (0-9) |
| 3047 |
numerals in interface. |
| 3048 |
UseDatabaseMessages: |
| 3049 |
default: true |
| 3050 |
description: |- |
| 3051 |
Translation using MediaWiki: namespace. |
| 3052 |
Interface messages will be loaded from the database. |
| 3053 |
MaxMsgCacheEntrySize: |
| 3054 |
default: 10000 |
| 3055 |
description: 'Maximum entry size in the message cache, in bytes' |
| 3056 |
DisableLangConversion: |
| 3057 |
default: false |
| 3058 |
description: 'Whether to enable language variant conversion.' |
| 3059 |
DisableTitleConversion: |
| 3060 |
default: false |
| 3061 |
description: |- |
| 3062 |
Whether to enable language variant conversion for links. |
| 3063 |
Note that this option is slightly misnamed. |
| 3064 |
DefaultLanguageVariant: |
| 3065 |
default: false |
| 3066 |
description: |- |
| 3067 |
Default variant code. If false, the default will be the static default |
| 3068 |
variant of the language. |
| 3069 |
UsePigLatinVariant: |
| 3070 |
default: false |
| 3071 |
description: |- |
| 3072 |
Whether to enable the pig Latin variant of English (en-x-piglatin), |
| 3073 |
used to ease variant development work. |
| 3074 |
DisabledVariants: |
| 3075 |
default: { } |
| 3076 |
type: object |
| 3077 |
description: |- |
| 3078 |
Disabled variants array of language variant conversion. |
| 3079 |
**Example:** |
| 3080 |
``` |
| 3081 |
$wgDisabledVariants[] = 'zh-mo'; |
| 3082 |
$wgDisabledVariants[] = 'zh-my'; |
| 3083 |
``` |
| 3084 |
VariantArticlePath: |
| 3085 |
default: false |
| 3086 |
description: |- |
| 3087 |
Like $wgArticlePath, but on multi-variant wikis, this provides a |
| 3088 |
path format that describes which parts of the URL contain the |
| 3089 |
language variant. |
| 3090 |
**Example:** |
| 3091 |
``` |
| 3092 |
$wgLanguageCode = 'sr'; |
| 3093 |
$wgVariantArticlePath = '/$2/$1'; |
| 3094 |
$wgArticlePath = '/wiki/$1'; |
| 3095 |
``` |
| 3096 |
A link to /wiki/ would be redirected to /sr/Главна_страна |
| 3097 |
It is important that $wgArticlePath not overlap with possible values |
| 3098 |
of $wgVariantArticlePath. |
| 3099 |
UseXssLanguage: |
| 3100 |
default: false |
| 3101 |
description: |- |
| 3102 |
Whether to enable the 'x-xss' language code, used for development. |
| 3103 |
When enabled, the language code 'x-xss' (e.g. via ?uselang=x-xss) can |
| 3104 |
be used to test correct message escaping at scale, to prevent |
| 3105 |
cross-site scripting. In this "language", every message becomes an HTML |
| 3106 |
snippet which attempts to alert the message key. Well-written code will |
| 3107 |
correctly escape all of these messages. If any alerts are actually |
| 3108 |
fired in the browser, the message is not being escaped correctly; |
| 3109 |
either the offending code should be fixed, or the message should be |
| 3110 |
added to {@link self::RawHtmlMessages}. |
| 3111 |
@see https://www.mediawiki.org/wiki/Special:MyLanguage/Cross-site_scripting |
| 3112 |
@since 1.41 |
| 3113 |
LoginLanguageSelector: |
| 3114 |
default: false |
| 3115 |
description: |- |
| 3116 |
Show a bar of language selection links in the user login and user |
| 3117 |
registration forms; edit the "loginlanguagelinks" message to |
| 3118 |
customise these. |
| 3119 |
ForceUIMsgAsContentMsg: |
| 3120 |
default: { } |
| 3121 |
type: object |
| 3122 |
description: |- |
| 3123 |
When translating messages with wfMessage(), it is not always clear what |
| 3124 |
should be considered UI messages and what should be content messages. |
| 3125 |
For example, for the English Wikipedia, there should be only one 'mainpage', |
| 3126 |
so when getting the link for 'mainpage', we should treat it as site content |
| 3127 |
and call ->inContentLanguage()->text(), but for rendering the text of the |
| 3128 |
link, we call ->text(). The code behaves this way by default. However, |
| 3129 |
sites like the Wikimedia Commons do offer different versions of 'mainpage' |
| 3130 |
and the like for different languages. This array provides a way to override |
| 3131 |
the default behavior. |
| 3132 |
**Example:** |
| 3133 |
To allow language-specific main page and community |
| 3134 |
portal: |
| 3135 |
``` |
| 3136 |
$wgForceUIMsgAsContentMsg = [ 'mainpage', 'portal-url' ]; |
| 3137 |
``` |
| 3138 |
RawHtmlMessages: |
| 3139 |
default: |
| 3140 |
- copyright |
| 3141 |
- history_copyright |
| 3142 |
- googlesearch |
| 3143 |
type: array |
| 3144 |
items: |
| 3145 |
type: string |
| 3146 |
description: |- |
| 3147 |
List of messages which might contain raw HTML. |
| 3148 |
Extensions should add their insecure raw HTML messages to extension.json. |
| 3149 |
The list is used for access control: |
| 3150 |
changing messages listed here will require editsitecss and editsitejs rights. |
| 3151 |
Message names must be given with underscores rather than spaces and with lowercase first |
| 3152 |
letter. |
| 3153 |
@since 1.32 |
| 3154 |
AllowRawHtmlCopyrightMessages: |
| 3155 |
default: true |
| 3156 |
type: boolean |
| 3157 |
description: |- |
| 3158 |
Whether on-wiki overrides for the 'copyright' and 'history_copyright' messages, which allow raw |
| 3159 |
HTML, will be used. |
| 3160 |
@since 1.43 |
| 3161 |
Localtimezone: |
| 3162 |
dynamicDefault: |
| 3163 |
callback: [MediaWiki\MainConfigSchema, getDefaultLocaltimezone] |
| 3164 |
description: |- |
| 3165 |
Fake out the timezone that the server thinks it's in. This will be used for |
| 3166 |
date display and not for what's stored in the DB. Leave to null to retain |
| 3167 |
your server's OS-based timezone value. |
| 3168 |
This variable is currently used only for signature formatting and for local |
| 3169 |
time/date parser variables ({{LOCALTIME}} etc.) |
| 3170 |
Timezones can be translated by editing MediaWiki messages of type |
| 3171 |
timezone-nameinlowercase like timezone-utc. |
| 3172 |
A list of usable timezones can found at: |
| 3173 |
https://www.php.net/manual/en/timezones.php |
| 3174 |
**Examples:** |
| 3175 |
``` |
| 3176 |
$wgLocaltimezone = 'UTC'; |
| 3177 |
$wgLocaltimezone = 'GMT'; |
| 3178 |
$wgLocaltimezone = 'PST8PDT'; |
| 3179 |
$wgLocaltimezone = 'Europe/Sweden'; |
| 3180 |
$wgLocaltimezone = 'CET'; |
| 3181 |
``` |
| 3182 |
default: null |
| 3183 |
LocalTZoffset: |
| 3184 |
dynamicDefault: |
| 3185 |
use: [Localtimezone] |
| 3186 |
callback: [MediaWiki\MainConfigSchema, getDefaultLocalTZoffset] |
| 3187 |
description: |- |
| 3188 |
Set an offset from UTC in minutes to use for the default timezone setting |
| 3189 |
for anonymous users and new user accounts. |
| 3190 |
This setting is used for most date/time displays in the software, and is |
| 3191 |
overridable in user preferences. It is *not* used for signature timestamps. |
| 3192 |
By default, this will be set to match $wgLocaltimezone. |
| 3193 |
default: null |
| 3194 |
OverrideUcfirstCharacters: |
| 3195 |
default: { } |
| 3196 |
type: object |
| 3197 |
description: |- |
| 3198 |
Map of Unicode characters for which capitalization is overridden in |
| 3199 |
Language::ucfirst. The characters should be |
| 3200 |
represented as char_to_convert => conversion_override. See T219279 for details |
| 3201 |
on why this is useful during php version transitions. |
| 3202 |
@since 1.34 |
| 3203 |
MimeType: |
| 3204 |
default: text/html |
| 3205 |
description: 'The default Content-Type header.' |
| 3206 |
Html5Version: |
| 3207 |
default: null |
| 3208 |
description: |- |
| 3209 |
Defines the value of the version attribute in the <html> tag, if any. |
| 3210 |
If your wiki uses RDFa, set it to the correct value for RDFa+HTML5. |
| 3211 |
Correct current values are 'HTML+RDFa 1.0' or 'XHTML+RDFa 1.0'. |
| 3212 |
See also https://www.w3.org/TR/rdfa-in-html/#document-conformance |
| 3213 |
@since 1.16 |
| 3214 |
EditSubmitButtonLabelPublish: |
| 3215 |
default: false |
| 3216 |
description: |- |
| 3217 |
Whether to label the store-to-database-and-show-to-others button in the editor |
| 3218 |
as "Save page"/"Save changes" if false (the default) or, if true, instead as |
| 3219 |
"Publish page"/"Publish changes". |
| 3220 |
@since 1.28 |
| 3221 |
XhtmlNamespaces: |
| 3222 |
default: { } |
| 3223 |
type: object |
| 3224 |
description: |- |
| 3225 |
Permit other namespaces in addition to the w3.org default. |
| 3226 |
Use the prefix for the key and the namespace for the value. |
| 3227 |
**Example:** |
| 3228 |
``` |
| 3229 |
$wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg'; |
| 3230 |
``` |
| 3231 |
Normally we wouldn't have to define this in the root "<html>" |
| 3232 |
element, but IE needs it there in some circumstances. |
| 3233 |
This is ignored if $wgMimeType is set to a non-XML MIME type. |
| 3234 |
SiteNotice: |
| 3235 |
default: '' |
| 3236 |
description: |- |
| 3237 |
Site notice shown at the top of each page |
| 3238 |
MediaWiki:Sitenotice page, which will override this. You can also |
| 3239 |
provide a separate message for logged-out users using the |
| 3240 |
MediaWiki:Anonnotice page. |
| 3241 |
BrowserFormatDetection: |
| 3242 |
default: telephone=no |
| 3243 |
type: string |
| 3244 |
description: |- |
| 3245 |
Override the ability of certain browsers to attempt to autodetect dataformats in pages. |
| 3246 |
This is a default feature of many mobile browsers, but can have a lot of false positives, |
| 3247 |
where for instance, year ranges are confused with phone numbers. |
| 3248 |
The default of this setting is to disable telephone number data detection. |
| 3249 |
Set BrowserFormatDetection to false to fallback to the browser defaults. |
| 3250 |
@since 1.37 |
| 3251 |
@see https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html |
| 3252 |
SkinMetaTags: |
| 3253 |
default: { } |
| 3254 |
type: object |
| 3255 |
description: |- |
| 3256 |
An array of open graph tags which should be added by all skins. |
| 3257 |
Accepted values are "og:site_name", "og:title", "og:type" and "twitter:card". |
| 3258 |
Since some of these fields can be provided by extensions it defaults to an empty array. |
| 3259 |
@since 1.36 |
| 3260 |
DefaultSkin: |
| 3261 |
default: vector-2022 |
| 3262 |
description: |- |
| 3263 |
Default skin, for new users and anonymous visitors. Registered users may |
| 3264 |
change this to any one of the other available skins in their preferences. |
| 3265 |
FallbackSkin: |
| 3266 |
default: fallback |
| 3267 |
description: |- |
| 3268 |
Fallback skin used when the skin defined by $wgDefaultSkin can't be found. |
| 3269 |
@since 1.24 |
| 3270 |
SkipSkins: |
| 3271 |
default: { } |
| 3272 |
type: object |
| 3273 |
description: |- |
| 3274 |
Specify the names of skins that should not be presented in the list of |
| 3275 |
available skins in user preferences. |
| 3276 |
NOTE: This does not uninstall the skin, and it will still be accessible |
| 3277 |
via the `useskin` query parameter. To uninstall a skin, remove its inclusion |
| 3278 |
from LocalSettings.php. |
| 3279 |
@see \SkinFactory::getAllowedSkins |
| 3280 |
DisableOutputCompression: |
| 3281 |
default: false |
| 3282 |
description: 'Disable output compression (enabled by default if zlib is available)' |
| 3283 |
FragmentMode: |
| 3284 |
default: |
| 3285 |
- html5 |
| 3286 |
- legacy |
| 3287 |
type: array |
| 3288 |
description: |- |
| 3289 |
How should section IDs be encoded? |
| 3290 |
This array can contain 1 or 2 elements, each of them can be one of: |
| 3291 |
- 'html5' is modern HTML5 style encoding with minimal escaping. Displays Unicode |
| 3292 |
characters in most browsers' address bars. |
| 3293 |
- 'legacy' is old MediaWiki-style encoding, e.g. 啤酒 turns into .E5.95.A4.E9.85.92 |
| 3294 |
The first element of this array specifies the primary mode of escaping IDs. This |
| 3295 |
is what users will see when they e.g. follow an [[#internal link]] to a section of |
| 3296 |
a page. |
| 3297 |
The optional second element defines a fallback mode, useful for migrations. |
| 3298 |
If present, it will direct MediaWiki to add empty <span>s to every section with its |
| 3299 |
id attribute set to fallback encoded title so that links using the previous encoding |
| 3300 |
would still work. |
| 3301 |
Example: you want to migrate your wiki from 'legacy' to 'html5' |
| 3302 |
On the first step, set this variable to [ 'legacy', 'html5' ]. After a while, when |
| 3303 |
all caches (parser, HTTP, etc.) contain only pages generated with this setting, |
| 3304 |
flip the value to [ 'html5', 'legacy' ]. This will result in all internal links being |
| 3305 |
generated in the new encoding while old links (both external and cached internal) will |
| 3306 |
still work. After a long time, you might want to ditch backwards compatibility and |
| 3307 |
set it to [ 'html5' ]. After all, pages get edited, breaking incoming links no matter which |
| 3308 |
fragment mode is used. |
| 3309 |
@since 1.30 |
| 3310 |
ExternalInterwikiFragmentMode: |
| 3311 |
default: legacy |
| 3312 |
description: |- |
| 3313 |
Which ID escaping mode should be used for external interwiki links? See documentation |
| 3314 |
for $wgFragmentMode above for details of each mode. Because you can't control external sites, |
| 3315 |
this setting should probably always be 'legacy', unless every wiki you link to has converted |
| 3316 |
to 'html5'. |
| 3317 |
@since 1.30 |
| 3318 |
FooterIcons: |
| 3319 |
default: |
| 3320 |
copyright: { copyright: [] } |
| 3321 |
poweredby: { mediawiki: { src: null, url: 'https://www.mediawiki.org/', alt: 'Powered by MediaWiki' } } |
| 3322 |
type: object |
| 3323 |
description: |- |
| 3324 |
Abstract list of footer icons for skins in place of old copyrightico and poweredbyico code |
| 3325 |
You can add new icons to the built in copyright or poweredby, or you can create |
| 3326 |
a new block. Though note that you may need to add some custom css to get good styling |
| 3327 |
of new blocks in monobook. vector and modern should work without any special css. |
| 3328 |
$wgFooterIcons itself is a key/value array. |
| 3329 |
The key is the name of a block that the icons will be wrapped in. The final id varies |
| 3330 |
by skin; Monobook and Vector will turn poweredby into f-poweredbyico while Modern |
| 3331 |
turns it into mw_poweredby. |
| 3332 |
The value is either key/value array of icons or a string. |
| 3333 |
In the key/value array the key may or may not be used by the skin but it can |
| 3334 |
be used to find the icon and unset it or change the icon if needed. |
| 3335 |
This is useful for disabling icons that are set by extensions. |
| 3336 |
The value should be either a string or an array. If it is a string it will be output |
| 3337 |
directly as html, however some skins may choose to ignore it. An array is the preferred |
| 3338 |
format for the icon, the following keys are used: |
| 3339 |
- src: An absolute url to the image to use for the icon, this is recommended |
| 3340 |
but not required, however some skins will ignore icons without an image |
| 3341 |
- srcset: optional additional-resolution images; see HTML5 specs |
| 3342 |
- url: The url to use in the a element around the text or icon, if not set an a element will |
| 3343 |
not be outputted |
| 3344 |
- alt: This is the text form of the icon, it will be displayed without an image in |
| 3345 |
skins like Modern or if src is not set, and will otherwise be used as |
| 3346 |
the alt="" for the image. This key is required. |
| 3347 |
- width and height: If the icon specified by src is not of the standard size |
| 3348 |
you can specify the size of image to use with these keys. |
| 3349 |
Otherwise they will default to the standard 88x31. |
| 3350 |
@todo Reformat documentation. |
| 3351 |
UseCombinedLoginLink: |
| 3352 |
default: false |
| 3353 |
description: |- |
| 3354 |
Login / create account link behavior when it's possible for anonymous users |
| 3355 |
to create an account. |
| 3356 |
- true = use a combined login / create account link |
| 3357 |
- false = split login and create account into two separate links |
| 3358 |
Edititis: |
| 3359 |
default: false |
| 3360 |
description: 'Display user edit counts in various prominent places.' |
| 3361 |
Send404Code: |
| 3362 |
default: true |
| 3363 |
description: |- |
| 3364 |
Some web hosts attempt to rewrite all responses with a 404 (not found) |
| 3365 |
status code, mangling or hiding MediaWiki's output. If you are using such a |
| 3366 |
host, you should start looking for a better one. While you're doing that, |
| 3367 |
set this to false to convert some of MediaWiki's 404 responses to 200 so |
| 3368 |
that the generated error pages can be seen. |
| 3369 |
In cases where for technical reasons it is more important for MediaWiki to |
| 3370 |
send the correct status code than for the body to be transmitted intact, |
| 3371 |
this configuration variable is ignored. |
| 3372 |
ShowRollbackEditCount: |
| 3373 |
default: 10 |
| 3374 |
description: |- |
| 3375 |
The $wgShowRollbackEditCount variable is used to show how many edits can be rolled back. |
| 3376 |
The numeric value of the variable controls how many edits MediaWiki will look back to |
| 3377 |
determine whether a rollback is allowed (by checking that they are all from the same author). |
| 3378 |
If the value is false or 0, the edits are not counted. Disabling this will prevent MediaWiki |
| 3379 |
from hiding some useless rollback links. |
| 3380 |
@since 1.20 |
| 3381 |
EnableCanonicalServerLink: |
| 3382 |
default: false |
| 3383 |
description: |- |
| 3384 |
Output a <link rel="canonical"> tag on every page indicating the canonical |
| 3385 |
server which should be used, i.e. $wgServer or $wgCanonicalServer. Since |
| 3386 |
detection of the current server is unreliable, the link is sent |
| 3387 |
unconditionally. |
| 3388 |
InterwikiLogoOverride: |
| 3389 |
default: [] |
| 3390 |
type: array |
| 3391 |
items: |
| 3392 |
type: string |
| 3393 |
description: |- |
| 3394 |
List of interwiki logos overrides. |
| 3395 |
This is used by the sister project sidebar. This list accept a key equal to the |
| 3396 |
interwiki ID (as defined in the interwiki links), and accept a Codex icon name |
| 3397 |
(https://doc.wikimedia.org/codex/latest/icons/all-icons.html) or a base URL for |
| 3398 |
the given interwiki. |
| 3399 |
Example : |
| 3400 |
$wgInterwikiLogoOverride = [ |
| 3401 |
'c' => 'logoWikimediaCommons', |
| 3402 |
'wikit' => 'https://mySpecialWiki.com' |
| 3403 |
]; |
| 3404 |
ResourceModules: |
| 3405 |
default: { } |
| 3406 |
type: object |
| 3407 |
description: |- |
| 3408 |
Define extra client-side modules to be registered with ResourceLoader. |
| 3409 |
@note It is recommended to define modules using the `ResourceModule` attribute |
| 3410 |
in `extension.json` or `skin.json` when possible (instead of via PHP global variables). |
| 3411 |
Registration is internally handled by ResourceLoader::register. |
| 3412 |
## Available modules |
| 3413 |
Modules that ship with %MediaWiki core are registered via |
| 3414 |
resources/Resources.php. For a full list with documentation, see: |
| 3415 |
[ResourceLoader/Core_modules](https://www.mediawiki.org/wiki/ResourceLoader/Core_modules). |
| 3416 |
## Options |
| 3417 |
- class `{string}`: |
| 3418 |
By default a module is assumed to bundle file resources |
| 3419 |
as handled by the MediaWiki\ResourceLoader\FileModule class. Use this option |
| 3420 |
to use a different implementation of MediaWiki\ResourceLoader\Module instead. |
| 3421 |
Default: `\MediaWiki\ResourceLoader\FileModule` |
| 3422 |
- factory `{string}`: |
| 3423 |
Override the instantiation of the MediaWiki\ResourceLoader\Module |
| 3424 |
class using a PHP callback. This allows dependency injection to be used. |
| 3425 |
This option cannot be combined with the `class` option. |
| 3426 |
Since: MW 1.30 |
| 3427 |
- dependencies `{string[]|string}`: |
| 3428 |
Modules that must be executed before this module. |
| 3429 |
Module name string or list of module name strings. |
| 3430 |
Default: `[]` |
| 3431 |
- deprecated `{boolean|string}`: |
| 3432 |
Whether the module is deprecated and usage is discouraged. |
| 3433 |
Set to boolean true, or a string to include in the warning message. |
| 3434 |
Default: `false` |
| 3435 |
- group `{string}`: |
| 3436 |
Optional request group to override which modules may be downloaded |
| 3437 |
together in an HTTP batch request. By default, any two modules may be |
| 3438 |
loaded together in the same batch request. Set this option to a |
| 3439 |
descriptive string to give the module its own HTTP request. To allow |
| 3440 |
other modules to join this new request, give those the same request group. |
| 3441 |
Use this option with caution. The default behaviour is well-tuned already, |
| 3442 |
and setting this often does more harm than good. For more about request |
| 3443 |
balancing optimisations, see |
| 3444 |
[ResourceLoader/Architecture#Balance](https://www.mediawiki.org/wiki/ResourceLoader/Architecture#Balance). |
| 3445 |
- skipFunction `{string}`: |
| 3446 |
Allow this module to be satisfied as dependency without actually loading |
| 3447 |
or executing scripts from the server, if the specified JavaScript function |
| 3448 |
returns true. |
| 3449 |
Use this to provide polyfills that are natively available in newer browsers. |
| 3450 |
Specify the relative path to a JavaScript file containing a top-level return |
| 3451 |
statement. The contents of the file should not contain any wrapping function, |
| 3452 |
it will be wrapped by %ResourceLoader in an anonymous function and invoked |
| 3453 |
when the module is considered for loading. |
| 3454 |
## FileModule options |
| 3455 |
- localBasePath `{string}`: |
| 3456 |
Base file path to prepend to relative file paths specified in other options. |
| 3457 |
Default: `$IP` |
| 3458 |
- remoteBasePath `{string}`: |
| 3459 |
Base URL path to prepend to relative file paths specified in other options. |
| 3460 |
This is used to form URLs for files, such as when referencing images in |
| 3461 |
stylesheets, or in debug mode to serve JavaScript files directly. |
| 3462 |
Default: @ref $wgResourceBasePath (which defaults to @ref $wgScriptPath) |
| 3463 |
- remoteExtPath `{string}`: |
| 3464 |
Shortcut for `remoteBasePath` that is relative to $wgExtensionAssetsPath. |
| 3465 |
Use this when defining modules from an extension, so as to avoid hardcoding |
| 3466 |
the script path of the %MediaWiki install or the location of the extensions |
| 3467 |
directory. |
| 3468 |
This option is mutually exclusive with `remoteBasePath`. |
| 3469 |
- styles `{string[]|string|array<string,array>}`: |
| 3470 |
Styles to always include in the module. |
| 3471 |
%File path or list of file paths, relative to `localBasePath`. |
| 3472 |
The stylesheet can be automatically wrapped in a `@media` query by specifying |
| 3473 |
the file path as the key in an object (instead of the value), with the value |
| 3474 |
specifying a `media` query. |
| 3475 |
See @ref wgResourceModules-example-stylesheet "Stylesheet examples" below. |
| 3476 |
See also @ref $wgResourceModuleSkinStyles. |
| 3477 |
Extended options: |
| 3478 |
- skinStyles `{string[]|string}`: Styles to include in specific skin contexts. |
| 3479 |
Array keyed is by skin name with file path or list of file paths as value, |
| 3480 |
relative to `localBasePath`. |
| 3481 |
Default: `[]` |
| 3482 |
- noflip `{boolean}`: |
| 3483 |
By default, CSSJanus will be used automatically to perform LTR-to-RTL flipping |
| 3484 |
when loaded in a right-to-left (RTL) interface language context. |
| 3485 |
Use this option to skip CSSJanus LTR-to-RTL flipping for this module, for example |
| 3486 |
when registering an external library that already handles RTL styles. |
| 3487 |
Default: `false` |
| 3488 |
- packageFiles `{string[]|array[]}` |
| 3489 |
Specify script files and (virtual) data files to include in the module. |
| 3490 |
Each internal JavaScript file retains its own local module scope and its |
| 3491 |
private exports can be accessed separately by other client-side code in the |
| 3492 |
same module, via the local `require()` function. |
| 3493 |
Modules that use package files should export any public API methods using |
| 3494 |
`module.exports`. |
| 3495 |
See examples at |
| 3496 |
[ResourceLoader/Package_files](https://www.mediawiki.org/wiki/ResourceLoader/Package_files) |
| 3497 |
on mediawiki.org. |
| 3498 |
The `packageFiles` feature cannot be combined with legacy scripts that use |
| 3499 |
the `scripts` option, including its extended variants `languageScripts`, |
| 3500 |
`skinScripts`, and `debugScripts`. |
| 3501 |
Since: MW 1.33 |
| 3502 |
Default: `[]` |
| 3503 |
- scripts `{string[]|string|array[]}`: |
| 3504 |
Scripts to always include in the module. |
| 3505 |
%File path or list of file paths, relative to `localBasePath`. |
| 3506 |
These files are concatenated blindly and executed as a single client-side script. |
| 3507 |
Modules using this option are sometimes referred to as "legacy scripts" to |
| 3508 |
distinguish them from those that use the `packageFiles` option. |
| 3509 |
Modules that use legacy scripts usually attach any public APIs they have |
| 3510 |
to the `mw` global variable. If a module contains just one file, it is also |
| 3511 |
supported to use the newer `module.exports` mechanism, though if the module |
| 3512 |
contains more than one legacy script, it is considered unsafe and unsupported |
| 3513 |
to use this mechanism (use `packageFiles` instead). See also |
| 3514 |
[Coding |
| 3515 |
conventions/JavaScript](https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Exporting). |
| 3516 |
Since MW 1.41, an element of `scripts` may be an array in the same format as |
| 3517 |
packageFiles, giving a callback to call for content generation. |
| 3518 |
Default: `[]` |
| 3519 |
Extended options, concatenated in this order: |
| 3520 |
- languageScripts `{string[]|string|array[]}`: Scripts to include in specific |
| 3521 |
language contexts. Array is keyed by language code with file path or list of |
| 3522 |
file path. |
| 3523 |
- skinScripts `{string[]|string|array[]}`: Scripts to include in specific skin contexts. |
| 3524 |
Array keyed is by skin name with file path or list of file paths. |
| 3525 |
- debugScripts `{string[]|string|array[]}`: Scripts to include in debug contexts. |
| 3526 |
%File path or list of file paths. |
| 3527 |
- messages `{string[]}` |
| 3528 |
Localisation messages to bundle with this module, for client-side use |
| 3529 |
via `mw.msg()` and `mw.message()`. List of message keys. |
| 3530 |
Default: `[]` |
| 3531 |
- templates `{string[]}` |
| 3532 |
List of template files to be loaded for client-side usage via `mw.templates`. |
| 3533 |
Default: `[]` |
| 3534 |
- es6 `{boolean}`: |
| 3535 |
Since: MW 1.36; ignored since MW 1.41. |
| 3536 |
Default: `true` |
| 3537 |
- skipStructureTest `{boolean}`: |
| 3538 |
Whether to skip ResourcesTest::testRespond(). Since MW 1.42. |
| 3539 |
Default: `false`. |
| 3540 |
## Examples |
| 3541 |
**Example: Using an alternate subclass** |
| 3542 |
``` |
| 3543 |
$wgResourceModules['ext.myExtension'] = [ |
| 3544 |
'class' => \MediaWiki\ResourceLoader\WikiModule::class, |
| 3545 |
]; |
| 3546 |
``` |
| 3547 |
**Example: Deprecated module** |
| 3548 |
``` |
| 3549 |
$wgResourceModules['ext.myExtension'] = [ |
| 3550 |
'deprecated' => 'You should use ext.myExtension2 instead', |
| 3551 |
]; |
| 3552 |
``` |
| 3553 |
**Example: Base paths in extension.json** |
| 3554 |
``` |
| 3555 |
"ext.myExtension": { |
| 3556 |
"localBasePath": "modules/ext.MyExtension", |
| 3557 |
"remoteExtPath": "MyExtension/modules/ext.MyExtension" |
| 3558 |
} |
| 3559 |
``` |
| 3560 |
**Example: Base paths in core with PHP** |
| 3561 |
``` |
| 3562 |
$wgResourceModules['mediawiki.example'] = [ |
| 3563 |
'localBasePath' => "$IP/resources/src/mediawiki.example", |
| 3564 |
'remoteBasePath' => "$wgResourceBasePath/resources/src/mediawiki.example", |
| 3565 |
]; |
| 3566 |
``` |
| 3567 |
**Example: Define a skip function** |
| 3568 |
``` |
| 3569 |
$wgResourceModules['ext.myExtension.SomeWebAPI'] = [ |
| 3570 |
'skipFunction' => 'skip-SomeWebAPI.js', |
| 3571 |
]; |
| 3572 |
``` |
| 3573 |
**Example: Contents of skip function file** |
| 3574 |
``` |
| 3575 |
return typeof SomeWebAPI === 'function' && SomeWebAPI.prototype.duckMethod; |
| 3576 |
``` |
| 3577 |
@anchor wgResourceModules-example-stylesheet |
| 3578 |
**Example: Stylesheets** |
| 3579 |
``` |
| 3580 |
$wgResourceModules['example'] = [ |
| 3581 |
'styles' => [ |
| 3582 |
'foo.css', |
| 3583 |
'bar.css', |
| 3584 |
], |
| 3585 |
]; |
| 3586 |
$wgResourceModules['example.media'] = [ |
| 3587 |
'styles' => [ |
| 3588 |
'foo.css' => [ 'media' => 'print' ], |
| 3589 |
]; |
| 3590 |
$wgResourceModules['example.mixed'] = [ |
| 3591 |
'styles' => [ |
| 3592 |
'foo.css', |
| 3593 |
'bar.css' => [ 'media' => 'print' ], |
| 3594 |
], |
| 3595 |
]; |
| 3596 |
``` |
| 3597 |
**Example: Package files** |
| 3598 |
``` |
| 3599 |
"ext.myExtension": { |
| 3600 |
"localBasePath": "modules/ext.MyExtension", |
| 3601 |
"remoteExtPath": "MyExtension/modules/ext.MyExtension", |
| 3602 |
"packageFiles": [ |
| 3603 |
"index.js", |
| 3604 |
"utils.js", |
| 3605 |
"data.json" |
| 3606 |
] |
| 3607 |
} |
| 3608 |
} |
| 3609 |
``` |
| 3610 |
**Example: Legacy scripts** |
| 3611 |
``` |
| 3612 |
$wgResourceModules['ext.myExtension'] = [ |
| 3613 |
'scripts' => [ |
| 3614 |
'modules/ext.myExtension/utils.js', |
| 3615 |
'modules/ext.myExtension/myExtension.js', |
| 3616 |
], |
| 3617 |
'languageScripts' => [ |
| 3618 |
'bs' => 'modules/ext.myExtension/languages/bs.js', |
| 3619 |
'fi' => 'modules/ext.myExtension/languages/fi.js', |
| 3620 |
], |
| 3621 |
'skinScripts' => [ |
| 3622 |
'default' => 'modules/ext.myExtension/skin-default.js', |
| 3623 |
], |
| 3624 |
'debugScripts' => [ |
| 3625 |
'modules/ext.myExtension/debug.js', |
| 3626 |
], |
| 3627 |
]; |
| 3628 |
``` |
| 3629 |
**Example: Template files** |
| 3630 |
``` |
| 3631 |
$wgResourceModules['ext.myExtension'] = [ |
| 3632 |
'templates' => [ |
| 3633 |
'templates/template.html', |
| 3634 |
'templates/template2.html', |
| 3635 |
], |
| 3636 |
]; |
| 3637 |
``` |
| 3638 |
@since 1.17 |
| 3639 |
ResourceModuleSkinStyles: |
| 3640 |
default: { } |
| 3641 |
type: object |
| 3642 |
description: |- |
| 3643 |
Add extra skin-specific styles to a resource module. |
| 3644 |
These are automatically added by ResourceLoader to the 'skinStyles' list of |
| 3645 |
the existing module. The 'styles' list cannot be modified or disabled. |
| 3646 |
For example, below a module "bar" is defined and skin Foo provides additional |
| 3647 |
styles for it: |
| 3648 |
**Example:** |
| 3649 |
``` |
| 3650 |
$wgResourceModules['bar'] = [ |
| 3651 |
'scripts' => 'resources/bar/bar.js', |
| 3652 |
'styles' => 'resources/bar/main.css', |
| 3653 |
]; |
| 3654 |
$wgResourceModuleSkinStyles['foo'] = [ |
| 3655 |
'bar' => 'skins/Foo/bar.css', |
| 3656 |
]; |
| 3657 |
``` |
| 3658 |
This is effectively equivalent to: |
| 3659 |
**Equivalent:** |
| 3660 |
``` |
| 3661 |
$wgResourceModules['bar'] = [ |
| 3662 |
'scripts' => 'resources/bar/bar.js', |
| 3663 |
'styles' => 'resources/bar/main.css', |
| 3664 |
'skinStyles' => [ |
| 3665 |
'foo' => skins/Foo/bar.css', |
| 3666 |
], |
| 3667 |
]; |
| 3668 |
``` |
| 3669 |
If the module already defines its own entry in `skinStyles` for a given skin, then |
| 3670 |
$wgResourceModuleSkinStyles is ignored. |
| 3671 |
If a module defines a `skinStyles['default']` the skin may want to extend that instead |
| 3672 |
of replacing it. This can be done using the `+` prefix. |
| 3673 |
**Example:** |
| 3674 |
``` |
| 3675 |
$wgResourceModules['bar'] = [ |
| 3676 |
'scripts' => 'resources/bar/bar.js', |
| 3677 |
'styles' => 'resources/bar/basic.css', |
| 3678 |
'skinStyles' => [ |
| 3679 |
'default' => 'resources/bar/additional.css', |
| 3680 |
], |
| 3681 |
]; |
| 3682 |
// Note the '+' character: |
| 3683 |
$wgResourceModuleSkinStyles['foo'] = [ |
| 3684 |
'+bar' => 'skins/Foo/bar.css', |
| 3685 |
]; |
| 3686 |
``` |
| 3687 |
This is effectively equivalent to: |
| 3688 |
**Equivalent:** |
| 3689 |
``` |
| 3690 |
$wgResourceModules['bar'] = [ |
| 3691 |
'scripts' => 'resources/bar/bar.js', |
| 3692 |
'styles' => 'resources/bar/basic.css', |
| 3693 |
'skinStyles' => [ |
| 3694 |
'default' => 'resources/bar/additional.css', |
| 3695 |
'foo' => [ |
| 3696 |
'resources/bar/additional.css', |
| 3697 |
'skins/Foo/bar.css', |
| 3698 |
], |
| 3699 |
], |
| 3700 |
]; |
| 3701 |
``` |
| 3702 |
In other words, as a module author, use the `styles` list for stylesheets that may not be |
| 3703 |
disabled by a skin. To provide default styles that may be extended or replaced, |
| 3704 |
use `skinStyles['default']`. |
| 3705 |
As with $wgResourceModules, always set the localBasePath and remoteBasePath |
| 3706 |
keys (or one of remoteExtPath/remoteSkinPath). |
| 3707 |
**Example:** |
| 3708 |
``` |
| 3709 |
$wgResourceModuleSkinStyles['foo'] = [ |
| 3710 |
'bar' => 'bar.css', |
| 3711 |
'quux' => 'quux.css', |
| 3712 |
'remoteSkinPath' => 'Foo', |
| 3713 |
'localBasePath' => __DIR__, |
| 3714 |
]; |
| 3715 |
``` |
| 3716 |
ResourceLoaderSources: |
| 3717 |
default: { } |
| 3718 |
type: object |
| 3719 |
description: |- |
| 3720 |
Extensions should register foreign module sources here. 'local' is a |
| 3721 |
built-in source that is not in this array, but defined by |
| 3722 |
ResourceLoader::__construct() so that it cannot be unset. |
| 3723 |
**Example:** |
| 3724 |
``` |
| 3725 |
$wgResourceLoaderSources['foo'] = 'http://example.org/w/load.php'; |
| 3726 |
``` |
| 3727 |
ResourceBasePath: |
| 3728 |
default: null |
| 3729 |
dynamicDefault: |
| 3730 |
use: [ScriptPath] |
| 3731 |
callback: [MediaWiki\MainConfigSchema, getDefaultResourceBasePath] |
| 3732 |
description: |- |
| 3733 |
The default 'remoteBasePath' value for instances of MediaWiki\ResourceLoader\FileModule. |
| 3734 |
Defaults to $wgScriptPath. |
| 3735 |
ResourceLoaderMaxage: |
| 3736 |
default: { } |
| 3737 |
type: object |
| 3738 |
description: |- |
| 3739 |
Override how long a CDN or browser may cache a ResourceLoader HTTP response. |
| 3740 |
Maximum time in seconds. Used for the `max-age` and `s-maxage` Cache-Control headers. |
| 3741 |
Valid keys: |
| 3742 |
- versioned |
| 3743 |
- unversioned |
| 3744 |
@see \MediaWiki\ResourceLoader\ResourceLoader::__construct |
| 3745 |
@since 1.35 |
| 3746 |
ResourceLoaderUseObjectCacheForDeps: |
| 3747 |
default: true |
| 3748 |
description: |- |
| 3749 |
Use the main stash instead of the module_deps table for indirect dependency tracking |
| 3750 |
@deprecated since 1.43; This will be removed in 1.44 |
| 3751 |
@since 1.35 |
| 3752 |
ResourceLoaderDebug: |
| 3753 |
default: false |
| 3754 |
description: |- |
| 3755 |
The default debug mode (on/off) for of ResourceLoader requests. |
| 3756 |
This will still be overridden when the debug URL parameter is used. |
| 3757 |
ResourceLoaderMaxQueryLength: |
| 3758 |
default: false |
| 3759 |
type: |
| 3760 |
- integer |
| 3761 |
- boolean |
| 3762 |
description: |- |
| 3763 |
ResourceLoader will not generate URLs whose query string is more than |
| 3764 |
this many characters long, and will instead use multiple requests with |
| 3765 |
shorter query strings. Using multiple requests may degrade performance, |
| 3766 |
but may be needed based on the query string limit supported by your web |
| 3767 |
server and/or your user's web browsers. |
| 3768 |
Default: `2000`. |
| 3769 |
@see \MediaWiki\ResourceLoader\StartUpModule::getMaxQueryLength |
| 3770 |
@since 1.17 |
| 3771 |
ResourceLoaderValidateJS: |
| 3772 |
default: true |
| 3773 |
description: |- |
| 3774 |
Validate JavaScript code loaded from wiki pages. |
| 3775 |
If a syntax error is found, the script is replaced with a warning |
| 3776 |
logged to the browser console. This ensures errors are found early and |
| 3777 |
consistently (independent of the editor's own browser), and prevents |
| 3778 |
breaking other modules loaded in the same batch from load.php. |
| 3779 |
@see \MediaWiki\ResourceLoader\Module::validateScriptFile |
| 3780 |
ResourceLoaderEnableJSProfiler: |
| 3781 |
default: false |
| 3782 |
description: |- |
| 3783 |
When enabled, execution of JavaScript modules is profiled client-side. |
| 3784 |
Instrumentation happens in mw.loader.profiler. |
| 3785 |
Use `mw.inspect('time')` from the browser console to display the data. |
| 3786 |
@since 1.32 |
| 3787 |
ResourceLoaderStorageEnabled: |
| 3788 |
default: true |
| 3789 |
description: |- |
| 3790 |
Whether ResourceLoader should attempt to persist modules in localStorage on |
| 3791 |
browsers that support the Web Storage API. |
| 3792 |
ResourceLoaderStorageVersion: |
| 3793 |
default: 1 |
| 3794 |
description: |- |
| 3795 |
Cache version for client-side ResourceLoader module storage. You can trigger |
| 3796 |
invalidation of the contents of the module store by incrementing this value. |
| 3797 |
@since 1.23 |
| 3798 |
ResourceLoaderEnableSourceMapLinks: |
| 3799 |
default: true |
| 3800 |
description: |- |
| 3801 |
Whether to include a SourceMap header in ResourceLoader responses |
| 3802 |
for JavaScript modules. |
| 3803 |
@since 1.41 |
| 3804 |
AllowSiteCSSOnRestrictedPages: |
| 3805 |
default: false |
| 3806 |
description: |- |
| 3807 |
Whether to allow site-wide CSS (MediaWiki:Common.css and friends) on |
| 3808 |
restricted pages like Special:UserLogin or Special:Preferences where |
| 3809 |
JavaScript is disabled for security reasons. As it is possible to |
| 3810 |
execute JavaScript through CSS, setting this to true opens up a |
| 3811 |
potential security hole. Some sites may "skin" their wiki by using |
| 3812 |
site-wide CSS, causing restricted pages to look unstyled and different |
| 3813 |
from the rest of the site. |
| 3814 |
@since 1.25 |
| 3815 |
VueDevelopmentMode: |
| 3816 |
default: false |
| 3817 |
description: |- |
| 3818 |
Whether to use the development version of Vue.js. This should be disabled |
| 3819 |
for production installations. For development installations, enabling this |
| 3820 |
provides useful additional warnings and checks. |
| 3821 |
Even when this is disabled, using ResourceLoader's debug mode (?debug=true) |
| 3822 |
will cause the development version to be loaded. |
| 3823 |
@since 1.35 |
| 3824 |
CodexDevelopmentDir: |
| 3825 |
default: null |
| 3826 |
description: |- |
| 3827 |
If this is set, MediaWiki will look for Codex files in this directory |
| 3828 |
instead of in resources/lib/codex/ and friends. |
| 3829 |
To use a local development version of Codex, set this to the full file |
| 3830 |
path of the root directory of a local clone of the Codex repository, and |
| 3831 |
run `npm run build-all` in the Codex root directory. Rerun this command |
| 3832 |
after making any changes. |
| 3833 |
This should be disabled for production installations. |
| 3834 |
@since 1.43 |
| 3835 |
MetaNamespace: |
| 3836 |
default: false |
| 3837 |
dynamicDefault: |
| 3838 |
use: [Sitename] |
| 3839 |
callback: [MediaWiki\MainConfigSchema, getDefaultMetaNamespace] |
| 3840 |
description: |- |
| 3841 |
Name of the project namespace. If left set to false, $wgSitename will be |
| 3842 |
used instead. |
| 3843 |
MetaNamespaceTalk: |
| 3844 |
default: false |
| 3845 |
description: |- |
| 3846 |
Name of the project talk namespace. |
| 3847 |
Normally you can ignore this and it will be something like |
| 3848 |
$wgMetaNamespace . "_talk". In some languages, you may want to set this |
| 3849 |
manually for grammatical reasons. |
| 3850 |
CanonicalNamespaceNames: |
| 3851 |
default: |
| 3852 |
-2: Media |
| 3853 |
-1: Special |
| 3854 |
0: '' |
| 3855 |
1: Talk |
| 3856 |
2: User |
| 3857 |
3: User_talk |
| 3858 |
4: Project |
| 3859 |
5: Project_talk |
| 3860 |
6: File |
| 3861 |
7: File_talk |
| 3862 |
8: MediaWiki |
| 3863 |
9: MediaWiki_talk |
| 3864 |
10: Template |
| 3865 |
11: Template_talk |
| 3866 |
12: Help |
| 3867 |
13: Help_talk |
| 3868 |
14: Category |
| 3869 |
15: Category_talk |
| 3870 |
type: object |
| 3871 |
description: |- |
| 3872 |
Canonical namespace names. |
| 3873 |
Must not be changed directly in configuration or by extensions, use $wgExtraNamespaces |
| 3874 |
instead. |
| 3875 |
ExtraNamespaces: |
| 3876 |
default: { } |
| 3877 |
type: object |
| 3878 |
description: |- |
| 3879 |
Additional namespaces. If the namespaces defined in Language.php and |
| 3880 |
Namespace.php are insufficient, you can create new ones here, for example, |
| 3881 |
to import Help files in other languages. You can also override the namespace |
| 3882 |
names of existing namespaces. Extensions should use the CanonicalNamespaces |
| 3883 |
hook or extension.json. |
| 3884 |
@warning Once you delete a namespace, the pages in that namespace will |
| 3885 |
no longer be accessible. If you rename it, then you can access them through |
| 3886 |
the new namespace name. |
| 3887 |
Custom namespaces should start at 100 to avoid conflicting with standard |
| 3888 |
namespaces, and should always follow the even/odd main/talk pattern. |
| 3889 |
**Example:** |
| 3890 |
``` |
| 3891 |
$wgExtraNamespaces = [ |
| 3892 |
100 => "Hilfe", |
| 3893 |
101 => "Hilfe_Diskussion", |
| 3894 |
102 => "Aide", |
| 3895 |
103 => "Discussion_Aide" |
| 3896 |
]; |
| 3897 |
``` |
| 3898 |
@todo Add a note about maintenance/namespaceDupes.php |
| 3899 |
ExtraGenderNamespaces: |
| 3900 |
default: { } |
| 3901 |
type: object |
| 3902 |
description: |- |
| 3903 |
Same as above, but for namespaces with gender distinction. |
| 3904 |
Note: the default form for the namespace should also be set |
| 3905 |
using $wgExtraNamespaces for the same index. |
| 3906 |
@since 1.18 |
| 3907 |
NamespaceAliases: |
| 3908 |
default: { } |
| 3909 |
type: object |
| 3910 |
description: |- |
| 3911 |
Define extra namespace aliases. |
| 3912 |
These are alternate names for the primary localised namespace names, which |
| 3913 |
are defined by $wgExtraNamespaces and the language file. If a page is |
| 3914 |
requested with such a prefix, the request will be redirected to the primary |
| 3915 |
name. |
| 3916 |
Set this to a map from namespace names to IDs. |
| 3917 |
**Example:** |
| 3918 |
``` |
| 3919 |
$wgNamespaceAliases = [ |
| 3920 |
'Wikipedian' => NS_USER, |
| 3921 |
'Help' => 100, |
| 3922 |
]; |
| 3923 |
``` |
| 3924 |
@see \MediaWiki\Language\Language::getNamespaceAliases for accessing the full list of aliases, |
| 3925 |
including those defined by other means. |
| 3926 |
LegalTitleChars: |
| 3927 |
default: ' %!"$&''()*,\-.\/0-9:;=?@A-Z\\^_`a-z~\x80-\xFF+' |
| 3928 |
deprecated: 'since 1.41; use Extension:TitleBlacklist to customize' |
| 3929 |
description: |- |
| 3930 |
Allowed title characters -- regex character class |
| 3931 |
Don't change this unless you know what you're doing |
| 3932 |
Problematic punctuation: |
| 3933 |
- []}|# Are needed for link syntax, never enable these |
| 3934 |
- <> Causes problems with HTML escaping, don't use |
| 3935 |
- % Enabled by default, minor problems with path to query rewrite rules, see below |
| 3936 |
- + Enabled by default, but doesn't work with path to query rewrite rules, |
| 3937 |
corrupted by apache |
| 3938 |
- ? Enabled by default, but doesn't work with path to PATH_INFO rewrites |
| 3939 |
All three of these punctuation problems can be avoided by using an alias, |
| 3940 |
instead of a rewrite rule of either variety. |
| 3941 |
The problem with % is that when using a path to query rewrite rule, URLs are |
| 3942 |
double-unescaped: once by Apache's path conversion code, and again by PHP. So |
| 3943 |
%253F, for example, becomes "?". Our code does not double-escape to compensate |
| 3944 |
for this, indeed double escaping would break if the double-escaped title was |
| 3945 |
passed in the query string rather than the path. This is a minor security issue |
| 3946 |
because articles can be created such that they are hard to view or edit. |
| 3947 |
In some rare cases you may wish to remove + for compatibility with old links. |
| 3948 |
@deprecated since 1.41; use Extension:TitleBlacklist or (soon) |
| 3949 |
Extension:AbuseFilter to customize this set. |
| 3950 |
CapitalLinks: |
| 3951 |
default: true |
| 3952 |
description: |- |
| 3953 |
Set this to false to avoid forcing the first letter of links to capitals. |
| 3954 |
@warning may break links! This makes links COMPLETELY case-sensitive. Links |
| 3955 |
appearing with a capital at the beginning of a sentence will *not* go to the |
| 3956 |
same place as links in the middle of a sentence using a lowercase initial. |
| 3957 |
CapitalLinkOverrides: |
| 3958 |
default: { } |
| 3959 |
type: object |
| 3960 |
description: |- |
| 3961 |
@since 1.16 - This can now be set per-namespace. Some special namespaces (such as Special, |
| 3962 |
see NamespaceInfo::ALWAYS_CAPITALIZED_NAMESPACES for the full list) must be true by |
| 3963 |
default (and setting them has no effect), due to various things that require them to be |
| 3964 |
so. Also, since Talk namespaces need to directly mirror their associated content |
| 3965 |
namespaces, the values for those are ignored in favor of the subject namespace's |
| 3966 |
setting. Setting for NS_MEDIA is taken automatically from NS_FILE. |
| 3967 |
**Example:** |
| 3968 |
``` |
| 3969 |
$wgCapitalLinkOverrides[ NS_FILE ] = false; |
| 3970 |
``` |
| 3971 |
NamespacesWithSubpages: |
| 3972 |
default: |
| 3973 |
1: true |
| 3974 |
2: true |
| 3975 |
3: true |
| 3976 |
4: true |
| 3977 |
5: true |
| 3978 |
7: true |
| 3979 |
8: true |
| 3980 |
9: true |
| 3981 |
10: true |
| 3982 |
11: true |
| 3983 |
12: true |
| 3984 |
13: true |
| 3985 |
15: true |
| 3986 |
type: object |
| 3987 |
description: |- |
| 3988 |
Which namespaces should support subpages? |
| 3989 |
See Language.php for a list of namespaces. |
| 3990 |
ContentNamespaces: |
| 3991 |
default: |
| 3992 |
- 0 |
| 3993 |
type: array |
| 3994 |
description: |- |
| 3995 |
Array of namespaces which can be deemed to contain valid "content", as far |
| 3996 |
as the site statistics are concerned. Useful if additional namespaces also |
| 3997 |
contain "content" which should be considered when generating a count of the |
| 3998 |
number of articles in the wiki. |
| 3999 |
ShortPagesNamespaceExclusions: |
| 4000 |
default: [] |
| 4001 |
type: array |
| 4002 |
description: |- |
| 4003 |
Optional array of namespaces which should be excluded from Special:ShortPages. |
| 4004 |
Only pages inside $wgContentNamespaces but not $wgShortPagesNamespaceExclusions will |
| 4005 |
be shown on that page. |
| 4006 |
@since 1.37; previously $wgShortPagesNamespaceBlacklist |
| 4007 |
ExtraSignatureNamespaces: |
| 4008 |
default: [] |
| 4009 |
type: array |
| 4010 |
description: |- |
| 4011 |
Array of namespaces, in addition to the talk namespaces, where signatures |
| 4012 |
(~~~~) are likely to be used. This determines whether to display the |
| 4013 |
Signature button on the edit toolbar, and may also be used by extensions. |
| 4014 |
For example, "traditional" style wikis, where content and discussion are |
| 4015 |
intermixed, could place NS_MAIN and NS_PROJECT namespaces in this array. |
| 4016 |
InvalidRedirectTargets: |
| 4017 |
default: |
| 4018 |
- Filepath |
| 4019 |
- Mypage |
| 4020 |
- Mytalk |
| 4021 |
- Redirect |
| 4022 |
- Mylog |
| 4023 |
type: array |
| 4024 |
description: |- |
| 4025 |
Array of invalid page redirect targets. |
| 4026 |
Attempting to create a redirect to any of the pages in this array |
| 4027 |
will make the redirect fail. |
| 4028 |
Userlogout is hard-coded, so it does not need to be listed here. |
| 4029 |
(T12569) Disallow Mypage and Mytalk as well. |
| 4030 |
As of now, this only checks special pages. Redirects to pages in |
| 4031 |
other namespaces cannot be invalidated by this variable. |
| 4032 |
DisableHardRedirects: |
| 4033 |
default: false |
| 4034 |
description: |- |
| 4035 |
Disable redirects to special pages and interwiki redirects, which use a 302 |
| 4036 |
and have no "redirected from" link. |
| 4037 |
@note This is only for articles with #REDIRECT in them. URL's containing a |
| 4038 |
local interwiki prefix (or a non-canonical special page name) are still hard |
| 4039 |
redirected regardless of this setting. |
| 4040 |
FixDoubleRedirects: |
| 4041 |
default: false |
| 4042 |
description: |- |
| 4043 |
Fix double redirects after a page move. |
| 4044 |
Tends to conflict with page move vandalism, use only on a private wiki. |
| 4045 |
LocalInterwikis: |
| 4046 |
default: [] |
| 4047 |
type: array |
| 4048 |
description: |- |
| 4049 |
Array for local interwiki values, for each of the interwiki prefixes that point to |
| 4050 |
the current wiki. |
| 4051 |
Note, recent changes feeds use only the first entry in this array. See $wgRCFeeds. |
| 4052 |
InterwikiExpiry: |
| 4053 |
default: 10800 |
| 4054 |
description: 'Expiry time for cache of interwiki table' |
| 4055 |
InterwikiCache: |
| 4056 |
default: false |
| 4057 |
type: |
| 4058 |
- boolean |
| 4059 |
- object |
| 4060 |
mergeStrategy: replace |
| 4061 |
description: |- |
| 4062 |
Interwiki cache as an associative array. |
| 4063 |
When set, the InterwikiLookup service will not use the built-in `interwiki` database table, |
| 4064 |
but instead use this static array as its source. |
| 4065 |
This cache data structure can be generated by the `dumpInterwiki.php` maintenance |
| 4066 |
script (which lives in the WikimediaMaintenance repository) and has key |
| 4067 |
formats such as the following: |
| 4068 |
- dbname:key - a simple key (e.g. enwiki:meta) |
| 4069 |
- _sitename:key - site-scope key (e.g. wiktionary:meta) |
| 4070 |
- __global:key - global-scope key (e.g. __global:meta) |
| 4071 |
- __sites:dbname - site mapping (e.g. __sites:enwiki) |
| 4072 |
Sites mapping just specifies site name, other keys provide "local url" |
| 4073 |
data layout. |
| 4074 |
@see \MediaWiki\Interwiki\ClassicInterwikiLookup |
| 4075 |
InterwikiScopes: |
| 4076 |
default: 3 |
| 4077 |
description: |- |
| 4078 |
Specify number of domains to check for messages. |
| 4079 |
- 1: Just wiki(db)-level |
| 4080 |
- 2: wiki and global levels |
| 4081 |
- 3: site levels |
| 4082 |
InterwikiFallbackSite: |
| 4083 |
default: wiki |
| 4084 |
description: 'Fallback site, if unable to resolve from cache' |
| 4085 |
RedirectSources: |
| 4086 |
default: false |
| 4087 |
description: |- |
| 4088 |
If local interwikis are set up which allow redirects, |
| 4089 |
set this regexp to restrict URLs which will be displayed |
| 4090 |
as 'redirected from' links. |
| 4091 |
**Example:** |
| 4092 |
It might look something like this: |
| 4093 |
``` |
| 4094 |
$wgRedirectSources = '!^https?://[a-z-]+\.wikipedia\.org/!'; |
| 4095 |
``` |
| 4096 |
Leave at false to avoid displaying any incoming redirect markers. |
| 4097 |
This does not affect intra-wiki redirects, which don't change |
| 4098 |
the URL. |
| 4099 |
SiteTypes: |
| 4100 |
default: |
| 4101 |
mediawiki: MediaWiki\Site\MediaWikiSite |
| 4102 |
type: object |
| 4103 |
description: |- |
| 4104 |
Register handlers for specific types of sites. |
| 4105 |
@since 1.21 |
| 4106 |
MaxTocLevel: |
| 4107 |
default: 999 |
| 4108 |
description: 'Maximum indent level of toc.' |
| 4109 |
MaxPPNodeCount: |
| 4110 |
default: 1000000 |
| 4111 |
description: |- |
| 4112 |
A complexity limit on template expansion: the maximum number of nodes visited |
| 4113 |
by PPFrame::expand() |
| 4114 |
MaxTemplateDepth: |
| 4115 |
default: 100 |
| 4116 |
description: |- |
| 4117 |
Maximum recursion depth for templates within templates. |
| 4118 |
The current parser adds two levels to the PHP call stack for each template, |
| 4119 |
and xdebug limits the call stack to 256 by default. So this should hopefully |
| 4120 |
stop the parser before it hits the xdebug limit. |
| 4121 |
MaxPPExpandDepth: |
| 4122 |
default: 100 |
| 4123 |
description: '@see self::MaxTemplateDepth' |
| 4124 |
UrlProtocols: |
| 4125 |
default: |
| 4126 |
- 'bitcoin:' |
| 4127 |
- 'ftp://' |
| 4128 |
- 'ftps://' |
| 4129 |
- 'geo:' |
| 4130 |
- 'git://' |
| 4131 |
- 'gopher://' |
| 4132 |
- 'http://' |
| 4133 |
- 'https://' |
| 4134 |
- 'irc://' |
| 4135 |
- 'ircs://' |
| 4136 |
- 'magnet:' |
| 4137 |
- 'mailto:' |
| 4138 |
- 'matrix:' |
| 4139 |
- 'mms://' |
| 4140 |
- 'news:' |
| 4141 |
- 'nntp://' |
| 4142 |
- 'redis://' |
| 4143 |
- 'sftp://' |
| 4144 |
- 'sip:' |
| 4145 |
- 'sips:' |
| 4146 |
- 'sms:' |
| 4147 |
- 'ssh://' |
| 4148 |
- 'svn://' |
| 4149 |
- 'tel:' |
| 4150 |
- 'telnet://' |
| 4151 |
- 'urn:' |
| 4152 |
- 'worldwind://' |
| 4153 |
- 'xmpp:' |
| 4154 |
- // |
| 4155 |
type: array |
| 4156 |
description: |- |
| 4157 |
URL schemes that should be recognized as valid by UrlUtils::parse(). |
| 4158 |
WARNING: Do not add 'file:' to this or internal file links will be broken. |
| 4159 |
Instead, if you want to support file links, add 'file://'. The same applies |
| 4160 |
to any other protocols with the same name as a namespace. See task T46011 for |
| 4161 |
more information. |
| 4162 |
@see \MediaWiki\Utils\UrlUtils::parse() |
| 4163 |
CleanSignatures: |
| 4164 |
default: true |
| 4165 |
description: 'If true, removes (by substituting) templates in signatures.' |
| 4166 |
AllowExternalImages: |
| 4167 |
default: false |
| 4168 |
description: 'Whether to allow inline image pointing to other websites' |
| 4169 |
AllowExternalImagesFrom: |
| 4170 |
default: '' |
| 4171 |
description: |- |
| 4172 |
If the above is false, you can specify an exception here. Image URLs |
| 4173 |
that start with this string are then rendered, while all others are not. |
| 4174 |
You can use this to set up a trusted, simple repository of images. |
| 4175 |
You may also specify an array of strings to allow multiple sites |
| 4176 |
**Examples:** |
| 4177 |
``` |
| 4178 |
$wgAllowExternalImagesFrom = 'http://127.0.0.1/'; |
| 4179 |
$wgAllowExternalImagesFrom = [ 'http://127.0.0.1/', 'http://example.com' ]; |
| 4180 |
``` |
| 4181 |
EnableImageWhitelist: |
| 4182 |
default: false |
| 4183 |
description: |- |
| 4184 |
If $wgAllowExternalImages is false, you can allow an on-wiki |
| 4185 |
allow list of regular expression fragments to match the image URL |
| 4186 |
against. If the image matches one of the regular expression fragments, |
| 4187 |
the image will be displayed. |
| 4188 |
Set this to true to enable the on-wiki allow list (MediaWiki:External image whitelist) |
| 4189 |
Or false to disable it |
| 4190 |
@since 1.14 |
| 4191 |
TidyConfig: |
| 4192 |
default: { } |
| 4193 |
type: object |
| 4194 |
description: |- |
| 4195 |
Configuration for HTML postprocessing tool. Set this to a configuration |
| 4196 |
array to enable an external tool. By default, we now use the RemexHtml |
| 4197 |
library; historically, other postprocessors were used. |
| 4198 |
Setting this to null will use default settings. |
| 4199 |
Keys include: |
| 4200 |
- treeMutationTrace: a boolean to turn on Remex tracing |
| 4201 |
- serializerTrace: a boolean to turn on Remex tracing |
| 4202 |
- mungerTrace: a boolean to turn on Remex tracing |
| 4203 |
- pwrap: whether <p> wrapping should be done (default true) |
| 4204 |
See includes/tidy/RemexDriver.php for detail on configuration. |
| 4205 |
Overriding the default configuration is strongly discouraged in |
| 4206 |
production. |
| 4207 |
ParsoidSettings: |
| 4208 |
default: |
| 4209 |
useSelser: true |
| 4210 |
type: object |
| 4211 |
description: |- |
| 4212 |
Default Parsoid configuration. |
| 4213 |
Overriding the default configuration is strongly discouraged in |
| 4214 |
production. |
| 4215 |
@since 1.39 |
| 4216 |
ParserEnableLegacyMediaDOM: |
| 4217 |
default: false |
| 4218 |
deprecated: 'since 1.41' |
| 4219 |
description: |- |
| 4220 |
Enable legacy media HTML structure in the output from the Parser. The |
| 4221 |
alternative modern HTML structure that replaces it is described at |
| 4222 |
https://www.mediawiki.org/wiki/Parsing/Media_structure |
| 4223 |
@deprecated since 1.41 |
| 4224 |
@since 1.36 |
| 4225 |
ParserEnableLegacyHeadingDOM: |
| 4226 |
default: true |
| 4227 |
description: |- |
| 4228 |
Enable legacy HTML structure for headings in the output from the Parser. |
| 4229 |
The legacy structure includes section edit links (and other markup added |
| 4230 |
by some extensions) inside the headings rather than outside them, leading |
| 4231 |
to poor accessibility. This doesn't affect headings on special pages. |
| 4232 |
Note that each skin also has to indicate support for the new structure. |
| 4233 |
More information: https://www.mediawiki.org/wiki/Heading_HTML_changes |
| 4234 |
@since 1.43 |
| 4235 |
UseContentMediaStyles: |
| 4236 |
default: false |
| 4237 |
deprecated: 'since 1.41' |
| 4238 |
description: |- |
| 4239 |
Enable shipping the styles for the media HTML structure that replaces |
| 4240 |
legacy, when $wgParserEnableLegacyMediaDOM is `false`. This is configured |
| 4241 |
separately so that it can continue to be served after the latter is disabled |
| 4242 |
but still in the cache. |
| 4243 |
@deprecated since 1.41 |
| 4244 |
@internal Temporary flag, T51097. |
| 4245 |
@since 1.38 |
| 4246 |
UseLegacyMediaStyles: |
| 4247 |
default: false |
| 4248 |
description: |- |
| 4249 |
Disable shipping the styles for the legacy media HTML structure |
| 4250 |
that has been replaced when $wgParserEnableLegacyMediaDOM is `false`. This is |
| 4251 |
configured separately to give time for templates and extensions that mimic the |
| 4252 |
parser output to be migrated away. |
| 4253 |
@internal Temporary feature flag for T318433. |
| 4254 |
@since 1.41 |
| 4255 |
RawHtml: |
| 4256 |
default: false |
| 4257 |
description: |- |
| 4258 |
Allow raw, unchecked HTML in "<html>...</html>" sections. |
| 4259 |
THIS IS VERY DANGEROUS on a publicly editable site, so USE $wgGroupPermissions |
| 4260 |
TO RESTRICT EDITING to only those that you trust |
| 4261 |
ExternalLinkTarget: |
| 4262 |
default: false |
| 4263 |
description: |- |
| 4264 |
Set a default target for external links, e.g. _blank to pop up a new window. |
| 4265 |
This will also set the "noreferrer" and "noopener" link rel to prevent the |
| 4266 |
attack described at https://mathiasbynens.github.io/rel-noopener/ . |
| 4267 |
Some older browsers may not support these link attributes, hence |
| 4268 |
setting $wgExternalLinkTarget to _blank may represent a security risk |
| 4269 |
to some of your users. |
| 4270 |
NoFollowLinks: |
| 4271 |
default: true |
| 4272 |
description: |- |
| 4273 |
If true, external URL links in wiki text will be given the |
| 4274 |
rel="nofollow" attribute as a hint to search engines that |
| 4275 |
they should not be followed for ranking purposes as they |
| 4276 |
are user-supplied and thus subject to spamming. |
| 4277 |
NoFollowNsExceptions: |
| 4278 |
default: [] |
| 4279 |
type: array |
| 4280 |
description: |- |
| 4281 |
Namespaces in which $wgNoFollowLinks doesn't apply. |
| 4282 |
See Language.php for a list of namespaces. |
| 4283 |
NoFollowDomainExceptions: |
| 4284 |
default: |
| 4285 |
- mediawiki.org |
| 4286 |
type: array |
| 4287 |
description: |- |
| 4288 |
If this is set to an array of domains, external links to these domain names |
| 4289 |
(or any subdomains) will not be set to rel="nofollow" regardless of the |
| 4290 |
value of $wgNoFollowLinks. For instance: |
| 4291 |
$wgNoFollowDomainExceptions = [ 'en.wikipedia.org', 'wiktionary.org', 'mediawiki.org' ]; |
| 4292 |
This would add rel="nofollow" to links to de.wikipedia.org, but not |
| 4293 |
en.wikipedia.org, wiktionary.org, en.wiktionary.org, us.en.wikipedia.org, |
| 4294 |
etc. |
| 4295 |
Defaults to mediawiki.org for the links included in the software by default. |
| 4296 |
RegisterInternalExternals: |
| 4297 |
default: false |
| 4298 |
description: |- |
| 4299 |
By default MediaWiki does not register links pointing to same server in |
| 4300 |
externallinks dataset, use this value to override: |
| 4301 |
AllowDisplayTitle: |
| 4302 |
default: true |
| 4303 |
description: 'Allow DISPLAYTITLE to change title display' |
| 4304 |
RestrictDisplayTitle: |
| 4305 |
default: true |
| 4306 |
description: |- |
| 4307 |
For consistency, restrict DISPLAYTITLE to text that normalizes to the same |
| 4308 |
canonical DB key. Also disallow some inline CSS rules like display: none; |
| 4309 |
which can cause the text to be hidden or unselectable. |
| 4310 |
ExpensiveParserFunctionLimit: |
| 4311 |
default: 100 |
| 4312 |
description: |- |
| 4313 |
Maximum number of calls per parse to expensive parser functions such as |
| 4314 |
PAGESINCATEGORY. |
| 4315 |
PreprocessorCacheThreshold: |
| 4316 |
default: 1000 |
| 4317 |
description: |- |
| 4318 |
Preprocessor caching threshold |
| 4319 |
Setting it to 'false' will disable the preprocessor cache. |
| 4320 |
EnableScaryTranscluding: |
| 4321 |
default: false |
| 4322 |
description: 'Enable interwiki transcluding. Only when iw_trans=1 in the interwiki table.' |
| 4323 |
TranscludeCacheExpiry: |
| 4324 |
default: 3600 |
| 4325 |
description: |- |
| 4326 |
Expiry time for transcluded templates cached in object cache. |
| 4327 |
Only used $wgEnableInterwikiTranscluding is set to true. |
| 4328 |
EnableMagicLinks: |
| 4329 |
default: |
| 4330 |
ISBN: false |
| 4331 |
PMID: false |
| 4332 |
RFC: false |
| 4333 |
type: object |
| 4334 |
description: |- |
| 4335 |
Enable the magic links feature of automatically turning ISBN xxx, |
| 4336 |
PMID xxx, RFC xxx into links |
| 4337 |
@since 1.28 |
| 4338 |
ParserEnableUserLanguage: |
| 4339 |
default: false |
| 4340 |
description: |- |
| 4341 |
Set this to true to allow the {{USERLANGUAGE}} magic word to return the |
| 4342 |
actual user language. If it is false, {{USERLANGUAGE}} will return the |
| 4343 |
page language. Setting this to true is discouraged since the page |
| 4344 |
language should typically be used in the content area. Accessing the user |
| 4345 |
language using this feature reduces the efficiency of the parser cache. |
| 4346 |
@since 1.43 |
| 4347 |
ArticleCountMethod: |
| 4348 |
default: link |
| 4349 |
description: |- |
| 4350 |
Method used to determine if a page in a content namespace should be counted |
| 4351 |
as a valid article. |
| 4352 |
Redirect pages will never be counted as valid articles. |
| 4353 |
This variable can have the following values: |
| 4354 |
- 'any': all pages as considered as valid articles |
| 4355 |
- 'link': the page must contain a [[wiki link]] to be considered valid |
| 4356 |
See also See https://www.mediawiki.org/wiki/Manual:Article_count |
| 4357 |
Retroactively changing this variable will not affect the existing count, |
| 4358 |
to update it, you will need to run the maintenance/updateArticleCount.php |
| 4359 |
script. |
| 4360 |
ActiveUserDays: |
| 4361 |
default: 30 |
| 4362 |
description: |- |
| 4363 |
How many days user must be idle before he is considered inactive. Will affect |
| 4364 |
the number shown on Special:Statistics, Special:ActiveUsers, and the |
| 4365 |
{{NUMBEROFACTIVEUSERS}} magic word in wikitext. |
| 4366 |
You might want to leave this as the default value, to provide comparable |
| 4367 |
numbers between different wikis. |
| 4368 |
LearnerEdits: |
| 4369 |
default: 10 |
| 4370 |
description: |- |
| 4371 |
The following variables define 3 user experience levels: |
| 4372 |
- newcomer: has not yet reached the 'learner' level |
| 4373 |
- learner: has at least $wgLearnerEdits and has been |
| 4374 |
a member for $wgLearnerMemberSince days |
| 4375 |
but has not yet reached the 'experienced' level. |
| 4376 |
- experienced: has at least $wgExperiencedUserEdits edits and |
| 4377 |
has been a member for $wgExperiencedUserMemberSince days. |
| 4378 |
LearnerMemberSince: |
| 4379 |
default: 4 |
| 4380 |
description: |- |
| 4381 |
Number of days the user must exist before becoming a learner. |
| 4382 |
@see self::LearnerEdits |
| 4383 |
ExperiencedUserEdits: |
| 4384 |
default: 500 |
| 4385 |
description: |- |
| 4386 |
Number of edits the user must have before becoming "experienced". |
| 4387 |
@see self::LearnerEdits |
| 4388 |
ExperiencedUserMemberSince: |
| 4389 |
default: 30 |
| 4390 |
description: |- |
| 4391 |
Number of days the user must exist before becoming "experienced". |
| 4392 |
@see self::LearnerEdits |
| 4393 |
ManualRevertSearchRadius: |
| 4394 |
default: 15 |
| 4395 |
type: integer |
| 4396 |
description: |- |
| 4397 |
Maximum number of revisions of a page that will be checked against every new edit |
| 4398 |
made to determine whether the edit was a manual revert. |
| 4399 |
Computational time required increases roughly linearly with this configuration |
| 4400 |
variable. |
| 4401 |
Larger values will let you detect very deep reverts, but at the same time can give |
| 4402 |
unexpected results (such as marking large amounts of edits as reverts) and may slow |
| 4403 |
down the wiki slightly when saving new edits. |
| 4404 |
Setting this to 0 will disable the manual revert detection feature entirely. |
| 4405 |
See this document for a discussion on this topic: |
| 4406 |
https://meta.wikimedia.org/wiki/Research:Revert |
| 4407 |
@since 1.36 |
| 4408 |
RevertedTagMaxDepth: |
| 4409 |
default: 15 |
| 4410 |
type: integer |
| 4411 |
description: |- |
| 4412 |
Maximum depth (revision count) of reverts that will have their reverted edits marked |
| 4413 |
with the mw-reverted change tag. Reverts deeper than that will not have any edits |
| 4414 |
marked as reverted at all. |
| 4415 |
Large values can lead to lots of revisions being marked as "reverted", which may appear |
| 4416 |
confusing to users. |
| 4417 |
Setting this to 0 will disable the reverted tag entirely. |
| 4418 |
@since 1.36 |
| 4419 |
CentralIdLookupProviders: |
| 4420 |
default: |
| 4421 |
local: { class: MediaWiki\User\CentralId\LocalIdLookup, services: [MainConfig, DBLoadBalancerFactory, HideUserUtils] } |
| 4422 |
type: object |
| 4423 |
description: |- |
| 4424 |
Central ID lookup providers |
| 4425 |
Key is the provider ID, value is a specification for ObjectFactory |
| 4426 |
@since 1.27 |
| 4427 |
CentralIdLookupProvider: |
| 4428 |
default: local |
| 4429 |
type: string |
| 4430 |
description: 'Central ID lookup provider to use by default' |
| 4431 |
UserRegistrationProviders: |
| 4432 |
default: |
| 4433 |
local: { class: MediaWiki\User\Registration\LocalUserRegistrationProvider, services: [UserFactory] } |
| 4434 |
type: object |
| 4435 |
description: |- |
| 4436 |
User registration timestamp provider classes |
| 4437 |
@since 1.41 |
| 4438 |
PasswordPolicy: |
| 4439 |
default: |
| 4440 |
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 } } } |
| 4441 |
checks: { MinimalPasswordLength: [MediaWiki\Password\PasswordPolicyChecks, checkMinimalPasswordLength], MinimumPasswordLengthToLogin: [MediaWiki\Password\PasswordPolicyChecks, checkMinimumPasswordLengthToLogin], PasswordCannotBeSubstringInUsername: [MediaWiki\Password\PasswordPolicyChecks, checkPasswordCannotBeSubstringInUsername], PasswordCannotMatchDefaults: [MediaWiki\Password\PasswordPolicyChecks, checkPasswordCannotMatchDefaults], MaximalPasswordLength: [MediaWiki\Password\PasswordPolicyChecks, checkMaximalPasswordLength], PasswordNotInCommonList: [MediaWiki\Password\PasswordPolicyChecks, checkPasswordNotInCommonList] } |
| 4442 |
type: object |
| 4443 |
mergeStrategy: array_replace_recursive |
| 4444 |
description: |- |
| 4445 |
Password policy for the wiki. |
| 4446 |
Structured as |
| 4447 |
``` |
| 4448 |
[ |
| 4449 |
'policies' => [ <group> => [ <policy> => <settings>, ... ], ... ], |
| 4450 |
'checks' => [ <policy> => <callback>, ... ], |
| 4451 |
] |
| 4452 |
``` |
| 4453 |
where <group> is a user group, <policy> is a password policy name |
| 4454 |
(arbitrary string) defined in the 'checks' part, <callback> is the |
| 4455 |
PHP callable implementing the policy check, <settings> is an array |
| 4456 |
of options with the following keys: |
| 4457 |
- value: (number, boolean or null) the value to pass to the callback |
| 4458 |
- forceChange: (boolean, default false) if the password is invalid, do |
| 4459 |
not let the user log in without changing the password |
| 4460 |
- suggestChangeOnLogin: (boolean, default false) if true and the password is |
| 4461 |
invalid, suggest a password change if logging in. If all the failing policies |
| 4462 |
that apply to the user have this set to false, the password change |
| 4463 |
screen will not be shown. 'forceChange' takes precedence over |
| 4464 |
'suggestChangeOnLogin' if they are both present. |
| 4465 |
As a shorthand for [ 'value' => <value> ], simply <value> can be written. |
| 4466 |
When multiple password policies are defined for a user, the settings |
| 4467 |
arrays are merged, and for fields which are set in both arrays, the |
| 4468 |
larger value (as understood by PHP's 'max' method) is taken. |
| 4469 |
A user's effective policy is the superset of all policy statements |
| 4470 |
from the policies for the groups where the user is a member. If more |
| 4471 |
than one group policy include the same policy statement, the value is |
| 4472 |
the max() of the values. Note true > false. The 'default' policy group |
| 4473 |
is required, and serves as the minimum policy for all users. |
| 4474 |
Callbacks receive three arguments: the policy value, the User object |
| 4475 |
and the password; and must return a StatusValue. A non-good status |
| 4476 |
means the password will not be accepted for new accounts, and existing |
| 4477 |
accounts will be prompted for password change or barred from logging in |
| 4478 |
(depending on whether the status is a fatal or merely error/warning). |
| 4479 |
The checks supported by core are: |
| 4480 |
- MinimalPasswordLength - Minimum length a user can set. |
| 4481 |
- MinimumPasswordLengthToLogin - Passwords shorter than this will |
| 4482 |
not be allowed to login, or offered a chance to reset their password |
| 4483 |
as part of the login workflow, regardless if it is correct. |
| 4484 |
- MaximalPasswordLength - maximum length password a user is allowed |
| 4485 |
to attempt. Prevents DoS attacks with pbkdf2. |
| 4486 |
- PasswordCannotBeSubstringInUsername - Password cannot be a substring |
| 4487 |
(contained within) the username. |
| 4488 |
- PasswordCannotMatchDefaults - Username/password combination cannot |
| 4489 |
match a list of default passwords used by MediaWiki in the past. |
| 4490 |
- PasswordNotInCommonList - Password not in best practices list of |
| 4491 |
100,000 commonly used passwords. Due to the size of the list this |
| 4492 |
is a probabilistic test. |
| 4493 |
If you add custom checks, for Special:PasswordPolicies to display them correctly, |
| 4494 |
every check should have a corresponding passwordpolicies-policy-<check> message, |
| 4495 |
and every settings field other than 'value' should have a corresponding |
| 4496 |
passwordpolicies-policyflag-<flag> message (<check> and <flag> are in lowercase). |
| 4497 |
The check message receives the policy value as a parameter, the flag message |
| 4498 |
receives the flag value (or values if it's an array). |
| 4499 |
@since 1.26 |
| 4500 |
@see \MediaWiki\Password\PasswordPolicyChecks |
| 4501 |
@see \MediaWiki\User\User::checkPasswordValidity() |
| 4502 |
AuthManagerConfig: |
| 4503 |
default: null |
| 4504 |
type: |
| 4505 |
- object |
| 4506 |
- 'null' |
| 4507 |
description: |- |
| 4508 |
Configure AuthManager |
| 4509 |
All providers are constructed using ObjectFactory, see that for the general |
| 4510 |
structure. The array may also contain a key "sort" used to order providers: |
| 4511 |
providers are stably sorted by this value, which should be an integer |
| 4512 |
(default is 0). |
| 4513 |
Elements are: |
| 4514 |
- preauth: Array (keys ignored) of specifications for PreAuthenticationProviders |
| 4515 |
- primaryauth: Array (keys ignored) of specifications for PrimaryAuthenticationProviders |
| 4516 |
- secondaryauth: Array (keys ignored) of specifications for SecondaryAuthenticationProviders |
| 4517 |
@since 1.27 |
| 4518 |
@note If this is null or empty, the value from $wgAuthManagerAutoConfig is |
| 4519 |
used instead. Local customization should generally set this variable from |
| 4520 |
scratch to the desired configuration. Extensions that want to |
| 4521 |
auto-configure themselves should use $wgAuthManagerAutoConfig instead. |
| 4522 |
AuthManagerAutoConfig: |
| 4523 |
default: |
| 4524 |
preauth: { MediaWiki\Auth\ThrottlePreAuthenticationProvider: { class: MediaWiki\Auth\ThrottlePreAuthenticationProvider, sort: 0 } } |
| 4525 |
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 } } |
| 4526 |
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 } } |
| 4527 |
type: object |
| 4528 |
mergeStrategy: array_plus_2d |
| 4529 |
description: |- |
| 4530 |
@see self::AuthManagerConfig |
| 4531 |
@since 1.27 |
| 4532 |
RememberMe: |
| 4533 |
default: choose |
| 4534 |
type: string |
| 4535 |
description: |- |
| 4536 |
Configures RememberMe authentication request added by AuthManager. It can show a "remember |
| 4537 |
me" checkbox that, when checked, will cause it to take more time for the authenticated |
| 4538 |
session to expire. It can also be configured to always or to never extend the authentication |
| 4539 |
session. |
| 4540 |
Valid values are listed in RememberMeAuthenticationRequest::ALLOWED_FLAGS. |
| 4541 |
@since 1.36 |
| 4542 |
ReauthenticateTime: |
| 4543 |
default: |
| 4544 |
default: 3600 |
| 4545 |
type: object |
| 4546 |
additionalProperties: |
| 4547 |
type: integer |
| 4548 |
description: |- |
| 4549 |
Time frame for re-authentication. |
| 4550 |
With only password-based authentication, you'd just ask the user to re-enter |
| 4551 |
their password to verify certain operations like changing the password or |
| 4552 |
changing the account's email address. But under AuthManager, the user might |
| 4553 |
not have a password (you might even have to redirect the browser to a |
| 4554 |
third-party service or something complex like that), you might want to have |
| 4555 |
both factors of a two-factor authentication, and so on. So, the options are: |
| 4556 |
- Incorporate the whole multi-step authentication flow within everything |
| 4557 |
that needs to do this. |
| 4558 |
- Consider it good if they used Special:UserLogin during this session within |
| 4559 |
the last X seconds. |
| 4560 |
- Come up with a third option. |
| 4561 |
MediaWiki currently takes the second option. This setting configures the |
| 4562 |
"X seconds". |
| 4563 |
This allows for configuring different time frames for different |
| 4564 |
"operations". The operations used in MediaWiki core include: |
| 4565 |
- LinkAccounts |
| 4566 |
- UnlinkAccount |
| 4567 |
- ChangeCredentials |
| 4568 |
- RemoveCredentials |
| 4569 |
- ChangeEmail |
| 4570 |
Additional operations may be used by extensions, either explicitly by |
| 4571 |
calling AuthManager::securitySensitiveOperationStatus(), |
| 4572 |
ApiAuthManagerHelper::securitySensitiveOperation() or |
| 4573 |
SpecialPage::checkLoginSecurityLevel(), or implicitly by overriding |
| 4574 |
SpecialPage::getLoginSecurityLevel() or by subclassing |
| 4575 |
AuthManagerSpecialPage. |
| 4576 |
The key 'default' is used if a requested operation isn't defined in the array. |
| 4577 |
@since 1.27 |
| 4578 |
AllowSecuritySensitiveOperationIfCannotReauthenticate: |
| 4579 |
default: |
| 4580 |
default: true |
| 4581 |
type: object |
| 4582 |
additionalProperties: |
| 4583 |
type: boolean |
| 4584 |
description: |- |
| 4585 |
Whether to allow security-sensitive operations when re-authentication is not possible. |
| 4586 |
If AuthManager::canAuthenticateNow() is false (e.g. the current |
| 4587 |
SessionProvider is not able to change users, such as when OAuth is in use), |
| 4588 |
AuthManager::securitySensitiveOperationStatus() cannot sensibly return |
| 4589 |
SEC_REAUTH. Setting an operation true here will have it return SEC_OK in |
| 4590 |
that case, while setting it false will have it return SEC_FAIL. |
| 4591 |
The key 'default' is used if a requested operation isn't defined in the array. |
| 4592 |
@since 1.27 |
| 4593 |
@see self::ReauthenticateTime |
| 4594 |
ChangeCredentialsBlacklist: |
| 4595 |
default: |
| 4596 |
- MediaWiki\Auth\TemporaryPasswordAuthenticationRequest |
| 4597 |
type: array |
| 4598 |
items: |
| 4599 |
type: string |
| 4600 |
description: |- |
| 4601 |
List of AuthenticationRequest class names which are not changeable through |
| 4602 |
Special:ChangeCredentials and the changeauthenticationdata API. |
| 4603 |
This is only enforced on the client level; AuthManager itself (e.g. |
| 4604 |
AuthManager::allowsAuthenticationDataChange calls) is not affected. |
| 4605 |
Class names are checked for exact match (not for subclasses). |
| 4606 |
@since 1.27 |
| 4607 |
RemoveCredentialsBlacklist: |
| 4608 |
default: |
| 4609 |
- MediaWiki\Auth\PasswordAuthenticationRequest |
| 4610 |
type: array |
| 4611 |
items: |
| 4612 |
type: string |
| 4613 |
description: |- |
| 4614 |
List of AuthenticationRequest class names which are not removable through |
| 4615 |
Special:RemoveCredentials and the removeauthenticationdata API. |
| 4616 |
This is only enforced on the client level; AuthManager itself (e.g. |
| 4617 |
AuthManager::allowsAuthenticationDataChange calls) is not affected. |
| 4618 |
Class names are checked for exact match (not for subclasses). |
| 4619 |
@since 1.27 |
| 4620 |
InvalidPasswordReset: |
| 4621 |
default: true |
| 4622 |
description: |- |
| 4623 |
Specifies if users should be sent to a password-reset form on login, if their |
| 4624 |
password doesn't meet the requirements of User::isValidPassword(). |
| 4625 |
@since 1.23 |
| 4626 |
PasswordDefault: |
| 4627 |
default: pbkdf2 |
| 4628 |
description: |- |
| 4629 |
Default password type to use when hashing user passwords. |
| 4630 |
Must be set to a type defined in $wgPasswordConfig, or a type that |
| 4631 |
is registered by default in PasswordFactory.php. |
| 4632 |
@since 1.24 |
| 4633 |
PasswordConfig: |
| 4634 |
default: |
| 4635 |
A: { class: MediaWiki\Password\MWOldPassword } |
| 4636 |
B: { class: MediaWiki\Password\MWSaltedPassword } |
| 4637 |
pbkdf2-legacyA: { class: MediaWiki\Password\LayeredParameterizedPassword, types: [A, pbkdf2] } |
| 4638 |
pbkdf2-legacyB: { class: MediaWiki\Password\LayeredParameterizedPassword, types: [B, pbkdf2] } |
| 4639 |
bcrypt: { class: MediaWiki\Password\BcryptPassword, cost: 9 } |
| 4640 |
pbkdf2: { class: MediaWiki\Password\Pbkdf2PasswordUsingOpenSSL, algo: sha512, cost: '30000', length: '64' } |
| 4641 |
argon2: { class: MediaWiki\Password\Argon2Password, algo: auto } |
| 4642 |
type: object |
| 4643 |
description: |- |
| 4644 |
Configuration for built-in password types. |
| 4645 |
Maps the password type to an array of options: |
| 4646 |
- class: The Password class to use. |
| 4647 |
- factory (since 1.40): A function that creates and returns a suitable Password object. |
| 4648 |
This option is intended only for internal use; the function signature is unstable and |
| 4649 |
subject to change in future versions. |
| 4650 |
All other options are class-dependent. |
| 4651 |
An advanced example: |
| 4652 |
``` |
| 4653 |
$wgPasswordConfig['bcrypt-peppered'] = [ |
| 4654 |
'class' => EncryptedPassword::class, |
| 4655 |
'underlying' => 'bcrypt', |
| 4656 |
'secrets' => [ |
| 4657 |
hash( 'sha256', 'secret', true ), |
| 4658 |
], |
| 4659 |
'cipher' => 'aes-256-cbc', |
| 4660 |
]; |
| 4661 |
``` |
| 4662 |
@since 1.24 |
| 4663 |
PasswordResetRoutes: |
| 4664 |
default: |
| 4665 |
username: true |
| 4666 |
email: true |
| 4667 |
type: object |
| 4668 |
description: |- |
| 4669 |
Whether to allow password resets ("enter some identifying data, and we'll send an email |
| 4670 |
with a temporary password you can use to get back into the account") identified by |
| 4671 |
various bits of data. Setting all of these to false (or the whole variable to false) |
| 4672 |
has the effect of disabling password resets entirely |
| 4673 |
MaxSigChars: |
| 4674 |
default: 255 |
| 4675 |
description: 'Maximum number of Unicode characters in signature' |
| 4676 |
SignatureValidation: |
| 4677 |
default: warning |
| 4678 |
description: |- |
| 4679 |
Behavior of signature validation. Allowed values are: |
| 4680 |
- 'warning' - invalid signatures cause a warning to be displayed on the preferences page, |
| 4681 |
but they are still used when signing comments; new invalid signatures can still be saved as |
| 4682 |
normal |
| 4683 |
- 'new' - existing invalid signatures behave as above; new invalid signatures can't be |
| 4684 |
saved |
| 4685 |
- 'disallow' - existing invalid signatures are no longer used when signing comments; new |
| 4686 |
invalid signatures can't be saved |
| 4687 |
@since 1.35 |
| 4688 |
SignatureAllowedLintErrors: |
| 4689 |
default: |
| 4690 |
- obsolete-tag |
| 4691 |
type: array |
| 4692 |
description: |- |
| 4693 |
List of lint error codes which don't cause signature validation to fail. |
| 4694 |
@see https://www.mediawiki.org/wiki/Help:Lint_errors |
| 4695 |
@since 1.35 |
| 4696 |
MaxNameChars: |
| 4697 |
default: 255 |
| 4698 |
description: |- |
| 4699 |
Maximum number of bytes in username. You want to run the maintenance |
| 4700 |
script ./maintenance/checkUsernames.php once you have changed this value. |
| 4701 |
ReservedUsernames: |
| 4702 |
default: |
| 4703 |
- 'MediaWiki default' |
| 4704 |
- 'Conversion script' |
| 4705 |
- 'Maintenance script' |
| 4706 |
- 'Template namespace initialisation script' |
| 4707 |
- ScriptImporter |
| 4708 |
- 'Delete page script' |
| 4709 |
- 'Move page script' |
| 4710 |
- 'Command line script' |
| 4711 |
- 'Unknown user' |
| 4712 |
- 'msg:double-redirect-fixer' |
| 4713 |
- 'msg:usermessage-editor' |
| 4714 |
- 'msg:proxyblocker' |
| 4715 |
- 'msg:sorbs' |
| 4716 |
- 'msg:spambot_username' |
| 4717 |
- 'msg:autochange-username' |
| 4718 |
type: array |
| 4719 |
description: |- |
| 4720 |
Array of usernames which may not be registered or logged in from |
| 4721 |
Maintenance scripts can still use these |
| 4722 |
@see \MediaWiki\User\User::MAINTENANCE_SCRIPT_USER |
| 4723 |
DefaultUserOptions: |
| 4724 |
default: |
| 4725 |
ccmeonemails: 0 |
| 4726 |
date: default |
| 4727 |
diffonly: 0 |
| 4728 |
diff-type: table |
| 4729 |
disablemail: 0 |
| 4730 |
editfont: monospace |
| 4731 |
editondblclick: 0 |
| 4732 |
editrecovery: 0 |
| 4733 |
editsectiononrightclick: 0 |
| 4734 |
email-allow-new-users: 1 |
| 4735 |
enotifminoredits: 0 |
| 4736 |
enotifrevealaddr: 0 |
| 4737 |
enotifusertalkpages: 1 |
| 4738 |
enotifwatchlistpages: 1 |
| 4739 |
extendwatchlist: 1 |
| 4740 |
fancysig: 0 |
| 4741 |
forceeditsummary: 0 |
| 4742 |
forcesafemode: 0 |
| 4743 |
gender: unknown |
| 4744 |
hidecategorization: 1 |
| 4745 |
hideminor: 0 |
| 4746 |
hidepatrolled: 0 |
| 4747 |
imagesize: 2 |
| 4748 |
minordefault: 0 |
| 4749 |
newpageshidepatrolled: 0 |
| 4750 |
nickname: '' |
| 4751 |
norollbackdiff: 0 |
| 4752 |
prefershttps: 1 |
| 4753 |
previewonfirst: 0 |
| 4754 |
previewontop: 1 |
| 4755 |
pst-cssjs: 1 |
| 4756 |
rcdays: 7 |
| 4757 |
rcenhancedfilters-disable: 0 |
| 4758 |
rclimit: 50 |
| 4759 |
requireemail: 0 |
| 4760 |
search-match-redirect: true |
| 4761 |
search-special-page: Search |
| 4762 |
search-thumbnail-extra-namespaces: true |
| 4763 |
searchlimit: 20 |
| 4764 |
showhiddencats: 0 |
| 4765 |
shownumberswatching: 1 |
| 4766 |
showrollbackconfirmation: 0 |
| 4767 |
skin: false |
| 4768 |
skin-responsive: 1 |
| 4769 |
thumbsize: 5 |
| 4770 |
underline: 2 |
| 4771 |
useeditwarning: 1 |
| 4772 |
uselivepreview: 0 |
| 4773 |
usenewrc: 1 |
| 4774 |
watchcreations: 1 |
| 4775 |
watchdefault: 1 |
| 4776 |
watchdeletion: 0 |
| 4777 |
watchlistdays: 7 |
| 4778 |
watchlisthideanons: 0 |
| 4779 |
watchlisthidebots: 0 |
| 4780 |
watchlisthidecategorization: 1 |
| 4781 |
watchlisthideliu: 0 |
| 4782 |
watchlisthideminor: 0 |
| 4783 |
watchlisthideown: 0 |
| 4784 |
watchlisthidepatrolled: 0 |
| 4785 |
watchlistreloadautomatically: 0 |
| 4786 |
watchlistunwatchlinks: 0 |
| 4787 |
watchmoves: 0 |
| 4788 |
watchrollback: 0 |
| 4789 |
watchuploads: 1 |
| 4790 |
wlenhancedfilters-disable: 0 |
| 4791 |
wllimit: 250 |
| 4792 |
type: object |
| 4793 |
description: |- |
| 4794 |
Settings added to this array will override the default globals for the user |
| 4795 |
preferences used by anonymous visitors and newly created accounts. |
| 4796 |
For instance, to disable editing on double clicks: |
| 4797 |
$wgDefaultUserOptions ['editondblclick'] = 0; |
| 4798 |
To save storage space, no user_properties row will be stored for users with the |
| 4799 |
default setting for a given option, even if the user manually selects that option. |
| 4800 |
This means that a change to the defaults will change the setting for all users who |
| 4801 |
have been using the default setting; there is no way for users to opt out of this. |
| 4802 |
$wgConditionalUserOptions can be used to change the default value for future users |
| 4803 |
only. |
| 4804 |
@see self::ConditionalUserOptions |
| 4805 |
ConditionalUserOptions: |
| 4806 |
default: { } |
| 4807 |
type: object |
| 4808 |
description: |- |
| 4809 |
Conditional defaults for user options |
| 4810 |
Map of user options to conditional defaults descriptors, which is an array |
| 4811 |
of conditional cases [ VALUE, CONDITION1, CONDITION2 ], where VALUE is the default value for |
| 4812 |
all users that meet ALL conditions, and each CONDITION is either a: |
| 4813 |
(a) a CUDCOND_* constant (when condition does not take any arguments), or |
| 4814 |
(b) an array [ CUDCOND_*, argument1, argument1, ... ] (when chosen condition takes at |
| 4815 |
least one argument). |
| 4816 |
When `null` is used as the VALUE, it is interpreted as "no conditional default for this |
| 4817 |
condition". In other words, `null` and $wgDefaultUserOptions['user-option'] can be used |
| 4818 |
interchangeably as the VALUE. |
| 4819 |
All conditions are evaluated in order. When no condition matches. |
| 4820 |
$wgDefaultUserOptions is used instead. |
| 4821 |
Example of valid configuration: |
| 4822 |
$wgConditionalUserOptions['user-option'] = [ |
| 4823 |
[ 'registered in 2024', [ CUDCOND_AFTER, '20240101000000' ] ] |
| 4824 |
]; |
| 4825 |
List of valid conditions: |
| 4826 |
* CUDCOND_AFTER: user registered after given timestamp (args: string $timestamp) |
| 4827 |
* CUDCOND_ANON: allows specifying a default for anonymous (logged-out, non-temporary) users |
| 4828 |
* CUDCOND_NAMED: allows specifying a default for named (registered, non-temporary) users |
| 4829 |
* CUDCOND_USERGROUP: users with a specific user group |
| 4830 |
@since 1.42 |
| 4831 |
@see self::DefaultUserOptions |
| 4832 |
HiddenPrefs: |
| 4833 |
default: [] |
| 4834 |
type: array |
| 4835 |
description: 'An array of preferences to not show for the user' |
| 4836 |
InvalidUsernameCharacters: |
| 4837 |
default: '@:>=' |
| 4838 |
description: |- |
| 4839 |
Characters to prevent during new account creations. |
| 4840 |
This is used in a regular expression character class during |
| 4841 |
registration (regex metacharacters like / are escaped). |
| 4842 |
UserrightsInterwikiDelimiter: |
| 4843 |
default: '@' |
| 4844 |
description: |- |
| 4845 |
Character used as a delimiter when testing for interwiki userrights |
| 4846 |
(In Special:UserRights, it is possible to modify users on different |
| 4847 |
databases if the delimiter is used, e.g. "Someuser@enwiki"). |
| 4848 |
It is recommended that you have this delimiter in |
| 4849 |
$wgInvalidUsernameCharacters above, or you will not be able to |
| 4850 |
modify the user rights of those users via Special:UserRights |
| 4851 |
SecureLogin: |
| 4852 |
default: false |
| 4853 |
description: |- |
| 4854 |
This is to let user authenticate using https when they come from http. |
| 4855 |
Based on an idea by George Herbert on wikitech-l: |
| 4856 |
https://lists.wikimedia.org/pipermail/wikitech-l/2010-October/050039.html |
| 4857 |
@since 1.17 |
| 4858 |
AuthenticationTokenVersion: |
| 4859 |
default: null |
| 4860 |
type: |
| 4861 |
- string |
| 4862 |
- 'null' |
| 4863 |
description: |- |
| 4864 |
Versioning for authentication tokens. |
| 4865 |
If non-null, this is combined with the user's secret (the user_token field |
| 4866 |
in the DB) to generate the token cookie. Changing this will invalidate all |
| 4867 |
active sessions (i.e. it will log everyone out). |
| 4868 |
@since 1.27 |
| 4869 |
SessionProviders: |
| 4870 |
type: object |
| 4871 |
default: |
| 4872 |
MediaWiki\Session\CookieSessionProvider: { class: MediaWiki\Session\CookieSessionProvider, args: [{ priority: 30 }] } |
| 4873 |
MediaWiki\Session\BotPasswordSessionProvider: { class: MediaWiki\Session\BotPasswordSessionProvider, args: [{ priority: 75 }], services: [GrantsInfo] } |
| 4874 |
description: |- |
| 4875 |
MediaWiki\Session\SessionProvider configuration. |
| 4876 |
Values are ObjectFactory specifications for the SessionProviders to be |
| 4877 |
used. Keys in the array are ignored; the class name is conventionally |
| 4878 |
used as the key to avoid collisions. Order is not significant. |
| 4879 |
@since 1.27 |
| 4880 |
AutoCreateTempUser: |
| 4881 |
properties: |
| 4882 |
known: { type: boolean, default: false } |
| 4883 |
enabled: { type: boolean, default: false } |
| 4884 |
actions: { type: array, default: [edit] } |
| 4885 |
genPattern: { type: string, default: ~$1 } |
| 4886 |
matchPattern: { type: [string, array, 'null'], default: null } |
| 4887 |
reservedPattern: { type: [string, 'null'], default: ~$1 } |
| 4888 |
serialProvider: { type: object, default: { type: local, useYear: true } } |
| 4889 |
serialMapping: { type: object, default: { type: plain-numeric } } |
| 4890 |
expireAfterDays: { type: [integer, 'null'], default: 90 } |
| 4891 |
notifyBeforeExpirationDays: { type: [integer, 'null'], default: 10 } |
| 4892 |
type: object |
| 4893 |
description: |- |
| 4894 |
Configuration for automatic creation of temporary accounts on page save. |
| 4895 |
This can be enabled to avoid exposing the IP addresses of casual editors who |
| 4896 |
do not explicitly create an account. |
| 4897 |
@warning This is EXPERIMENTAL, enabling may break extensions. |
| 4898 |
An associative array with the following keys: |
| 4899 |
- known: (bool) Whether auto-creation is known about. Set this to 'true' if |
| 4900 |
temp accounts have been created on this wiki already. This setting allows |
| 4901 |
temp users to be recognized even if auto-creation is currently disabled. |
| 4902 |
If auto-creation is enabled via the 'enabled' property, then 'known' is |
| 4903 |
overriden to true. |
| 4904 |
- enabled: (bool) Whether auto-creation is enabled. If changing this |
| 4905 |
value from 'true' to 'false', you should also set 'known' to true, so |
| 4906 |
that relevant code can continue to identify temporary accounts as |
| 4907 |
visually and conceptually distinct from anonymous accounts and named accounts. |
| 4908 |
- actions: (array) A list of actions for which the feature is enabled. |
| 4909 |
Currently only "edit" is supported. |
| 4910 |
- genPattern: (string) The pattern used when generating new usernames. |
| 4911 |
This should have "$1" indicating the place where the serial string will |
| 4912 |
be substituted. |
| 4913 |
- matchPattern: (string|string[]|null) The pattern used when determining whether a |
| 4914 |
username is a temporary user. This affects the rights of the user |
| 4915 |
and also prevents explicit creation of users with matching names. |
| 4916 |
This is ignored if "enabled" is false. If the value is null, the |
| 4917 |
the genPattern value is used as the matchPattern. |
| 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 |
- useYear: (bool) Restart at 1 each time the year changes (in UTC). |
| 4931 |
To avoid naming conflicts, the year is included in the name after |
| 4932 |
the prefix, in the form 'YYYY-'. |
| 4933 |
- serialMapping: (array) Configuration for mapping integer indexes to strings |
| 4934 |
to substitute into genPattern. |
| 4935 |
- type: (string) May be |
| 4936 |
- "plain-numeric" to use ASCII decimal numbers |
| 4937 |
- "localized-numeric" to use numbers localized using a specific language |
| 4938 |
- "filtered-radix" to use numbers in an arbitrary base between 2 and 36, |
| 4939 |
with an optional list of "bad" IDs to skip over. |
| 4940 |
- "scramble": to use ASCII decimal numbers that are short but |
| 4941 |
non-consecutive. |
| 4942 |
- language: (string) With "localized-numeric", the language code |
| 4943 |
- radix: (int) With "filtered-radix", the base |
| 4944 |
- badIndexes: (array) With "filtered-radix", an array with the bad unmapped |
| 4945 |
indexes in the values. The integers must be sorted and the list |
| 4946 |
must never change after the indexes have been allocated. The keys must |
| 4947 |
be zero-based array indexes. |
| 4948 |
- uppercase: (bool) With "filtered-radix", whether to use uppercase |
| 4949 |
letters, default false. |
| 4950 |
- offset: (int) With "plain-numeric", a constant to add to the stored index. |
| 4951 |
- expireAfterDays: (int|null, default 90) If not null, how many days should the temporary |
| 4952 |
accounts expire? Requires expireTemporaryAccounts.php to be periodically executed in |
| 4953 |
order to work. |
| 4954 |
- notifyBeforeExpirationDays: (int|null, default 10) If not null, how many days before the |
| 4955 |
expiration of a temporary account should it be notified that their account is to be expired. |
| 4956 |
@unstable EXPERIMENTAL |
| 4957 |
@since 1.39 |
| 4958 |
default: null |
| 4959 |
AutoblockExpiry: |
| 4960 |
default: 86400 |
| 4961 |
description: 'Number of seconds before autoblock entries expire. Default 86400 = 1 day.' |
| 4962 |
BlockAllowsUTEdit: |
| 4963 |
default: true |
| 4964 |
description: |- |
| 4965 |
Set this to true to allow blocked users to edit their own user talk page. |
| 4966 |
This only applies to sitewide blocks. Partial blocks always allow users to |
| 4967 |
edit their own user talk page unless otherwise specified in the block |
| 4968 |
restrictions. |
| 4969 |
BlockCIDRLimit: |
| 4970 |
default: |
| 4971 |
IPv4: 16 |
| 4972 |
IPv6: 19 |
| 4973 |
type: object |
| 4974 |
description: |- |
| 4975 |
Limits on the possible sizes of range blocks. |
| 4976 |
CIDR notation is hard to understand, it's easy to mistakenly assume that a |
| 4977 |
/1 is a small range and a /31 is a large range. For IPv4, setting a limit of |
| 4978 |
half the number of bits avoids such errors, and allows entire ISPs to be |
| 4979 |
blocked using a small number of range blocks. |
| 4980 |
For IPv6, RFC 3177 recommends that a /48 be allocated to every residential |
| 4981 |
customer, so range blocks larger than /64 (half the number of bits) will |
| 4982 |
plainly be required. RFC 4692 implies that a very large ISP may be |
| 4983 |
allocated a /19 if a generous HD-Ratio of 0.8 is used, so we will use that |
| 4984 |
as our limit. As of 2012, blocking the whole world would require a /4 range. |
| 4985 |
BlockDisablesLogin: |
| 4986 |
default: false |
| 4987 |
description: |- |
| 4988 |
If true, sitewide blocked users will not be allowed to login. (Direct |
| 4989 |
blocks only; IP blocks are ignored.) This can be used to remove users' |
| 4990 |
read access on a private wiki. |
| 4991 |
EnablePartialActionBlocks: |
| 4992 |
default: false |
| 4993 |
type: boolean |
| 4994 |
description: |- |
| 4995 |
Flag to enable partial blocks against performing certain actions. |
| 4996 |
@unstable Temporary feature flag, T280532 |
| 4997 |
@since 1.37 |
| 4998 |
EnableMultiBlocks: |
| 4999 |
default: false |
| 5000 |
type: boolean |
| 5001 |
description: |- |
| 5002 |
If this is false, the number of blocks of a given target is limited to only 1. |
| 5003 |
@since 1.42 |
| 5004 |
BlockTargetMigrationStage: |
| 5005 |
default: 768 |
| 5006 |
type: integer |
| 5007 |
description: |4- |
| 5008 |
Ipblocks table schema migration stage, for normalizing ipb_address field and |
| 5009 |
adding the block_target table. |
| 5010 |
Use the SCHEMA_COMPAT_XXX flags. Supported values: |
| 5011 |
- SCHEMA_COMPAT_OLD |
| 5012 |
- SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD |
| 5013 |
- SCHEMA_COMPAT_NEW |
| 5014 |
History: |
| 5015 |
- 1.42: Added |
| 5016 |
- 1.43: Default changed from SCHEMA_COMPAT_OLD to SCHEMA_COMPAT_NEW |
| 5017 |
- 1.43: Deprecated, ignored, SCHEMA_COMPAT_NEW is implied |
| 5018 |
@deprecated since 1.43 |
| 5019 |
WhitelistRead: |
| 5020 |
default: false |
| 5021 |
description: |- |
| 5022 |
Pages anonymous user may see, set as an array of pages titles. |
| 5023 |
**Example:** |
| 5024 |
``` |
| 5025 |
$wgWhitelistRead = [ "Main Page", "Wikipedia:Help" ]; |
| 5026 |
``` |
| 5027 |
Special:Userlogin and Special:ChangePassword are always allowed. |
| 5028 |
@note This will only work if $wgGroupPermissions['*']['read'] is false -- |
| 5029 |
see below. Otherwise, ALL pages are accessible, regardless of this setting. |
| 5030 |
@note Also that this will only protect _pages in the wiki_. Uploaded files |
| 5031 |
will remain readable. You can use img_auth.php to protect uploaded files, |
| 5032 |
see https://www.mediawiki.org/wiki/Manual:Image_Authorization |
| 5033 |
@note Extensions should not modify this, but use the TitleReadWhitelist |
| 5034 |
hook instead. |
| 5035 |
WhitelistReadRegexp: |
| 5036 |
default: false |
| 5037 |
description: |- |
| 5038 |
Pages anonymous user may see, set as an array of regular expressions. |
| 5039 |
This function will match the regexp against the title name, which |
| 5040 |
is without underscore. |
| 5041 |
**Example:** |
| 5042 |
To whitelist [[Main Page]]: |
| 5043 |
``` |
| 5044 |
$wgWhitelistReadRegexp = [ "/Main Page/" ]; |
| 5045 |
``` |
| 5046 |
@note Unless ^ and/or $ is specified, a regular expression might match |
| 5047 |
pages not intended to be allowed. The above example will also |
| 5048 |
allow a page named 'Security Main Page'. |
| 5049 |
**Example:** |
| 5050 |
To allow reading any page starting with 'User' regardless of the case: |
| 5051 |
``` |
| 5052 |
$wgWhitelistReadRegexp = [ "@^UsEr.*@i" ]; |
| 5053 |
``` |
| 5054 |
Will allow both [[User is banned]] and [[User:JohnDoe]] |
| 5055 |
@note This will only work if $wgGroupPermissions['*']['read'] is false -- |
| 5056 |
see below. Otherwise, ALL pages are accessible, regardless of this setting. |
| 5057 |
EmailConfirmToEdit: |
| 5058 |
default: false |
| 5059 |
description: |- |
| 5060 |
Should editors be required to have a validated e-mail |
| 5061 |
address before being allowed to edit? |
| 5062 |
HideIdentifiableRedirects: |
| 5063 |
default: true |
| 5064 |
description: |- |
| 5065 |
Should MediaWiki attempt to protect user's privacy when doing redirects? |
| 5066 |
Keep this true if access counts to articles are made public. |
| 5067 |
GroupPermissions: |
| 5068 |
type: object |
| 5069 |
additionalProperties: |
| 5070 |
type: object |
| 5071 |
additionalProperties: { type: boolean } |
| 5072 |
mergeStrategy: array_plus_2d |
| 5073 |
default: |
| 5074 |
'*': { createaccount: true, read: true, edit: true, createpage: true, createtalk: true, viewmyprivateinfo: true, editmyprivateinfo: true, editmyoptions: true } |
| 5075 |
user: { move: true, move-subpages: true, move-rootuserpages: true, move-categorypages: true, movefile: true, read: true, edit: true, createpage: true, createtalk: 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 } |
| 5076 |
autoconfirmed: { autoconfirmed: true, editsemiprotected: true } |
| 5077 |
bot: { bot: true, autoconfirmed: true, editsemiprotected: true, nominornewtalk: true, autopatrol: true, suppressredirect: true, apihighlimits: true } |
| 5078 |
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 } |
| 5079 |
interface-admin: { editinterface: true, editsitecss: true, editsitejson: true, editsitejs: true, editusercss: true, edituserjson: true, edituserjs: true } |
| 5080 |
bureaucrat: { userrights: true, noratelimit: true, renameuser: true } |
| 5081 |
suppress: { hideuser: true, suppressrevision: true, viewsuppressed: true, suppressionlog: true, deleterevision: true, deletelogentry: true } |
| 5082 |
description: |- |
| 5083 |
Permission keys given to users in each group. |
| 5084 |
This is an array where the keys are all groups and each value is an |
| 5085 |
array of the format (right => boolean). |
| 5086 |
The second format is used to support per-namespace permissions. |
| 5087 |
Note that this feature does not fully work for all permission types. |
| 5088 |
All users are implicitly in the '*' group including anonymous visitors; |
| 5089 |
logged-in users are all implicitly in the 'user' group. These will be |
| 5090 |
combined with the permissions of all groups that a given user is listed |
| 5091 |
in the user_groups table. |
| 5092 |
Note: Don't set $wgGroupPermissions = []; unless you know what you're |
| 5093 |
doing! This will wipe all permissions, and may mean that your users are |
| 5094 |
unable to perform certain essential tasks or access new functionality |
| 5095 |
when new permissions are introduced and default grants established. |
| 5096 |
Functionality to make pages inaccessible has not been extensively tested |
| 5097 |
for security. Use at your own risk! |
| 5098 |
This replaces $wgWhitelistAccount and $wgWhitelistEdit |
| 5099 |
PrivilegedGroups: |
| 5100 |
default: |
| 5101 |
- bureaucrat |
| 5102 |
- interface-admin |
| 5103 |
- suppress |
| 5104 |
- sysop |
| 5105 |
type: array |
| 5106 |
description: |- |
| 5107 |
List of groups which should be considered privileged (user accounts |
| 5108 |
belonging in these groups can be abused in dangerous ways). |
| 5109 |
This is used for some security checks, mainly logging. |
| 5110 |
@since 1.41 |
| 5111 |
@see \MediaWiki\User\UserGroupManager::getUserPrivilegedGroups() |
| 5112 |
RevokePermissions: |
| 5113 |
default: { } |
| 5114 |
type: object |
| 5115 |
mergeStrategy: array_plus_2d |
| 5116 |
description: |- |
| 5117 |
Permission keys revoked from users in each group. |
| 5118 |
This acts the same way as $wgGroupPermissions above, except that |
| 5119 |
if the user is in a group here, the permission will be removed from them. |
| 5120 |
Improperly setting this could mean that your users will be unable to perform |
| 5121 |
certain essential tasks, so use at your own risk! |
| 5122 |
GroupInheritsPermissions: |
| 5123 |
default: { } |
| 5124 |
type: object |
| 5125 |
additionalProperties: |
| 5126 |
type: string |
| 5127 |
description: |- |
| 5128 |
Groups that should inherit permissions from another group |
| 5129 |
This allows defining a group that inherits its permissions |
| 5130 |
from another group without having to copy all the permission |
| 5131 |
grants over. For example, if you wanted a manual "confirmed" |
| 5132 |
group that had the same permissions as "autoconfirmed": |
| 5133 |
``` |
| 5134 |
$wgGroupInheritsPermissions['confirmed'] = 'autoconfirmed'; |
| 5135 |
``` |
| 5136 |
Recursive inheritance is currently not supported. In the above |
| 5137 |
example, confirmed will only gain the permissions explicitly |
| 5138 |
granted (or revoked) from autoconfirmed, not any permissions |
| 5139 |
that autoconfirmed might inherit. |
| 5140 |
@since 1.38 |
| 5141 |
ImplicitGroups: |
| 5142 |
default: |
| 5143 |
- '*' |
| 5144 |
- user |
| 5145 |
- autoconfirmed |
| 5146 |
type: array |
| 5147 |
description: 'Implicit groups, aren''t shown on Special:Listusers or somewhere else' |
| 5148 |
GroupsAddToSelf: |
| 5149 |
default: { } |
| 5150 |
type: object |
| 5151 |
description: |- |
| 5152 |
A map of group names that the user is in, to group names that those users |
| 5153 |
are allowed to add or revoke. |
| 5154 |
Setting the list of groups to add or revoke to true is equivalent to "any |
| 5155 |
group". |
| 5156 |
**Example:** |
| 5157 |
To allow sysops to add themselves to the "bot" group: |
| 5158 |
``` |
| 5159 |
$wgGroupsAddToSelf = [ 'sysop' => [ 'bot' ] ]; |
| 5160 |
``` |
| 5161 |
**Example:** |
| 5162 |
Implicit groups may be used for the source group, for instance: |
| 5163 |
``` |
| 5164 |
$wgGroupsRemoveFromSelf = [ '*' => true ]; |
| 5165 |
``` |
| 5166 |
This allows users in the '*' group (i.e. any user) to remove themselves from |
| 5167 |
any group that they happen to be in. |
| 5168 |
GroupsRemoveFromSelf: |
| 5169 |
default: { } |
| 5170 |
type: object |
| 5171 |
description: '@see self::GroupsAddToSelf' |
| 5172 |
RestrictionTypes: |
| 5173 |
default: |
| 5174 |
- create |
| 5175 |
- edit |
| 5176 |
- move |
| 5177 |
- upload |
| 5178 |
type: array |
| 5179 |
description: |- |
| 5180 |
Set of available actions that can be restricted via action=protect |
| 5181 |
You probably shouldn't change this. |
| 5182 |
Translated through restriction-* messages. |
| 5183 |
RestrictionStore::listApplicableRestrictionTypes() will remove restrictions that are not |
| 5184 |
applicable to a specific title (create and upload) |
| 5185 |
RestrictionLevels: |
| 5186 |
default: |
| 5187 |
- '' |
| 5188 |
- autoconfirmed |
| 5189 |
- sysop |
| 5190 |
type: array |
| 5191 |
description: |- |
| 5192 |
Rights which can be required for each protection level (via action=protect) |
| 5193 |
You can add a new protection level that requires a specific |
| 5194 |
permission by manipulating this array. The ordering of elements |
| 5195 |
dictates the order on the protection form's lists. |
| 5196 |
- '' will be ignored (i.e. unprotected) |
| 5197 |
- 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility |
| 5198 |
- 'sysop' is quietly rewritten to 'editprotected' for backwards compatibility |
| 5199 |
CascadingRestrictionLevels: |
| 5200 |
default: |
| 5201 |
- sysop |
| 5202 |
type: array |
| 5203 |
description: |- |
| 5204 |
Restriction levels that can be used with cascading protection |
| 5205 |
A page can only be protected with cascading protection if the |
| 5206 |
requested restriction level is included in this array. |
| 5207 |
'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility. |
| 5208 |
'sysop' is quietly rewritten to 'editprotected' for backwards compatibility. |
| 5209 |
SemiprotectedRestrictionLevels: |
| 5210 |
default: |
| 5211 |
- autoconfirmed |
| 5212 |
type: array |
| 5213 |
description: |- |
| 5214 |
Restriction levels that should be considered "semiprotected" |
| 5215 |
Certain places in the interface recognize a dichotomy between "protected" |
| 5216 |
and "semiprotected", without further distinguishing the specific levels. In |
| 5217 |
general, if anyone can be eligible to edit a protection level merely by |
| 5218 |
reaching some condition in $wgAutopromote, it should probably be considered |
| 5219 |
"semiprotected". |
| 5220 |
'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility. |
| 5221 |
'sysop' is not changed, since it really shouldn't be here. |
| 5222 |
NamespaceProtection: |
| 5223 |
default: { } |
| 5224 |
type: object |
| 5225 |
description: |- |
| 5226 |
Set the minimum permissions required to edit pages in each |
| 5227 |
namespace. If you list more than one permission, a user must |
| 5228 |
have all of them to edit pages in that namespace. |
| 5229 |
@note NS_MEDIAWIKI is implicitly restricted to 'editinterface'. |
| 5230 |
NonincludableNamespaces: |
| 5231 |
default: { } |
| 5232 |
type: object |
| 5233 |
description: |- |
| 5234 |
Pages in namespaces in this array can not be used as templates. |
| 5235 |
Elements MUST be numeric namespace ids, you can safely use the MediaWiki |
| 5236 |
namespaces constants (NS_USER, NS_MAIN...). |
| 5237 |
Among other things, this may be useful to enforce read-restrictions |
| 5238 |
which may otherwise be bypassed by using the template mechanism. |
| 5239 |
AutoConfirmAge: |
| 5240 |
default: 0 |
| 5241 |
description: |- |
| 5242 |
Number of seconds an account is required to age before it's given the |
| 5243 |
implicit 'autoconfirm' group membership. This can be used to limit |
| 5244 |
privileges of new accounts. |
| 5245 |
Accounts created by earlier versions of the software may not have a |
| 5246 |
recorded creation date, and will always be considered to pass the age test. |
| 5247 |
When left at 0, all registered accounts will pass. |
| 5248 |
**Example:** |
| 5249 |
Set automatic confirmation to 10 minutes (which is 600 seconds): |
| 5250 |
``` |
| 5251 |
$wgAutoConfirmAge = 600; // ten minutes |
| 5252 |
``` |
| 5253 |
Set age to one day: |
| 5254 |
``` |
| 5255 |
$wgAutoConfirmAge = 3600*24; // one day |
| 5256 |
``` |
| 5257 |
AutoConfirmCount: |
| 5258 |
default: 0 |
| 5259 |
description: |- |
| 5260 |
Number of edits an account requires before it is autoconfirmed. |
| 5261 |
Passing both this AND the time requirement is needed. Example: |
| 5262 |
**Example:** |
| 5263 |
``` |
| 5264 |
$wgAutoConfirmCount = 50; |
| 5265 |
``` |
| 5266 |
Autopromote: |
| 5267 |
default: |
| 5268 |
autoconfirmed: ['&', [1, null], [2, null]] |
| 5269 |
type: object |
| 5270 |
description: |- |
| 5271 |
Array containing the conditions of automatic promotion of a user to specific groups. |
| 5272 |
The basic syntax for `$wgAutopromote` is: |
| 5273 |
$wgAutopromote = [ |
| 5274 |
'groupname' => cond, |
| 5275 |
'group2' => cond2, |
| 5276 |
]; |
| 5277 |
A `cond` may be: |
| 5278 |
- a single condition without arguments: |
| 5279 |
Note that Autopromote wraps a single non-array value into an array |
| 5280 |
e.g. `APCOND_EMAILCONFIRMED` OR |
| 5281 |
[ `APCOND_EMAILCONFIRMED` ] |
| 5282 |
- a single condition with arguments: |
| 5283 |
e.g. `[ APCOND_EDITCOUNT, 100 ]` |
| 5284 |
- a set of conditions: |
| 5285 |
e.g. `[ 'operand', cond1, cond2, ... ]` |
| 5286 |
When constructing a set of conditions, the following conditions are available: |
| 5287 |
- `&` (**AND**): |
| 5288 |
promote if user matches **ALL** conditions |
| 5289 |
- `|` (**OR**): |
| 5290 |
promote if user matches **ANY** condition |
| 5291 |
- `^` (**XOR**): |
| 5292 |
promote if user matches **ONLY ONE OF THE CONDITIONS** |
| 5293 |
- `!` (**NOT**): |
| 5294 |
promote if user matces **NO** condition |
| 5295 |
- [ APCOND_EMAILCONFIRMED ]: |
| 5296 |
true if user has a confirmed e-mail |
| 5297 |
- [ APCOND_EDITCOUNT, number of edits (if null or missing $wgAutoConfirmCount will be used)]: |
| 5298 |
true if user has the at least the number of edits as the passed parameter |
| 5299 |
- [ APCOND_AGE, seconds since registration (if null or missing $wgAutoConfirmAge will be used)]: |
| 5300 |
true if the length of time since the user created his/her account |
| 5301 |
is at least the same length of time as the passed parameter |
| 5302 |
- [ APCOND_AGE_FROM_EDIT, seconds since first edit ]: |
| 5303 |
true if the length of time since the user made his/her first edit |
| 5304 |
is at least the same length of time as the passed parameter |
| 5305 |
- [ APCOND_INGROUPS, group1, group2, ... ]: |
| 5306 |
true if the user is a member of each of the passed groups |
| 5307 |
- [ APCOND_ISIP, ip ]: |
| 5308 |
true if the user has the passed IP address |
| 5309 |
- [ APCOND_IPINRANGE, range ]: |
| 5310 |
true if the user has an IP address in the range of the passed parameter |
| 5311 |
- [ APCOND_BLOCKED ]: |
| 5312 |
true if the user is sitewide blocked |
| 5313 |
- [ APCOND_ISBOT ]: |
| 5314 |
true if the user is a bot |
| 5315 |
- similar constructs can be defined by extensions |
| 5316 |
The sets of conditions are evaluated recursively, so you can use nested sets of conditions |
| 5317 |
linked by operands. |
| 5318 |
Note that if $wgEmailAuthentication is disabled, APCOND_EMAILCONFIRMED will be true for any |
| 5319 |
user who has provided an e-mail address. |
| 5320 |
AutopromoteOnce: |
| 5321 |
default: |
| 5322 |
onEdit: [] |
| 5323 |
type: object |
| 5324 |
description: |- |
| 5325 |
Automatically add a usergroup to any user who matches certain conditions. |
| 5326 |
Does not add the user to the group again if it has been removed. |
| 5327 |
Also, does not remove the group if the user no longer meets the criteria. |
| 5328 |
The format is: |
| 5329 |
``` |
| 5330 |
[ event => criteria, ... ] |
| 5331 |
``` |
| 5332 |
The only recognised value for event is 'onEdit' (when the user edits). |
| 5333 |
Criteria has the same format as $wgAutopromote |
| 5334 |
@see self::Autopromote |
| 5335 |
@since 1.18 |
| 5336 |
AutopromoteOnceLogInRC: |
| 5337 |
default: true |
| 5338 |
description: |- |
| 5339 |
Put user rights log entries for autopromotion in recent changes? |
| 5340 |
@since 1.18 |
| 5341 |
AddGroups: |
| 5342 |
default: { } |
| 5343 |
type: object |
| 5344 |
description: |- |
| 5345 |
$wgAddGroups and $wgRemoveGroups can be used to give finer control over who |
| 5346 |
can assign which groups at Special:Userrights. |
| 5347 |
**Example:** |
| 5348 |
Bureaucrats can add any group: |
| 5349 |
``` |
| 5350 |
$wgAddGroups['bureaucrat'] = true; |
| 5351 |
``` |
| 5352 |
Bureaucrats can only remove bots and sysops: |
| 5353 |
``` |
| 5354 |
$wgRemoveGroups['bureaucrat'] = [ 'bot', 'sysop' ]; |
| 5355 |
``` |
| 5356 |
Sysops can make bots: |
| 5357 |
``` |
| 5358 |
$wgAddGroups['sysop'] = [ 'bot' ]; |
| 5359 |
``` |
| 5360 |
Sysops can disable other sysops in an emergency, and disable bots: |
| 5361 |
``` |
| 5362 |
$wgRemoveGroups['sysop'] = [ 'sysop', 'bot' ]; |
| 5363 |
``` |
| 5364 |
RemoveGroups: |
| 5365 |
default: { } |
| 5366 |
type: object |
| 5367 |
description: '@see self::AddGroups' |
| 5368 |
AvailableRights: |
| 5369 |
default: [] |
| 5370 |
type: array |
| 5371 |
items: |
| 5372 |
type: string |
| 5373 |
description: |- |
| 5374 |
A list of available rights, in addition to the ones defined by the core. |
| 5375 |
Rights in this list are denied unless explicitly granted, typically |
| 5376 |
using GroupPermissions. |
| 5377 |
For extensions only. |
| 5378 |
@see self::GroupPermissions |
| 5379 |
@see self::ImplicitRights |
| 5380 |
ImplicitRights: |
| 5381 |
default: [] |
| 5382 |
type: array |
| 5383 |
items: |
| 5384 |
type: string |
| 5385 |
description: |- |
| 5386 |
A list of implicit rights, in addition to the ones defined by the core. |
| 5387 |
Rights in this list are granted implicitly to all users, but rate limits |
| 5388 |
may apply to them. |
| 5389 |
Extensions that define rate limits should add the corresponding right to |
| 5390 |
either ImplicitRights or AvailableRights, depending on whether the right |
| 5391 |
should be granted to everyone. |
| 5392 |
@since 1.41 |
| 5393 |
@see self::RateLimits |
| 5394 |
@see self::AvailableRights |
| 5395 |
DeleteRevisionsLimit: |
| 5396 |
default: 0 |
| 5397 |
description: |- |
| 5398 |
Optional to restrict deletion of pages with higher revision counts |
| 5399 |
to users with the 'bigdelete' permission. (Default given to sysops.) |
| 5400 |
DeleteRevisionsBatchSize: |
| 5401 |
default: 1000 |
| 5402 |
description: |- |
| 5403 |
Page deletions with > this number of revisions will use the job queue. |
| 5404 |
Revisions will be archived in batches of (at most) this size, one batch per job. |
| 5405 |
HideUserContribLimit: |
| 5406 |
default: 1000 |
| 5407 |
description: |- |
| 5408 |
The maximum number of edits a user can have and |
| 5409 |
can still be hidden by users with the hideuser permission. |
| 5410 |
This is limited for performance reason. |
| 5411 |
Set to false to disable the limit. |
| 5412 |
@since 1.23 |
| 5413 |
AccountCreationThrottle: |
| 5414 |
default: |
| 5415 |
- { count: 0, seconds: 86400 } |
| 5416 |
type: |
| 5417 |
- integer |
| 5418 |
- array |
| 5419 |
description: |- |
| 5420 |
Number of accounts each IP address may create per specified period(s). |
| 5421 |
**Example:** |
| 5422 |
``` |
| 5423 |
$wgAccountCreationThrottle = [ |
| 5424 |
// no more than 100 per month |
| 5425 |
[ |
| 5426 |
'count' => 100, |
| 5427 |
'seconds' => 30*86400, |
| 5428 |
], |
| 5429 |
// no more than 10 per day |
| 5430 |
[ |
| 5431 |
'count' => 10, |
| 5432 |
'seconds' => 86400, |
| 5433 |
], |
| 5434 |
]; |
| 5435 |
``` |
| 5436 |
@note For backwards compatibility reasons, this may also be given as a single |
| 5437 |
integer, representing the number of account creations per day. |
| 5438 |
@see self::TempAccountCreationThrottle for the temporary accounts version of |
| 5439 |
this throttle |
| 5440 |
@warning Requires $wgMainCacheType to be enabled |
| 5441 |
TempAccountCreationThrottle: |
| 5442 |
default: |
| 5443 |
- { count: 6, seconds: 86400 } |
| 5444 |
type: array |
| 5445 |
description: |- |
| 5446 |
Number of temporary accounts each IP address may create per specified period(s). |
| 5447 |
**Example:** |
| 5448 |
``` |
| 5449 |
$wgTempAccountCreationThrottle = [ |
| 5450 |
// no more than 100 per month |
| 5451 |
[ |
| 5452 |
'count' => 100, |
| 5453 |
'seconds' => 30*86400, |
| 5454 |
], |
| 5455 |
// no more than 6 per day |
| 5456 |
[ |
| 5457 |
'count' => 6, |
| 5458 |
'seconds' => 86400, |
| 5459 |
], |
| 5460 |
]; |
| 5461 |
``` |
| 5462 |
@see self::AccountCreationThrottle for the regular account version of this throttle. |
| 5463 |
@warning Requires $wgMainCacheType to be enabled |
| 5464 |
@since 1.42 |
| 5465 |
TempAccountNameAcquisitionThrottle: |
| 5466 |
default: |
| 5467 |
- { count: 60, seconds: 86400 } |
| 5468 |
type: array |
| 5469 |
description: |- |
| 5470 |
Number of temporary accounts usernames each IP address may acquire per specified period(s). |
| 5471 |
This should be set to a higher value than TempAccountCreationThrottle. |
| 5472 |
On editing, we first attempt to acquire a temp username before proceeding with saving an edit |
| 5473 |
and potentially creating a temp account if the edit save is successful. |
| 5474 |
Some edits may fail (due to core or extensions denying an edit); this throttle ensures that |
| 5475 |
there are limits to the number of temporary account names that can be acquired and stored in |
| 5476 |
the database. |
| 5477 |
**Example:** |
| 5478 |
``` |
| 5479 |
$wgTempAccountNameAcquisitionThrottle = [ |
| 5480 |
// no more than 100 per month |
| 5481 |
[ |
| 5482 |
'count' => 100, |
| 5483 |
'seconds' => 30*86400, |
| 5484 |
], |
| 5485 |
// no more than 60 per day |
| 5486 |
[ |
| 5487 |
'count' => 60, |
| 5488 |
'seconds' => 86400, |
| 5489 |
], |
| 5490 |
]; |
| 5491 |
``` |
| 5492 |
@see self::TempAccountCreationThrottle Make sure that TempAccountNameAcquisitionThrottle is greater than or |
| 5493 |
equal to TempAccountCreationThrottle |
| 5494 |
@warning Requires $wgMainCacheType to be enabled |
| 5495 |
@since 1.42 |
| 5496 |
SpamRegex: |
| 5497 |
default: [] |
| 5498 |
type: array |
| 5499 |
description: |- |
| 5500 |
Edits matching these regular expressions in body text |
| 5501 |
will be recognised as spam and rejected automatically. |
| 5502 |
There's no administrator override on-wiki, so be careful what you set. :) |
| 5503 |
May be an array of regexes or a single string for backwards compatibility. |
| 5504 |
@see https://en.wikipedia.org/wiki/Regular_expression |
| 5505 |
@note Each regex needs a beginning/end delimiter, eg: # or / |
| 5506 |
SummarySpamRegex: |
| 5507 |
default: [] |
| 5508 |
type: array |
| 5509 |
description: 'Same as SpamRegex except for edit summaries' |
| 5510 |
EnableDnsBlacklist: |
| 5511 |
default: false |
| 5512 |
description: |- |
| 5513 |
Whether to use DNS blacklists in $wgDnsBlacklistUrls to check for open |
| 5514 |
proxies |
| 5515 |
@since 1.16 |
| 5516 |
DnsBlacklistUrls: |
| 5517 |
default: [] |
| 5518 |
type: array |
| 5519 |
description: |- |
| 5520 |
List of DNS blacklists to use, if $wgEnableDnsBlacklist is true. |
| 5521 |
This is an array of either a URL or an array with the URL and a key (should |
| 5522 |
the blacklist require a key). |
| 5523 |
**Example:** |
| 5524 |
``` |
| 5525 |
$wgDnsBlacklistUrls = [ |
| 5526 |
// String containing URL |
| 5527 |
'http.dnsbl.sorbs.net.', |
| 5528 |
// Array with URL and key, for services that require a key |
| 5529 |
[ 'dnsbl.httpbl.net.', 'mykey' ], |
| 5530 |
// Array with just the URL. While this works, it is recommended that you |
| 5531 |
// just use a string as shown above |
| 5532 |
[ 'opm.tornevall.org.' ] |
| 5533 |
]; |
| 5534 |
``` |
| 5535 |
@note You should end the domain name with a . to avoid searching your |
| 5536 |
eventual domain search suffixes. |
| 5537 |
@since 1.16 |
| 5538 |
ProxyList: |
| 5539 |
default: [] |
| 5540 |
type: |
| 5541 |
- string |
| 5542 |
- array |
| 5543 |
description: |- |
| 5544 |
List of banned IP addresses. |
| 5545 |
This can have the following formats: |
| 5546 |
- An array of addresses |
| 5547 |
- A string, in which case this is the path to a file |
| 5548 |
containing the list of IP addresses, one per line |
| 5549 |
ProxyWhitelist: |
| 5550 |
default: [] |
| 5551 |
type: array |
| 5552 |
description: |- |
| 5553 |
Proxy whitelist, list of addresses that are assumed to be non-proxy despite |
| 5554 |
what the other methods might say. |
| 5555 |
SoftBlockRanges: |
| 5556 |
default: [] |
| 5557 |
type: array |
| 5558 |
items: |
| 5559 |
type: string |
| 5560 |
description: |- |
| 5561 |
IP ranges that should be considered soft-blocked (anon-only, account |
| 5562 |
creation allowed). The intent is to use this to prevent anonymous edits from |
| 5563 |
shared resources such as Wikimedia Labs. |
| 5564 |
@since 1.29 |
| 5565 |
ApplyIpBlocksToXff: |
| 5566 |
default: false |
| 5567 |
description: |- |
| 5568 |
Whether to look at the X-Forwarded-For header's list of (potentially spoofed) |
| 5569 |
IPs and apply IP blocks to them. This allows for IP blocks to work with correctly-configured |
| 5570 |
(transparent) proxies without needing to block the proxies themselves. |
| 5571 |
RateLimits: |
| 5572 |
default: |
| 5573 |
edit: { ip: [8, 60], newbie: [8, 60], user: [90, 60] } |
| 5574 |
move: { newbie: [2, 120], user: [8, 60] } |
| 5575 |
upload: { ip: [8, 60], newbie: [8, 60] } |
| 5576 |
rollback: { user: [10, 60], newbie: [5, 120] } |
| 5577 |
mailpassword: { ip: [5, 3600] } |
| 5578 |
sendemail: { ip: [5, 86400], newbie: [5, 86400], user: [20, 86400] } |
| 5579 |
changeemail: { ip-all: [10, 3600], user: [4, 86400] } |
| 5580 |
confirmemail: { ip-all: [10, 3600], user: [4, 86400] } |
| 5581 |
purge: { ip: [30, 60], user: [30, 60] } |
| 5582 |
linkpurge: { ip: [30, 60], user: [30, 60] } |
| 5583 |
renderfile: { ip: [700, 30], user: [700, 30] } |
| 5584 |
renderfile-nonstandard: { ip: [70, 30], user: [70, 30] } |
| 5585 |
stashedit: { ip: [30, 60], newbie: [30, 60] } |
| 5586 |
stashbasehtml: { ip: [5, 60], newbie: [5, 60] } |
| 5587 |
changetags: { ip: [8, 60], newbie: [8, 60] } |
| 5588 |
editcontentmodel: { newbie: [2, 120], user: [8, 60] } |
| 5589 |
type: object |
| 5590 |
mergeStrategy: array_plus_2d |
| 5591 |
description: |- |
| 5592 |
Simple rate limiter options to brake edit floods. |
| 5593 |
Maximum number actions allowed in the given number of seconds; after that |
| 5594 |
the violating client receives HTTP 500 error pages until the period |
| 5595 |
elapses. |
| 5596 |
**Example:** |
| 5597 |
Limits per configured per action and then type of users. |
| 5598 |
``` |
| 5599 |
$wgRateLimits = [ |
| 5600 |
'edit' => [ |
| 5601 |
'anon' => [ x, y ], // any and all anonymous edits (aggregate) |
| 5602 |
'user' => [ x, y ], // each logged-in user |
| 5603 |
'user-global' => [ x, y ], // per username, across all sites (assumes names are |
| 5604 |
global) |
| 5605 |
'newbie' => [ x, y ], // each new autoconfirmed accounts; overrides 'user' |
| 5606 |
'ip' => [ x, y ], // each anon and recent account, across all sites |
| 5607 |
'subnet' => [ x, y ], // ... within a /24 subnet in IPv4 or /64 in IPv6 |
| 5608 |
'ip-all' => [ x, y ], // per ip, across all sites |
| 5609 |
'subnet-all' => [ x, y ], // ... within a /24 subnet in IPv4 or /64 in IPv6 |
| 5610 |
'groupName' => [ x, y ], // by group membership |
| 5611 |
] |
| 5612 |
]; |
| 5613 |
``` |
| 5614 |
**Normally, the 'noratelimit' right allows a user to bypass any rate** |
| 5615 |
limit checks. This can be disabled on a per-action basis by setting the |
| 5616 |
special '&can-bypass' key to false in that action's configuration. |
| 5617 |
``` |
| 5618 |
$wgRateLimits = [ |
| 5619 |
'some-action' => [ |
| 5620 |
'&can-bypass' => false, |
| 5621 |
'user' => [ x, y ], |
| 5622 |
]; |
| 5623 |
``` |
| 5624 |
@see self::ImplicitRights |
| 5625 |
@warning Requires that $wgMainCacheType is set to something persistent |
| 5626 |
RateLimitsExcludedIPs: |
| 5627 |
default: [] |
| 5628 |
type: array |
| 5629 |
description: |- |
| 5630 |
Array of IPs / CIDR ranges which should be excluded from rate limits. |
| 5631 |
This may be useful for allowing NAT gateways for conferences, etc. |
| 5632 |
PutIPinRC: |
| 5633 |
default: true |
| 5634 |
description: |- |
| 5635 |
Log IP addresses in the recentchanges table; can be accessed only by |
| 5636 |
extensions (e.g. CheckUser) or a DB admin |
| 5637 |
Used for retroactive autoblocks |
| 5638 |
QueryPageDefaultLimit: |
| 5639 |
default: 50 |
| 5640 |
description: |- |
| 5641 |
Integer defining default number of entries to show on |
| 5642 |
special pages which are query-pages such as Special:Whatlinkshere. |
| 5643 |
PasswordAttemptThrottle: |
| 5644 |
default: |
| 5645 |
- { count: 5, seconds: 300 } |
| 5646 |
- { count: 150, seconds: 172800 } |
| 5647 |
type: array |
| 5648 |
description: |- |
| 5649 |
Limit password attempts to X attempts per Y seconds per IP per account. |
| 5650 |
Value is an array of arrays. Each sub-array must have a key for count |
| 5651 |
(ie count of how many attempts before throttle) and a key for seconds. |
| 5652 |
If the key 'allIPs' (case sensitive) is present, then the limit is |
| 5653 |
just per account instead of per IP per account. |
| 5654 |
@since 1.27 allIps support and multiple limits added in 1.27. Prior |
| 5655 |
to 1.27 this only supported having a single throttle. |
| 5656 |
@warning Requires $wgMainCacheType to be enabled |
| 5657 |
GrantPermissions: |
| 5658 |
default: |
| 5659 |
basic: { autocreateaccount: true, autoconfirmed: true, autopatrol: true, editsemiprotected: true, ipblock-exempt: true, nominornewtalk: true, patrolmarks: true, read: true, unwatchedpages: true } |
| 5660 |
highvolume: { bot: true, apihighlimits: true, noratelimit: true, markbotedits: true } |
| 5661 |
import: { import: true, importupload: true } |
| 5662 |
editpage: { edit: true, minoredit: true, applychangetags: true, changetags: true, editcontentmodel: true, pagelang: true } |
| 5663 |
editprotected: { edit: true, minoredit: true, applychangetags: true, changetags: true, editcontentmodel: true, editprotected: true } |
| 5664 |
editmycssjs: { edit: true, minoredit: true, applychangetags: true, changetags: true, editcontentmodel: true, editmyusercss: true, editmyuserjson: true, editmyuserjs: true } |
| 5665 |
editmyoptions: { editmyoptions: true, editmyuserjson: true } |
| 5666 |
editinterface: { edit: true, minoredit: true, applychangetags: true, changetags: true, editcontentmodel: true, editinterface: true, edituserjson: true, editsitejson: true } |
| 5667 |
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 } |
| 5668 |
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 } |
| 5669 |
uploadfile: { upload: true, reupload-own: true } |
| 5670 |
uploadeditmovefile: { upload: true, reupload-own: true, reupload: true, reupload-shared: true, upload_by_url: true, movefile: true, suppressredirect: true } |
| 5671 |
patrol: { patrol: true } |
| 5672 |
rollback: { rollback: true } |
| 5673 |
blockusers: { block: true, blockemail: true } |
| 5674 |
viewdeleted: { browsearchive: true, deletedhistory: true, deletedtext: true } |
| 5675 |
viewrestrictedlogs: { suppressionlog: true } |
| 5676 |
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 } |
| 5677 |
oversight: { suppressrevision: true, viewsuppressed: true } |
| 5678 |
protect: { edit: true, minoredit: true, applychangetags: true, changetags: true, editcontentmodel: true, editprotected: true, protect: true } |
| 5679 |
viewmywatchlist: { viewmywatchlist: true } |
| 5680 |
editmywatchlist: { editmywatchlist: true } |
| 5681 |
sendemail: { sendemail: true } |
| 5682 |
createaccount: { createaccount: true } |
| 5683 |
privateinfo: { viewmyprivateinfo: true } |
| 5684 |
mergehistory: { mergehistory: true } |
| 5685 |
type: object |
| 5686 |
mergeStrategy: array_plus_2d |
| 5687 |
additionalProperties: |
| 5688 |
type: object |
| 5689 |
additionalProperties: { type: boolean } |
| 5690 |
description: |- |
| 5691 |
Users authorize consumers (like Apps) to act on their behalf but only with |
| 5692 |
a subset of the user's normal account rights (signed off on by the user). |
| 5693 |
The possible rights to grant to a consumer are bundled into groups called |
| 5694 |
"grants". Each grant defines some rights it lets consumers inherit from the |
| 5695 |
account they may act on behalf of. Note that a user granting a right does |
| 5696 |
nothing if that user does not actually have that right to begin with. |
| 5697 |
@since 1.27 |
| 5698 |
GrantPermissionGroups: |
| 5699 |
default: |
| 5700 |
basic: hidden |
| 5701 |
editpage: page-interaction |
| 5702 |
createeditmovepage: page-interaction |
| 5703 |
editprotected: page-interaction |
| 5704 |
patrol: page-interaction |
| 5705 |
uploadfile: file-interaction |
| 5706 |
uploadeditmovefile: file-interaction |
| 5707 |
sendemail: email |
| 5708 |
viewmywatchlist: watchlist-interaction |
| 5709 |
editviewmywatchlist: watchlist-interaction |
| 5710 |
editmycssjs: customization |
| 5711 |
editmyoptions: customization |
| 5712 |
editinterface: administration |
| 5713 |
editsiteconfig: administration |
| 5714 |
rollback: administration |
| 5715 |
blockusers: administration |
| 5716 |
delete: administration |
| 5717 |
viewdeleted: administration |
| 5718 |
viewrestrictedlogs: administration |
| 5719 |
protect: administration |
| 5720 |
oversight: administration |
| 5721 |
createaccount: administration |
| 5722 |
mergehistory: administration |
| 5723 |
import: administration |
| 5724 |
highvolume: high-volume |
| 5725 |
privateinfo: private-information |
| 5726 |
type: object |
| 5727 |
additionalProperties: |
| 5728 |
type: string |
| 5729 |
description: |- |
| 5730 |
Grant groups are used on some user interfaces to display conceptually |
| 5731 |
similar grants together. |
| 5732 |
This configuration value should usually be set by extensions, not |
| 5733 |
site administrators. |
| 5734 |
@see self::GrantPermissions |
| 5735 |
@since 1.27 |
| 5736 |
GrantRiskGroups: |
| 5737 |
default: |
| 5738 |
basic: low |
| 5739 |
editpage: low |
| 5740 |
createeditmovepage: low |
| 5741 |
editprotected: vandalism |
| 5742 |
patrol: low |
| 5743 |
uploadfile: low |
| 5744 |
uploadeditmovefile: low |
| 5745 |
sendemail: security |
| 5746 |
viewmywatchlist: low |
| 5747 |
editviewmywatchlist: low |
| 5748 |
editmycssjs: security |
| 5749 |
editmyoptions: security |
| 5750 |
editinterface: vandalism |
| 5751 |
editsiteconfig: security |
| 5752 |
rollback: low |
| 5753 |
blockusers: vandalism |
| 5754 |
delete: vandalism |
| 5755 |
viewdeleted: vandalism |
| 5756 |
viewrestrictedlogs: security |
| 5757 |
protect: vandalism |
| 5758 |
oversight: security |
| 5759 |
createaccount: low |
| 5760 |
mergehistory: vandalism |
| 5761 |
import: security |
| 5762 |
highvolume: low |
| 5763 |
privateinfo: low |
| 5764 |
type: object |
| 5765 |
description: |- |
| 5766 |
Group grants by risk level. Keys are grant names (i.e. keys from GrantPermissions), |
| 5767 |
values are GrantsInfo::RISK_* constants. |
| 5768 |
Note that this classification is only informative; merely applying 'security' or 'internal' |
| 5769 |
to a grant won't prevent it from being available. It's used to give guidance to users |
| 5770 |
in various interfaces about the riskiness of the various grants. |
| 5771 |
@since 1.42 |
| 5772 |
EnableBotPasswords: |
| 5773 |
default: true |
| 5774 |
type: boolean |
| 5775 |
description: '@since 1.27' |
| 5776 |
BotPasswordsCluster: |
| 5777 |
default: false |
| 5778 |
type: |
| 5779 |
- string |
| 5780 |
- boolean |
| 5781 |
description: |- |
| 5782 |
Cluster for the bot_passwords table |
| 5783 |
@since 1.27 |
| 5784 |
@deprecated since 1.42 Use $wgVirtualDomainsMapping instead. |
| 5785 |
BotPasswordsDatabase: |
| 5786 |
default: false |
| 5787 |
type: |
| 5788 |
- string |
| 5789 |
- boolean |
| 5790 |
description: |- |
| 5791 |
Database name for the bot_passwords table |
| 5792 |
To use a database with a table prefix, set this variable to |
| 5793 |
"{$database}-{$prefix}". |
| 5794 |
@since 1.27 |
| 5795 |
@deprecated since 1.42 Use $wgVirtualDomainsMapping instead. |
| 5796 |
SecretKey: |
| 5797 |
default: false |
| 5798 |
description: 'This should always be customised in LocalSettings.php' |
| 5799 |
AllowUserJs: |
| 5800 |
default: false |
| 5801 |
description: |- |
| 5802 |
Allow user Javascript page? |
| 5803 |
This enables a lot of neat customizations, but may |
| 5804 |
increase security risk to users and server load. |
| 5805 |
AllowUserCss: |
| 5806 |
default: false |
| 5807 |
description: |- |
| 5808 |
Allow user Cascading Style Sheets (CSS)? |
| 5809 |
This enables a lot of neat customizations, but may |
| 5810 |
increase security risk to users and server load. |
| 5811 |
AllowUserCssPrefs: |
| 5812 |
default: true |
| 5813 |
description: |- |
| 5814 |
Allow style-related user-preferences? |
| 5815 |
This controls whether the `editfont` and `underline` preferences |
| 5816 |
are available to users. |
| 5817 |
UseSiteJs: |
| 5818 |
default: true |
| 5819 |
description: 'Use the site''s Javascript page?' |
| 5820 |
UseSiteCss: |
| 5821 |
default: true |
| 5822 |
description: 'Use the site''s Cascading Style Sheets (CSS)?' |
| 5823 |
BreakFrames: |
| 5824 |
default: false |
| 5825 |
description: |- |
| 5826 |
Break out of framesets. This can be used to prevent clickjacking attacks, |
| 5827 |
or to prevent external sites from framing your site with ads. |
| 5828 |
EditPageFrameOptions: |
| 5829 |
default: DENY |
| 5830 |
description: |- |
| 5831 |
The X-Frame-Options header to send on pages sensitive to clickjacking |
| 5832 |
attacks, such as edit pages. This prevents those pages from being displayed |
| 5833 |
in a frame or iframe. The options are: |
| 5834 |
- 'DENY': Do not allow framing. This is recommended for most wikis. |
| 5835 |
- 'SAMEORIGIN': Allow framing by pages on the same domain. This can be used |
| 5836 |
to allow framing within a trusted domain. This is insecure if there |
| 5837 |
is a page on the same domain which allows framing of arbitrary URLs. |
| 5838 |
- false: Allow all framing. This opens up the wiki to XSS attacks and thus |
| 5839 |
full compromise of local user accounts. Private wikis behind a |
| 5840 |
corporate firewall are especially vulnerable. This is not |
| 5841 |
recommended. |
| 5842 |
For extra safety, set $wgBreakFrames = true, to prevent framing on all pages, |
| 5843 |
not just edit pages. |
| 5844 |
ApiFrameOptions: |
| 5845 |
default: DENY |
| 5846 |
description: |- |
| 5847 |
Disallow framing of API pages directly, by setting the X-Frame-Options |
| 5848 |
header. Since the API returns CSRF tokens, allowing the results to be |
| 5849 |
framed can compromise your user's account security. |
| 5850 |
Options are: |
| 5851 |
- 'DENY': Do not allow framing. This is recommended for most wikis. |
| 5852 |
- 'SAMEORIGIN': Allow framing by pages on the same domain. |
| 5853 |
- false: Allow all framing. |
| 5854 |
Note: $wgBreakFrames will override this for human formatted API output. |
| 5855 |
CSPHeader: |
| 5856 |
default: false |
| 5857 |
type: |
| 5858 |
- boolean |
| 5859 |
- object |
| 5860 |
description: |- |
| 5861 |
Controls Content-Security-Policy header |
| 5862 |
@warning May cause slowness on Windows due to slow random number generator. |
| 5863 |
@unstable EXPERIMENTAL |
| 5864 |
@since 1.32 |
| 5865 |
@see https://www.w3.org/TR/CSP2/ |
| 5866 |
CSPReportOnlyHeader: |
| 5867 |
default: false |
| 5868 |
type: |
| 5869 |
- boolean |
| 5870 |
- object |
| 5871 |
description: |- |
| 5872 |
Controls Content-Security-Policy-Report-Only header |
| 5873 |
@since 1.32 |
| 5874 |
CSPFalsePositiveUrls: |
| 5875 |
default: |
| 5876 |
'https://3hub.co': true |
| 5877 |
'https://morepro.info': true |
| 5878 |
'https://p.ato.mx': true |
| 5879 |
'https://s.ato.mx': true |
| 5880 |
'https://adserver.adtech.de': true |
| 5881 |
'https://ums.adtechus.com': true |
| 5882 |
'https://cas.criteo.com': true |
| 5883 |
'https://cat.nl.eu.criteo.com': true |
| 5884 |
'https://atpixel.alephd.com': true |
| 5885 |
'https://rtb.metrigo.com': true |
| 5886 |
'https://d5p.de17a.com': true |
| 5887 |
'https://ad.lkqd.net/vpaid/vpaid.js': true |
| 5888 |
'https://ad.lkqd.net/vpaid/vpaid.js?fusion=1.0': true |
| 5889 |
'https://t.lkqd.net/t': true |
| 5890 |
chrome-extension: true |
| 5891 |
type: object |
| 5892 |
description: |- |
| 5893 |
List of urls which appear often to be triggering CSP reports |
| 5894 |
but do not appear to be caused by actual content, but by client |
| 5895 |
software inserting scripts (i.e. Ad-Ware). |
| 5896 |
List based on results from Wikimedia logs. |
| 5897 |
@since 1.28 |
| 5898 |
AllowCrossOrigin: |
| 5899 |
default: false |
| 5900 |
type: boolean |
| 5901 |
description: |- |
| 5902 |
Allow anonymous cross origin requests to the REST API. |
| 5903 |
This should be disabled for intranet sites (sites behind a firewall). |
| 5904 |
@since 1.36 |
| 5905 |
RestAllowCrossOriginCookieAuth: |
| 5906 |
default: false |
| 5907 |
type: boolean |
| 5908 |
description: |- |
| 5909 |
Allows authenticated cross-origin requests to the REST API with session cookies. |
| 5910 |
With this option enabled, any origin specified in $wgCrossSiteAJAXdomains may send session |
| 5911 |
cookies for authorization in the REST API. |
| 5912 |
There is a performance impact by enabling this option. Therefore, it should be left disabled |
| 5913 |
for most wikis and clients should instead use OAuth to make cross-origin authenticated |
| 5914 |
requests. |
| 5915 |
@see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials |
| 5916 |
@since 1.36 |
| 5917 |
SessionSecret: |
| 5918 |
default: false |
| 5919 |
description: |- |
| 5920 |
Secret for session storage. |
| 5921 |
This should be set in LocalSettings.php, otherwise $wgSecretKey will |
| 5922 |
be used. |
| 5923 |
@since 1.27 |
| 5924 |
EnableUnsafeXsltOption: |
| 5925 |
default: false |
| 5926 |
description: |- |
| 5927 |
Enable the deprecated xslt option in the Action API. |
| 5928 |
This is unsafe and allows users with the editinterface right to perform XSS. |
| 5929 |
@see https://phabricator.wikimedia.org/T401995 |
| 5930 |
CookieExpiration: |
| 5931 |
default: 2592000 |
| 5932 |
description: 'Default cookie lifetime, in seconds. Setting to 0 makes all cookies session-only.' |
| 5933 |
ExtendedLoginCookieExpiration: |
| 5934 |
default: 15552000 |
| 5935 |
description: |- |
| 5936 |
Default login cookie lifetime, in seconds. Setting |
| 5937 |
$wgExtendLoginCookieExpiration to null will use $wgCookieExpiration to |
| 5938 |
calculate the cookie lifetime. As with $wgCookieExpiration, 0 will make |
| 5939 |
login cookies session-only. |
| 5940 |
CookieDomain: |
| 5941 |
default: '' |
| 5942 |
description: |- |
| 5943 |
Set to set an explicit domain on the login cookies eg, "justthis.domain.org" |
| 5944 |
or ".any.subdomain.net" |
| 5945 |
CookiePath: |
| 5946 |
default: / |
| 5947 |
description: |- |
| 5948 |
Set this variable if you want to restrict cookies to a certain path within |
| 5949 |
the domain specified by $wgCookieDomain. |
| 5950 |
CookieSecure: |
| 5951 |
default: detect |
| 5952 |
dynamicDefault: |
| 5953 |
use: [ForceHTTPS] |
| 5954 |
callback: [MediaWiki\MainConfigSchema, getDefaultCookieSecure] |
| 5955 |
description: |- |
| 5956 |
Whether the "secure" flag should be set on the cookie. This can be: |
| 5957 |
- true: Set secure flag |
| 5958 |
- false: Don't set secure flag |
| 5959 |
- "detect": Set the secure flag if $wgServer is set to an HTTPS URL, |
| 5960 |
or if $wgForceHTTPS is true. |
| 5961 |
If $wgForceHTTPS is true, session cookies will be secure regardless of this |
| 5962 |
setting. However, other cookies will still be affected. |
| 5963 |
CookiePrefix: |
| 5964 |
default: false |
| 5965 |
dynamicDefault: |
| 5966 |
use: [SharedDB, SharedPrefix, SharedTables, DBname, DBprefix] |
| 5967 |
callback: [MediaWiki\MainConfigSchema, getDefaultCookiePrefix] |
| 5968 |
description: |- |
| 5969 |
Cookies generated by MediaWiki have names starting with this prefix. Set it |
| 5970 |
to a string to use a custom prefix. Setting it to false causes the database |
| 5971 |
name to be used as a prefix. |
| 5972 |
CookieHttpOnly: |
| 5973 |
default: true |
| 5974 |
description: |- |
| 5975 |
Set authentication cookies to HttpOnly to prevent access by JavaScript, |
| 5976 |
in browsers that support this feature. This can mitigates some classes of |
| 5977 |
XSS attack. |
| 5978 |
CookieSameSite: |
| 5979 |
default: null |
| 5980 |
type: |
| 5981 |
- string |
| 5982 |
- 'null' |
| 5983 |
description: |- |
| 5984 |
The SameSite cookie attribute used for login cookies. This can be "Lax", |
| 5985 |
"Strict", "None" or empty/null to omit the attribute. |
| 5986 |
This only applies to login cookies, since the correct value for other |
| 5987 |
cookies depends on what kind of cookie it is. |
| 5988 |
@since 1.35 |
| 5989 |
CacheVaryCookies: |
| 5990 |
default: [] |
| 5991 |
type: array |
| 5992 |
description: 'A list of cookies that vary the cache (for use by extensions)' |
| 5993 |
SessionName: |
| 5994 |
default: false |
| 5995 |
description: 'Override to customise the session name' |
| 5996 |
CookieSetOnAutoblock: |
| 5997 |
default: true |
| 5998 |
description: |- |
| 5999 |
Whether to set a cookie when a user is autoblocked. Doing so means that a blocked user, even |
| 6000 |
after logging out and moving to a new IP address, will still be blocked. This cookie will |
| 6001 |
contain an authentication code if $wgSecretKey is set, or otherwise will just be the block |
| 6002 |
ID (in which case there is a possibility of an attacker discovering the names of revdeleted |
| 6003 |
users, so it is best to use this in conjunction with $wgSecretKey being set). |
| 6004 |
CookieSetOnIpBlock: |
| 6005 |
default: true |
| 6006 |
description: |- |
| 6007 |
Whether to set a cookie when a logged-out user is blocked. Doing so means that a blocked |
| 6008 |
user, even after moving to a new IP address, will still be blocked. This cookie will contain |
| 6009 |
an authentication code if $wgSecretKey is set, or otherwise will just be the block ID (in |
| 6010 |
which case there is a possibility of an attacker discovering the names of revdeleted users, |
| 6011 |
so it is best to use this in conjunction with $wgSecretKey being set). |
| 6012 |
DebugLogFile: |
| 6013 |
default: '' |
| 6014 |
description: |- |
| 6015 |
Enable verbose debug logging for all channels and log levels. |
| 6016 |
See https://www.mediawiki.org/wiki/How_to_debug |
| 6017 |
For static requests, this enables all channels and warning-level and |
| 6018 |
above only. Use $wgDebugRawPage to make those verbose as well. |
| 6019 |
The debug log file should be not be web-accessible if it is used in |
| 6020 |
a production environment, as may contain private data. |
| 6021 |
DebugLogPrefix: |
| 6022 |
default: '' |
| 6023 |
description: 'Prefix for debug log lines' |
| 6024 |
DebugRedirects: |
| 6025 |
default: false |
| 6026 |
description: |- |
| 6027 |
If true, instead of redirecting, show a page with a link to the redirect |
| 6028 |
destination. This allows for the inspection of PHP error messages, and easy |
| 6029 |
resubmission of form data. For developer use only. |
| 6030 |
DebugRawPage: |
| 6031 |
default: false |
| 6032 |
description: |- |
| 6033 |
If true, debug logging is also enabled for load.php and action=raw requests. |
| 6034 |
By default, $wgDebugLogFile enables all channels and warning-level and |
| 6035 |
above for static requests. |
| 6036 |
This ensures that the debug log is likely a chronological record of |
| 6037 |
of specific web request you are debugging, instead of overlapping with |
| 6038 |
messages from static requests, which would make it unclear which message |
| 6039 |
originated from what request. |
| 6040 |
Also, during development this can make browsing and JavaScript testing |
| 6041 |
considerably slower (T85805). |
| 6042 |
DebugComments: |
| 6043 |
default: false |
| 6044 |
description: |- |
| 6045 |
Send debug data to an HTML comment in the output. |
| 6046 |
This may occasionally be useful when supporting a non-technical end-user. |
| 6047 |
It's more secure than exposing the debug log file to the web, since the |
| 6048 |
output only contains private data for the current user. But it's not ideal |
| 6049 |
for development use since data is lost on fatal errors and redirects. |
| 6050 |
DebugDumpSql: |
| 6051 |
default: false |
| 6052 |
description: |- |
| 6053 |
Write SQL queries to the debug log. |
| 6054 |
This setting is only used $wgLBFactoryConf['class'] is set to |
| 6055 |
'\Wikimedia\Rdbms\LBFactorySimple'; otherwise the DBO_DEBUG flag must be set in |
| 6056 |
the 'flags' option of the database connection to achieve the same functionality. |
| 6057 |
TrxProfilerLimits: |
| 6058 |
default: |
| 6059 |
GET: { masterConns: 0, writes: 0, readQueryTime: 5, readQueryRows: 10000 } |
| 6060 |
POST: { readQueryTime: 5, writeQueryTime: 1, readQueryRows: 100000, maxAffected: 1000 } |
| 6061 |
POST-nonwrite: { writes: 0, readQueryTime: 5, readQueryRows: 10000 } |
| 6062 |
PostSend-GET: { readQueryTime: 5, writeQueryTime: 1, readQueryRows: 10000, maxAffected: 1000, masterConns: 0, writes: 0 } |
| 6063 |
PostSend-POST: { readQueryTime: 5, writeQueryTime: 1, readQueryRows: 100000, maxAffected: 1000 } |
| 6064 |
JobRunner: { readQueryTime: 30, writeQueryTime: 5, readQueryRows: 100000, maxAffected: 500 } |
| 6065 |
Maintenance: { writeQueryTime: 5, maxAffected: 1000 } |
| 6066 |
type: object |
| 6067 |
description: |- |
| 6068 |
Performance expectations for DB usage |
| 6069 |
@since 1.26 |
| 6070 |
DebugLogGroups: |
| 6071 |
default: { } |
| 6072 |
type: object |
| 6073 |
description: |- |
| 6074 |
Map of string log group names to log destinations. |
| 6075 |
If set, wfDebugLog() output for that group will go to that file instead |
| 6076 |
of the regular $wgDebugLogFile. Useful for enabling selective logging |
| 6077 |
in production. |
| 6078 |
Log destinations may be one of the following: |
| 6079 |
- false to completely remove from the output, including from $wgDebugLogFile. |
| 6080 |
- string values specifying a filename or URI. |
| 6081 |
- associative array with keys: |
| 6082 |
- 'destination' desired filename or URI. |
| 6083 |
- 'sample' an integer value, specifying a sampling factor (optional) |
| 6084 |
- 'level' A \Psr\Log\LogLevel constant, indicating the minimum level |
| 6085 |
to log (optional, since 1.25) |
| 6086 |
**Example:** |
| 6087 |
``` |
| 6088 |
$wgDebugLogGroups['redis'] = '/var/log/mediawiki/redis.log'; |
| 6089 |
``` |
| 6090 |
**Advanced example:** |
| 6091 |
``` |
| 6092 |
$wgDebugLogGroups['memcached'] = [ |
| 6093 |
'destination' => '/var/log/mediawiki/memcached.log', |
| 6094 |
'sample' => 1000, // log 1 message out of every 1,000. |
| 6095 |
'level' => \Psr\Log\LogLevel::WARNING |
| 6096 |
]; |
| 6097 |
``` |
| 6098 |
MWLoggerDefaultSpi: |
| 6099 |
default: |
| 6100 |
class: MediaWiki\Logger\LegacySpi |
| 6101 |
mergeStrategy: replace |
| 6102 |
type: object |
| 6103 |
description: |- |
| 6104 |
Default service provider for creating Psr\Log\LoggerInterface instances. |
| 6105 |
The value should be an array suitable for use with |
| 6106 |
ObjectFactory::getObjectFromSpec(). The created object is expected to |
| 6107 |
implement the MediaWiki\Logger\Spi interface. See ObjectFactory for additional |
| 6108 |
details. |
| 6109 |
Alternately the MediaWiki\Logger\LoggerFactory::registerProvider method can |
| 6110 |
be called to inject an MediaWiki\Logger\Spi instance into the LoggerFactory |
| 6111 |
and bypass the use of this configuration variable entirely. |
| 6112 |
**To completely disable logging:** |
| 6113 |
``` |
| 6114 |
$wgMWLoggerDefaultSpi = [ 'class' => \MediaWiki\Logger\NullSpi::class ]; |
| 6115 |
``` |
| 6116 |
@since 1.25 |
| 6117 |
@see \MwLogger |
| 6118 |
ShowDebug: |
| 6119 |
default: false |
| 6120 |
description: |- |
| 6121 |
Display debug data at the bottom of the main content area. |
| 6122 |
Useful for developers and technical users trying to working on a closed wiki. |
| 6123 |
SpecialVersionShowHooks: |
| 6124 |
default: false |
| 6125 |
description: 'Show the contents of $wgHooks in Special:Version' |
| 6126 |
ShowExceptionDetails: |
| 6127 |
default: false |
| 6128 |
description: |- |
| 6129 |
Show exception message and stack trace when printing details about uncaught exceptions |
| 6130 |
in web response output. |
| 6131 |
This may reveal private information in error messages or function parameters. |
| 6132 |
If set to false, only the exception type or class name will be exposed. |
| 6133 |
LogExceptionBacktrace: |
| 6134 |
default: true |
| 6135 |
description: 'If true, send the exception backtrace to the error log' |
| 6136 |
PropagateErrors: |
| 6137 |
default: true |
| 6138 |
description: |- |
| 6139 |
If true, the MediaWiki error handler passes errors/warnings to the default error handler |
| 6140 |
after logging them. The setting is ignored when the track_errors php.ini flag is true. |
| 6141 |
ShowHostnames: |
| 6142 |
default: false |
| 6143 |
description: 'Expose backend server host names through the API and various HTML comments' |
| 6144 |
OverrideHostname: |
| 6145 |
default: false |
| 6146 |
description: |- |
| 6147 |
Override server hostname detection with a hardcoded value. |
| 6148 |
Should be a string, default false. |
| 6149 |
@since 1.20 |
| 6150 |
DevelopmentWarnings: |
| 6151 |
default: false |
| 6152 |
description: |- |
| 6153 |
If set to true MediaWiki will throw notices for some possible error |
| 6154 |
conditions and for deprecated functions. |
| 6155 |
DeprecationReleaseLimit: |
| 6156 |
default: false |
| 6157 |
description: |- |
| 6158 |
Release limitation to wfDeprecated warnings, if set to a release number |
| 6159 |
development warnings will not be generated for deprecations added in releases |
| 6160 |
after the limit. |
| 6161 |
Profiler: |
| 6162 |
default: { } |
| 6163 |
type: object |
| 6164 |
mergeStrategy: replace |
| 6165 |
description: |- |
| 6166 |
Profiler configuration. |
| 6167 |
To use a profiler, set $wgProfiler in LocalSettings.php. |
| 6168 |
Options: |
| 6169 |
- 'class' (`string`): The Profiler subclass to use. |
| 6170 |
Default: ProfilerStub. |
| 6171 |
- 'sampling' (`integer`): Only enable the profiler on one in this many requests. |
| 6172 |
For requests that are not in the sampling, |
| 6173 |
the 'class' option will be replaced with ProfilerStub. |
| 6174 |
Default: `1`. |
| 6175 |
- 'threshold' (`float`): Only process the recorded data if the total elapsed |
| 6176 |
time for a request is more than this number of seconds. |
| 6177 |
Default: `0.0`. |
| 6178 |
- 'output' (`string|string[]`): ProfilerOutput subclass or subclasess to use. |
| 6179 |
Default: `[]`. |
| 6180 |
The options array is passed in its entirety to the specified |
| 6181 |
Profiler `class`. Check individual Profiler subclasses for additional |
| 6182 |
options that may be available. |
| 6183 |
Profiler subclasses available in MediaWiki core: |
| 6184 |
- ProfilerXhprof: Based on XHProf or Tideways-XHProf. |
| 6185 |
- ProfilerExcimer: Based on Excimer. |
| 6186 |
- ProfilerSectionOnly |
| 6187 |
Profiler output classes available in MediaWiki: |
| 6188 |
- ProfilerOutputText: outputs profiling data in the web page body as |
| 6189 |
a comment. You can make the profiling data in HTML render visibly |
| 6190 |
instead by setting the 'visible' configuration flag. |
| 6191 |
- ProfilerOutputStats: outputs profiling data as StatsD metrics. |
| 6192 |
It expects that $wgStatsdServer is set to the host (or host:port) |
| 6193 |
of a statsd server. |
| 6194 |
- ProfilerOutputDump: outputs dump files that are compatible |
| 6195 |
with the XHProf gui. It expects that `$wgProfiler['outputDir']` |
| 6196 |
is set as well. |
| 6197 |
Examples: |
| 6198 |
``` |
| 6199 |
$wgProfiler = [ |
| 6200 |
'class' => ProfilerXhprof::class, |
| 6201 |
'output' => ProfilerOutputText::class, |
| 6202 |
]; |
| 6203 |
``` |
| 6204 |
``` |
| 6205 |
$wgProfiler = [ |
| 6206 |
'class' => ProfilerXhprof::class, |
| 6207 |
'output' => [ ProfilerOutputText::class ], |
| 6208 |
'sampling' => 50, // one in every 50 requests |
| 6209 |
]; |
| 6210 |
``` |
| 6211 |
For performance, the profiler is always disabled for CLI scripts as they |
| 6212 |
could be long running and the data would accumulate. Use the `--profiler` |
| 6213 |
parameter of maintenance scripts to override this. |
| 6214 |
@since 1.17.0 |
| 6215 |
StatsdServer: |
| 6216 |
default: false |
| 6217 |
description: |- |
| 6218 |
Destination of statsd metrics. |
| 6219 |
A host or host:port of a statsd server. Port defaults to 8125. |
| 6220 |
If not set, statsd metrics will not be collected. |
| 6221 |
@see MediaWiki::emitBufferedStatsdData() |
| 6222 |
@since 1.25 |
| 6223 |
StatsdMetricPrefix: |
| 6224 |
default: MediaWiki |
| 6225 |
description: |- |
| 6226 |
Prefix for metric names sent to $wgStatsdServer. |
| 6227 |
@see \MediaWiki\MediaWikiServices::getInstance()->getStatsdDataFactory |
| 6228 |
@see \Wikimedia\Stats\BufferingStatsdDataFactory |
| 6229 |
@since 1.25 |
| 6230 |
StatsTarget: |
| 6231 |
default: null |
| 6232 |
type: |
| 6233 |
- string |
| 6234 |
- 'null' |
| 6235 |
description: |- |
| 6236 |
Stats output target URI e.g. udp://127.0.0.1:8125 |
| 6237 |
If null, metrics will not be sent. |
| 6238 |
Note: this only affects metrics instantiated by the StatsFactory service |
| 6239 |
@since 1.38 |
| 6240 |
StatsFormat: |
| 6241 |
default: null |
| 6242 |
type: |
| 6243 |
- string |
| 6244 |
- 'null' |
| 6245 |
description: |- |
| 6246 |
Stats output format |
| 6247 |
If null, metrics will not be rendered nor sent. |
| 6248 |
Note: this only affects metrics instantiated by the StatsFactory service |
| 6249 |
@see \Wikimedia\Stats\OutputFormats::SUPPORTED_FORMATS |
| 6250 |
@since 1.41 |
| 6251 |
StatsPrefix: |
| 6252 |
default: mediawiki |
| 6253 |
type: string |
| 6254 |
description: |- |
| 6255 |
Stats service name prefix |
| 6256 |
Required. Must not be zero-length. |
| 6257 |
Defaults to: 'mediawiki' |
| 6258 |
Note: this only affects metrics instantiated by the StatsFactory service |
| 6259 |
@since 1.41 |
| 6260 |
OpenTelemetryConfig: |
| 6261 |
default: null |
| 6262 |
type: |
| 6263 |
- object |
| 6264 |
- 'null' |
| 6265 |
description: |- |
| 6266 |
Configuration for OpenTelemetry instrumentation, or `null` to disable it. |
| 6267 |
Possible keys: |
| 6268 |
- `samplingProbability`: probability in % of sampling a trace for which no sampling decision has been |
| 6269 |
taken yet. Must be between 0 and 100. |
| 6270 |
- `serviceName`: name of the service being instrumented. |
| 6271 |
- `endpoint`: URL of the OpenTelemetry collector to send trace data to. |
| 6272 |
This has to be an endpoint accepting OTLP data over HTTP (not gRPC). |
| 6273 |
An example config to send data to a local OpenTelemetry or Jaeger collector instance: |
| 6274 |
``` |
| 6275 |
$wgOpenTelemetryConfig = [ |
| 6276 |
'samplingProbability' => 0.1, |
| 6277 |
'serviceName' => 'mediawiki-local', |
| 6278 |
'endpoint' => 'http://127.0.0.1:4318/v1/traces', |
| 6279 |
]; |
| 6280 |
``` |
| 6281 |
@since 1.43 |
| 6282 |
PageInfoTransclusionLimit: |
| 6283 |
default: 50 |
| 6284 |
description: |- |
| 6285 |
InfoAction retrieves a list of transclusion links (both to and from). |
| 6286 |
This number puts a limit on that query in the case of highly transcluded |
| 6287 |
templates. |
| 6288 |
EnableJavaScriptTest: |
| 6289 |
default: false |
| 6290 |
description: 'Allow running of QUnit tests via [[Special:JavaScriptTest]].' |
| 6291 |
CachePrefix: |
| 6292 |
default: false |
| 6293 |
description: |- |
| 6294 |
Overwrite the caching key prefix with custom value. |
| 6295 |
@since 1.19 |
| 6296 |
DebugToolbar: |
| 6297 |
default: false |
| 6298 |
description: |- |
| 6299 |
Display the new debugging toolbar. This also enables profiling on database |
| 6300 |
queries and other useful output. |
| 6301 |
Will be ignored if $wgUseFileCache or $wgUseCdn is enabled. |
| 6302 |
@since 1.19 |
| 6303 |
DisableTextSearch: |
| 6304 |
default: false |
| 6305 |
description: 'Set this to true to disable the full text search feature.' |
| 6306 |
AdvancedSearchHighlighting: |
| 6307 |
default: false |
| 6308 |
description: |- |
| 6309 |
Set to true to have nicer highlighted text in search results, |
| 6310 |
by default off due to execution overhead |
| 6311 |
SearchHighlightBoundaries: |
| 6312 |
default: '[\p{Z}\p{P}\p{C}]' |
| 6313 |
description: |- |
| 6314 |
Regexp to match word boundaries, defaults for non-CJK languages |
| 6315 |
should be empty for CJK since the words are not separate |
| 6316 |
OpenSearchTemplates: |
| 6317 |
default: |
| 6318 |
application/x-suggestions+json: false |
| 6319 |
application/x-suggestions+xml: false |
| 6320 |
type: object |
| 6321 |
description: |- |
| 6322 |
Templates for OpenSearch suggestions, defaults to API action=opensearch |
| 6323 |
Sites with heavy load would typically have these point to a custom |
| 6324 |
PHP wrapper to avoid firing up mediawiki for every keystroke |
| 6325 |
Placeholders: {searchTerms} |
| 6326 |
OpenSearchDefaultLimit: |
| 6327 |
default: 10 |
| 6328 |
description: |- |
| 6329 |
Integer defining default number of entries to show on |
| 6330 |
OpenSearch call. |
| 6331 |
OpenSearchDescriptionLength: |
| 6332 |
default: 100 |
| 6333 |
description: |- |
| 6334 |
Minimum length of extract in <Description>. Actual extracts will last until the end of |
| 6335 |
sentence. |
| 6336 |
SearchSuggestCacheExpiry: |
| 6337 |
default: 1200 |
| 6338 |
description: 'Expiry time for search suggestion responses' |
| 6339 |
DisableSearchUpdate: |
| 6340 |
default: false |
| 6341 |
description: |- |
| 6342 |
If you've disabled search semi-permanently, this also disables updates to the |
| 6343 |
table. If you ever re-enable, be sure to rebuild the search table. |
| 6344 |
NamespacesToBeSearchedDefault: |
| 6345 |
default: |
| 6346 |
- true |
| 6347 |
type: object |
| 6348 |
description: |- |
| 6349 |
List of namespaces which are searched by default. |
| 6350 |
**Example:** |
| 6351 |
``` |
| 6352 |
$wgNamespacesToBeSearchedDefault[NS_MAIN] = true; |
| 6353 |
$wgNamespacesToBeSearchedDefault[NS_PROJECT] = true; |
| 6354 |
``` |
| 6355 |
DisableInternalSearch: |
| 6356 |
default: false |
| 6357 |
description: |- |
| 6358 |
Disable the internal MySQL-based search, to allow it to be |
| 6359 |
implemented by an extension instead. |
| 6360 |
SearchForwardUrl: |
| 6361 |
default: null |
| 6362 |
description: |- |
| 6363 |
Set this to a URL to forward search requests to some external location. |
| 6364 |
If the URL includes '$1', this will be replaced with the URL-encoded |
| 6365 |
search term. Before using this, $wgDisableTextSearch must be set to true. |
| 6366 |
**Example:** |
| 6367 |
To forward to Google you'd have something like: |
| 6368 |
``` |
| 6369 |
$wgSearchForwardUrl = |
| 6370 |
'https://www.google.com/search?q=$1' . |
| 6371 |
'&domains=https://example.com' . |
| 6372 |
'&sitesearch=https://example.com' . |
| 6373 |
'&ie=utf-8&oe=utf-8'; |
| 6374 |
``` |
| 6375 |
SitemapNamespaces: |
| 6376 |
default: false |
| 6377 |
type: |
| 6378 |
- boolean |
| 6379 |
- array |
| 6380 |
description: |- |
| 6381 |
Array of namespaces to generate a Google sitemap for when the |
| 6382 |
maintenance/generateSitemap.php script is run, or false if one is to be |
| 6383 |
generated for all namespaces. |
| 6384 |
SitemapNamespacesPriorities: |
| 6385 |
default: false |
| 6386 |
type: |
| 6387 |
- boolean |
| 6388 |
- object |
| 6389 |
description: |- |
| 6390 |
Custom namespace priorities for sitemaps. Setting this will allow you to |
| 6391 |
set custom priorities to namespaces when sitemaps are generated using the |
| 6392 |
maintenance/generateSitemap.php script. |
| 6393 |
This should be a map of namespace IDs to priority |
| 6394 |
**Example:** |
| 6395 |
``` |
| 6396 |
$wgSitemapNamespacesPriorities = [ |
| 6397 |
NS_USER => '0.9', |
| 6398 |
NS_HELP => '0.0', |
| 6399 |
]; |
| 6400 |
``` |
| 6401 |
EnableSearchContributorsByIP: |
| 6402 |
default: true |
| 6403 |
description: |- |
| 6404 |
If true, searches for IP addresses will be redirected to that IP's |
| 6405 |
contributions page. E.g. searching for "1.2.3.4" will redirect to |
| 6406 |
[[Special:Contributions/1.2.3.4]] |
| 6407 |
SpecialSearchFormOptions: |
| 6408 |
default: { } |
| 6409 |
type: object |
| 6410 |
description: |- |
| 6411 |
Options for Special:Search completion widget form created by SearchFormWidget class. |
| 6412 |
Settings that can be used: |
| 6413 |
- showDescriptions: true/false - whether to show opensearch description results |
| 6414 |
- performSearchOnClick: true/false - whether to perform search on click |
| 6415 |
See also TitleWidget.js UI widget. |
| 6416 |
@since 1.34 |
| 6417 |
SearchMatchRedirectPreference: |
| 6418 |
default: false |
| 6419 |
type: boolean |
| 6420 |
description: |- |
| 6421 |
Set true to allow logged-in users to set a preference whether or not matches in |
| 6422 |
search results should force redirection to that page. If false, the preference is |
| 6423 |
not exposed and cannot be altered from site default. To change your site's default |
| 6424 |
preference, set via $wgDefaultUserOptions['search-match-redirect']. |
| 6425 |
@since 1.35 |
| 6426 |
SearchRunSuggestedQuery: |
| 6427 |
default: true |
| 6428 |
type: boolean |
| 6429 |
description: |- |
| 6430 |
Controls whether zero-result search queries with suggestions should display results for |
| 6431 |
these suggestions. |
| 6432 |
@since 1.26 |
| 6433 |
Diff3: |
| 6434 |
default: /usr/bin/diff3 |
| 6435 |
description: |- |
| 6436 |
Path to the GNU diff3 utility. If the file doesn't exist, edit conflicts will |
| 6437 |
fall back to the old behavior (no merging). |
| 6438 |
Diff: |
| 6439 |
default: /usr/bin/diff |
| 6440 |
description: 'Path to the GNU diff utility.' |
| 6441 |
PreviewOnOpenNamespaces: |
| 6442 |
default: |
| 6443 |
14: true |
| 6444 |
type: object |
| 6445 |
description: |- |
| 6446 |
Which namespaces have special treatment where they should be preview-on-open |
| 6447 |
Internally only Category: pages apply, but using this extensions (e.g. Semantic MediaWiki) |
| 6448 |
can specify namespaces of pages they have special treatment for |
| 6449 |
UniversalEditButton: |
| 6450 |
default: true |
| 6451 |
description: |- |
| 6452 |
Enable the UniversalEditButton for browsers that support it |
| 6453 |
(currently only Firefox with an extension) |
| 6454 |
See http://universaleditbutton.org for more background information |
| 6455 |
UseAutomaticEditSummaries: |
| 6456 |
default: true |
| 6457 |
description: |- |
| 6458 |
If user doesn't specify any edit summary when making a an edit, MediaWiki |
| 6459 |
will try to automatically create one. This feature can be disabled by set- |
| 6460 |
ting this variable false. |
| 6461 |
CommandLineDarkBg: |
| 6462 |
default: false |
| 6463 |
description: 'For colorized maintenance script output, is your terminal background dark ?' |
| 6464 |
ReadOnly: |
| 6465 |
default: null |
| 6466 |
description: |- |
| 6467 |
Set this to a string to put the wiki into read-only mode. The text will be |
| 6468 |
used as an explanation to users. |
| 6469 |
This prevents most write operations via the web interface. Cache updates may |
| 6470 |
still be possible. To prevent database writes completely, use the read_only |
| 6471 |
option in MySQL. |
| 6472 |
ReadOnlyWatchedItemStore: |
| 6473 |
default: false |
| 6474 |
type: boolean |
| 6475 |
description: |- |
| 6476 |
Set this to true to put the wiki watchlists into read-only mode. |
| 6477 |
@since 1.31 |
| 6478 |
ReadOnlyFile: |
| 6479 |
default: false |
| 6480 |
dynamicDefault: |
| 6481 |
use: [UploadDirectory] |
| 6482 |
callback: [MediaWiki\MainConfigSchema, getDefaultReadOnlyFile] |
| 6483 |
description: |- |
| 6484 |
If this lock file exists (size > 0), the wiki will be forced into read-only mode. |
| 6485 |
Its contents will be shown to users as part of the read-only warning |
| 6486 |
message. |
| 6487 |
Will default to "{$wgUploadDirectory}/lock_yBgMBwiR" in Setup.php |
| 6488 |
UpgradeKey: |
| 6489 |
default: false |
| 6490 |
description: |- |
| 6491 |
When you run the web-based upgrade utility, it will tell you what to set |
| 6492 |
this to in order to authorize the upgrade process. It will subsequently be |
| 6493 |
used as a password, to authorize further upgrades. |
| 6494 |
For security, do not set this to a guessable string. Use the value supplied |
| 6495 |
by the install/upgrade process. To cause the upgrader to generate a new key, |
| 6496 |
delete the old key from LocalSettings.php. |
| 6497 |
GitBin: |
| 6498 |
default: /usr/bin/git |
| 6499 |
description: 'Fully specified path to git binary' |
| 6500 |
GitRepositoryViewers: |
| 6501 |
default: |
| 6502 |
'https://(?:[a-z0-9_]+@)?gerrit\.wikimedia\.org/r/(?:p/)?(.*)': 'https://gerrit.wikimedia.org/g/%R/+/%H' |
| 6503 |
'ssh://(?:[a-z0-9_]+@)?gerrit\.wikimedia\.org:29418/(.*)': 'https://gerrit.wikimedia.org/g/%R/+/%H' |
| 6504 |
'https://github\.com/(.*?)(\.git)?': 'https://github.com/$1/commit/%H' |
| 6505 |
'git@github\.com:(.*?)(\.git)?': 'https://github.com/$1/commit/%H' |
| 6506 |
type: object |
| 6507 |
description: |- |
| 6508 |
Map GIT repository URLs to viewer URLs to provide links in Special:Version |
| 6509 |
Key is a pattern passed to preg_match() and preg_replace(), |
| 6510 |
without the delimiters (which are #) and must match the whole URL. |
| 6511 |
The value is the replacement for the key (it can contain $1, etc.) |
| 6512 |
%h will be replaced by the short SHA-1 (7 first chars) and %H by the |
| 6513 |
full SHA-1 of the HEAD revision. |
| 6514 |
%r will be replaced with a URL-encoded version of $1. |
| 6515 |
%R will be replaced with $1 and no URL-encoding |
| 6516 |
@since 1.20 |
| 6517 |
RCMaxAge: |
| 6518 |
default: 7776000 |
| 6519 |
description: |- |
| 6520 |
Recentchanges items are periodically purged; entries older than this many |
| 6521 |
seconds will go. |
| 6522 |
Default: 90 days = about three months |
| 6523 |
WatchersMaxAge: |
| 6524 |
default: 15552000 |
| 6525 |
description: |- |
| 6526 |
Page watchers inactive for more than this many seconds are considered inactive. |
| 6527 |
Used mainly by action=info. Default: 180 days = about six months. |
| 6528 |
@since 1.26 |
| 6529 |
UnwatchedPageSecret: |
| 6530 |
default: 1 |
| 6531 |
description: |- |
| 6532 |
If active watchers (per above) are this number or less, do not disclose it. |
| 6533 |
Left to 1, prevents unprivileged users from knowing for sure that there are 0. |
| 6534 |
Set to -1 if you want to always complement watchers count with this info. |
| 6535 |
@since 1.26 |
| 6536 |
RCFilterByAge: |
| 6537 |
default: false |
| 6538 |
description: |- |
| 6539 |
Filter $wgRCLinkDays by $wgRCMaxAge to avoid showing links for numbers |
| 6540 |
higher than what will be stored. Note that this is disabled by default |
| 6541 |
because we sometimes do have RC data which is beyond the limit for some |
| 6542 |
reason, and some users may use the high numbers to display that data which |
| 6543 |
is still there. |
| 6544 |
RCLinkLimits: |
| 6545 |
default: |
| 6546 |
- 50 |
| 6547 |
- 100 |
| 6548 |
- 250 |
| 6549 |
- 500 |
| 6550 |
type: array |
| 6551 |
description: |- |
| 6552 |
List of Limits options to list in the Special:Recentchanges and |
| 6553 |
Special:Recentchangeslinked pages. |
| 6554 |
RCLinkDays: |
| 6555 |
default: |
| 6556 |
- 1 |
| 6557 |
- 3 |
| 6558 |
- 7 |
| 6559 |
- 14 |
| 6560 |
- 30 |
| 6561 |
type: array |
| 6562 |
description: |- |
| 6563 |
List of Days options to list in the Special:Recentchanges and |
| 6564 |
Special:Recentchangeslinked pages. |
| 6565 |
@see \MediaWiki\SpecialPage\ChangesListSpecialPage::getLinkDays |
| 6566 |
RCFeeds: |
| 6567 |
default: { } |
| 6568 |
type: object |
| 6569 |
description: |- |
| 6570 |
Configuration for feeds to which notifications about recent changes will be sent. |
| 6571 |
The following feed classes are available by default: |
| 6572 |
- 'UDPRCFeedEngine' - sends recent changes over UDP to the specified server. |
| 6573 |
- 'RedisPubSubFeedEngine' - send recent changes to Redis. |
| 6574 |
Only 'class' or 'uri' is required. If 'uri' is set instead of 'class', then |
| 6575 |
RecentChange::getEngine() is used to determine the class. All options are |
| 6576 |
passed to the constructor. |
| 6577 |
Common options: |
| 6578 |
- 'class' -- The class to use for this feed (must implement RCFeed). |
| 6579 |
- 'omit_bots' -- Exclude bot edits from the feed. (default: false) |
| 6580 |
- 'omit_anon' -- Exclude anonymous edits from the feed. (default: false) |
| 6581 |
- 'omit_user' -- Exclude edits by registered users from the feed. (default: false) |
| 6582 |
- 'omit_minor' -- Exclude minor edits from the feed. (default: false) |
| 6583 |
- 'omit_patrolled' -- Exclude patrolled edits from the feed. (default: false) |
| 6584 |
FormattedRCFeed-specific options: |
| 6585 |
- 'uri' -- [required] The address to which the messages are sent. |
| 6586 |
The uri scheme of this string will be looked up in $wgRCEngines |
| 6587 |
to determine which FormattedRCFeed class to use. |
| 6588 |
- 'formatter' -- [required] The class (implementing RCFeedFormatter) which will |
| 6589 |
produce the text to send. This can also be an object of the class. |
| 6590 |
Formatters available by default: JSONRCFeedFormatter, XMLRCFeedFormatter, |
| 6591 |
IRCColourfulRCFeedFormatter. |
| 6592 |
IRCColourfulRCFeedFormatter-specific options: |
| 6593 |
- 'add_interwiki_prefix' -- whether the titles should be prefixed with |
| 6594 |
the first entry in the $wgLocalInterwikis array |
| 6595 |
JSONRCFeedFormatter-specific options: |
| 6596 |
- 'channel' -- if set, the 'channel' parameter is also set in JSON values. |
| 6597 |
**Examples:** |
| 6598 |
``` |
| 6599 |
$wgRCFeeds['example'] = [ |
| 6600 |
'uri' => 'udp://localhost:1336', |
| 6601 |
'formatter' => 'JSONRCFeedFormatter', |
| 6602 |
'add_interwiki_prefix' => false, |
| 6603 |
'omit_bots' => true, |
| 6604 |
]; |
| 6605 |
``` |
| 6606 |
``` |
| 6607 |
$wgRCFeeds['example'] = [ |
| 6608 |
'uri' => 'udp://localhost:1338', |
| 6609 |
'formatter' => 'IRCColourfulRCFeedFormatter', |
| 6610 |
'add_interwiki_prefix' => false, |
| 6611 |
'omit_bots' => true, |
| 6612 |
]; |
| 6613 |
``` |
| 6614 |
``` |
| 6615 |
$wgRCFeeds['example'] = [ |
| 6616 |
'class' => ExampleRCFeed::class, |
| 6617 |
]; |
| 6618 |
``` |
| 6619 |
@since 1.22 |
| 6620 |
RCEngines: |
| 6621 |
default: |
| 6622 |
redis: MediaWiki\RCFeed\RedisPubSubFeedEngine |
| 6623 |
udp: MediaWiki\RCFeed\UDPRCFeedEngine |
| 6624 |
type: object |
| 6625 |
description: |- |
| 6626 |
Used by RecentChange::getEngine to find the correct engine for a given URI scheme. |
| 6627 |
Keys are scheme names, values are names of FormattedRCFeed sub classes. |
| 6628 |
@since 1.22 |
| 6629 |
RCWatchCategoryMembership: |
| 6630 |
default: false |
| 6631 |
description: |- |
| 6632 |
Treat category membership changes as a RecentChange. |
| 6633 |
Changes are mentioned in RC for page actions as follows: |
| 6634 |
- creation: pages created with categories are mentioned |
| 6635 |
- edit: category additions/removals to existing pages are mentioned |
| 6636 |
- move: nothing is mentioned (unless templates used depend on the title) |
| 6637 |
- deletion: nothing is mentioned |
| 6638 |
- undeletion: nothing is mentioned |
| 6639 |
@since 1.27 |
| 6640 |
UseRCPatrol: |
| 6641 |
default: true |
| 6642 |
description: |- |
| 6643 |
Use RC Patrolling to check for vandalism (from recent changes and watchlists) |
| 6644 |
New pages and new files are included. |
| 6645 |
@note If you disable all patrolling features, you probably also want to |
| 6646 |
remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on |
| 6647 |
Special:Log. |
| 6648 |
StructuredChangeFiltersLiveUpdatePollingRate: |
| 6649 |
default: 3 |
| 6650 |
description: |- |
| 6651 |
Polling rate, in seconds, used by the 'live update' and 'view newest' features |
| 6652 |
of the RCFilters app on SpecialRecentChanges and Special:Watchlist. |
| 6653 |
0 to disable completely. |
| 6654 |
UseNPPatrol: |
| 6655 |
default: true |
| 6656 |
description: |- |
| 6657 |
Use new page patrolling to check new pages on Special:Newpages |
| 6658 |
@note If you disable all patrolling features, you probably also want to |
| 6659 |
remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on |
| 6660 |
Special:Log. |
| 6661 |
UseFilePatrol: |
| 6662 |
default: true |
| 6663 |
description: |- |
| 6664 |
Use file patrolling to check new files on Special:Newfiles |
| 6665 |
@note If you disable all patrolling features, you probably also want to |
| 6666 |
remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on |
| 6667 |
Special:Log. |
| 6668 |
@since 1.27 |
| 6669 |
Feed: |
| 6670 |
default: true |
| 6671 |
description: 'Provide syndication feeds (RSS, Atom) for, e.g., Recentchanges, Newpages' |
| 6672 |
FeedLimit: |
| 6673 |
default: 50 |
| 6674 |
description: |- |
| 6675 |
Set maximum number of results to return in syndication feeds (RSS, Atom) for |
| 6676 |
eg Recentchanges, Newpages. |
| 6677 |
FeedCacheTimeout: |
| 6678 |
default: 60 |
| 6679 |
description: |- |
| 6680 |
_Minimum_ timeout for cached Recentchanges feed, in seconds. |
| 6681 |
A cached version will continue to be served out even if changes |
| 6682 |
are made, until this many seconds runs out since the last render. |
| 6683 |
If set to 0, feed caching is disabled. Use this for debugging only; |
| 6684 |
feed generation can be pretty slow with diffs. |
| 6685 |
FeedDiffCutoff: |
| 6686 |
default: 32768 |
| 6687 |
description: |- |
| 6688 |
When generating Recentchanges RSS/Atom feed, diffs will not be generated for |
| 6689 |
pages larger than this size. |
| 6690 |
OverrideSiteFeed: |
| 6691 |
default: { } |
| 6692 |
type: object |
| 6693 |
description: |- |
| 6694 |
Override the site's default RSS/ATOM feed for recentchanges that appears on |
| 6695 |
every page. Some sites might have a different feed they'd like to promote |
| 6696 |
instead of the RC feed (maybe like a "Recent New Articles" or "Breaking news" one). |
| 6697 |
Should be a format as key (either 'rss' or 'atom') and an URL to the feed |
| 6698 |
as value. |
| 6699 |
**Example:** |
| 6700 |
Configure the 'atom' feed to https://example.com/somefeed.xml |
| 6701 |
``` |
| 6702 |
$wgSiteFeed['atom'] = "https://example.com/somefeed.xml"; |
| 6703 |
``` |
| 6704 |
FeedClasses: |
| 6705 |
default: |
| 6706 |
rss: MediaWiki\Feed\RSSFeed |
| 6707 |
atom: MediaWiki\Feed\AtomFeed |
| 6708 |
type: object |
| 6709 |
description: |- |
| 6710 |
Available feeds objects. |
| 6711 |
Should probably only be defined when a page is syndicated ie when |
| 6712 |
$wgOut->isSyndicated() is true. |
| 6713 |
AdvertisedFeedTypes: |
| 6714 |
default: |
| 6715 |
- atom |
| 6716 |
type: array |
| 6717 |
description: |- |
| 6718 |
Which feed types should we provide by default? This can include 'rss', |
| 6719 |
'atom', neither, or both. |
| 6720 |
RCShowWatchingUsers: |
| 6721 |
default: false |
| 6722 |
description: 'Show watching users in recent changes, watchlist and page history views' |
| 6723 |
RCShowChangedSize: |
| 6724 |
default: true |
| 6725 |
description: 'Show the amount of changed characters in recent changes' |
| 6726 |
RCChangedSizeThreshold: |
| 6727 |
default: 500 |
| 6728 |
description: |- |
| 6729 |
If the difference between the character counts of the text |
| 6730 |
before and after the edit is below that value, the value will be |
| 6731 |
highlighted on the RC page. |
| 6732 |
ShowUpdatedMarker: |
| 6733 |
default: true |
| 6734 |
description: |- |
| 6735 |
Show "Updated (since my last visit)" marker in RC view, watchlist and history |
| 6736 |
view for watched pages with new changes |
| 6737 |
DisableAnonTalk: |
| 6738 |
default: false |
| 6739 |
description: |- |
| 6740 |
Disable links to talk pages of anonymous users (IPs) in listings on special |
| 6741 |
pages like page history, Special:Recentchanges, etc. |
| 6742 |
UseTagFilter: |
| 6743 |
default: true |
| 6744 |
description: |- |
| 6745 |
Allow filtering by change tag in recentchanges, history, etc |
| 6746 |
Has no effect if no tags are defined. |
| 6747 |
SoftwareTags: |
| 6748 |
default: |
| 6749 |
mw-contentmodelchange: true |
| 6750 |
mw-new-redirect: true |
| 6751 |
mw-removed-redirect: true |
| 6752 |
mw-changed-redirect-target: true |
| 6753 |
mw-blank: true |
| 6754 |
mw-replace: true |
| 6755 |
mw-rollback: true |
| 6756 |
mw-undo: true |
| 6757 |
mw-manual-revert: true |
| 6758 |
mw-reverted: true |
| 6759 |
mw-server-side-upload: true |
| 6760 |
type: object |
| 6761 |
additionalProperties: |
| 6762 |
type: boolean |
| 6763 |
description: |- |
| 6764 |
List of core tags to enable. |
| 6765 |
@since 1.31 |
| 6766 |
@since 1.36 Added 'mw-manual-revert' and 'mw-reverted' |
| 6767 |
@see \ChangeTags::TAG_CONTENT_MODEL_CHANGE |
| 6768 |
@see \ChangeTags::TAG_NEW_REDIRECT |
| 6769 |
@see \ChangeTags::TAG_REMOVED_REDIRECT |
| 6770 |
@see \ChangeTags::TAG_CHANGED_REDIRECT_TARGET |
| 6771 |
@see \ChangeTags::TAG_BLANK |
| 6772 |
@see \ChangeTags::TAG_REPLACE |
| 6773 |
@see \ChangeTags::TAG_ROLLBACK |
| 6774 |
@see \ChangeTags::TAG_UNDO |
| 6775 |
@see \ChangeTags::TAG_MANUAL_REVERT |
| 6776 |
@see \ChangeTags::TAG_REVERTED |
| 6777 |
@see \ChangeTags::TAG_SERVER_SIDE_UPLOAD |
| 6778 |
UnwatchedPageThreshold: |
| 6779 |
default: false |
| 6780 |
description: |- |
| 6781 |
If set to an integer, pages that are watched by this many users or more |
| 6782 |
will not require the unwatchedpages permission to view the number of |
| 6783 |
watchers. |
| 6784 |
@since 1.21 |
| 6785 |
RecentChangesFlags: |
| 6786 |
default: |
| 6787 |
newpage: { letter: newpageletter, title: recentchanges-label-newpage, legend: recentchanges-legend-newpage, grouping: any } |
| 6788 |
minor: { letter: minoreditletter, title: recentchanges-label-minor, legend: recentchanges-legend-minor, class: minoredit, grouping: all } |
| 6789 |
bot: { letter: boteditletter, title: recentchanges-label-bot, legend: recentchanges-legend-bot, class: botedit, grouping: all } |
| 6790 |
unpatrolled: { letter: unpatrolledletter, title: recentchanges-label-unpatrolled, legend: recentchanges-legend-unpatrolled, grouping: any } |
| 6791 |
type: object |
| 6792 |
description: |- |
| 6793 |
Flags (letter symbols) shown in recent changes and watchlist to indicate |
| 6794 |
certain types of edits. |
| 6795 |
To register a new one: |
| 6796 |
``` |
| 6797 |
$wgRecentChangesFlags['flag'] => [ |
| 6798 |
// message for the letter displayed next to rows on changes lists |
| 6799 |
'letter' => 'letter-msg', |
| 6800 |
// message for the tooltip of the letter |
| 6801 |
'title' => 'tooltip-msg', |
| 6802 |
// optional (defaults to 'tooltip-msg'), message to use in the legend box |
| 6803 |
'legend' => 'legend-msg', |
| 6804 |
// optional (defaults to 'flag'), CSS class to put on changes lists rows |
| 6805 |
'class' => 'css-class', |
| 6806 |
// optional (defaults to 'any'), how top-level flag is determined. 'any' |
| 6807 |
// will set the top-level flag if any line contains the flag, 'all' will |
| 6808 |
// only be set if all lines contain the flag. |
| 6809 |
'grouping' => 'any', |
| 6810 |
]; |
| 6811 |
``` |
| 6812 |
@since 1.22 |
| 6813 |
WatchlistExpiry: |
| 6814 |
default: false |
| 6815 |
type: boolean |
| 6816 |
description: |- |
| 6817 |
Whether to enable the watchlist expiry feature. |
| 6818 |
@since 1.35 |
| 6819 |
WatchlistPurgeRate: |
| 6820 |
default: 0.1 |
| 6821 |
type: number |
| 6822 |
description: |- |
| 6823 |
Chance of expired watchlist items being purged on any page edit. |
| 6824 |
Only has effect if $wgWatchlistExpiry is true. |
| 6825 |
If this is zero, expired watchlist items will not be removed |
| 6826 |
and the purgeExpiredWatchlistItems.php maintenance script should be run periodically. |
| 6827 |
@since 1.35 |
| 6828 |
WatchlistExpiryMaxDuration: |
| 6829 |
default: '1 year' |
| 6830 |
type: |
| 6831 |
- string |
| 6832 |
- 'null' |
| 6833 |
description: |- |
| 6834 |
Relative maximum duration for watchlist expiries, as accepted by strtotime(). |
| 6835 |
This relates to finite watchlist expiries only. Pages can be watched indefinitely |
| 6836 |
regardless of what this is set to. |
| 6837 |
This is used to ensure the watchlist_expiry table doesn't grow to be too big. |
| 6838 |
Only has effect if $wgWatchlistExpiry is true. |
| 6839 |
Set to null to allow expiries of any duration. |
| 6840 |
@since 1.35 |
| 6841 |
RightsPage: |
| 6842 |
default: null |
| 6843 |
description: |- |
| 6844 |
Override for copyright metadata. |
| 6845 |
This is the name of the page containing information about the wiki's copyright status, |
| 6846 |
which will be added as a link in the footer if it is specified. It overrides |
| 6847 |
$wgRightsUrl if both are specified. |
| 6848 |
RightsUrl: |
| 6849 |
default: null |
| 6850 |
description: |- |
| 6851 |
Set this to specify an external URL containing details about the content license used on your |
| 6852 |
wiki. |
| 6853 |
If $wgRightsPage is set then this setting is ignored. |
| 6854 |
RightsText: |
| 6855 |
default: null |
| 6856 |
description: |- |
| 6857 |
If either $wgRightsUrl or $wgRightsPage is specified then this variable gives the text for |
| 6858 |
the link. Otherwise, it will be treated as raw HTML. |
| 6859 |
If using $wgRightsUrl then this value must be specified. If using $wgRightsPage then the |
| 6860 |
name |
| 6861 |
of the page will also be used as the link text if this variable is not set. |
| 6862 |
RightsIcon: |
| 6863 |
default: null |
| 6864 |
description: 'Override for copyright metadata.' |
| 6865 |
UseCopyrightUpload: |
| 6866 |
default: false |
| 6867 |
description: 'Set this to true if you want detailed copyright information forms on Upload.' |
| 6868 |
MaxCredits: |
| 6869 |
default: 0 |
| 6870 |
description: |- |
| 6871 |
Set this to the number of authors that you want to be credited below an |
| 6872 |
article text. Set it to zero to hide the attribution block, and a negative |
| 6873 |
number (like -1) to show all authors. Note that this will require 2-3 extra |
| 6874 |
database hits, which can have a not insignificant impact on performance for |
| 6875 |
large wikis. |
| 6876 |
ShowCreditsIfMax: |
| 6877 |
default: true |
| 6878 |
description: |- |
| 6879 |
If there are more than $wgMaxCredits authors, show $wgMaxCredits of them. |
| 6880 |
Otherwise, link to a separate credits page. |
| 6881 |
ImportSources: |
| 6882 |
default: { } |
| 6883 |
type: object |
| 6884 |
description: |- |
| 6885 |
List of interwiki prefixes for wikis we'll accept as sources for |
| 6886 |
Special:Import and API action=import. Since complete page history can be |
| 6887 |
imported, these should be 'trusted'. |
| 6888 |
This can either be a regular array, or an associative map specifying |
| 6889 |
subprojects on the interwiki map of the target wiki, or a mix of the two, |
| 6890 |
e.g. |
| 6891 |
``` |
| 6892 |
$wgImportSources = [ |
| 6893 |
'wikipedia' => [ 'cs', 'en', 'fr', 'zh' ], |
| 6894 |
'wikispecies', |
| 6895 |
'wikia' => [ 'animanga', 'brickipedia', 'desserts' ], |
| 6896 |
]; |
| 6897 |
``` |
| 6898 |
If you have a very complex import sources setup, you can lazy-load it using |
| 6899 |
the ImportSources hook. |
| 6900 |
If a user has the 'import' permission but not the 'importupload' permission, |
| 6901 |
they will only be able to run imports through this transwiki interface. |
| 6902 |
ImportTargetNamespace: |
| 6903 |
default: null |
| 6904 |
description: |- |
| 6905 |
Optional default target namespace for interwiki imports. |
| 6906 |
Can use this to create an incoming "transwiki"-style queue. |
| 6907 |
Set to numeric key, not the name. |
| 6908 |
Users may override this in the Special:Import dialog. |
| 6909 |
ExportAllowHistory: |
| 6910 |
default: true |
| 6911 |
description: |- |
| 6912 |
If set to false, disables the full-history option on Special:Export. |
| 6913 |
This is currently poorly optimized for long edit histories, so is |
| 6914 |
disabled on Wikimedia's sites. |
| 6915 |
ExportMaxHistory: |
| 6916 |
default: 0 |
| 6917 |
description: |- |
| 6918 |
If set nonzero, Special:Export requests for history of pages with |
| 6919 |
more revisions than this will be rejected. On some big sites things |
| 6920 |
could get bogged down by very very long pages. |
| 6921 |
ExportAllowListContributors: |
| 6922 |
default: false |
| 6923 |
description: 'Return distinct author list (when not returning full history)' |
| 6924 |
ExportMaxLinkDepth: |
| 6925 |
default: 0 |
| 6926 |
description: |- |
| 6927 |
If non-zero, Special:Export accepts a "pagelink-depth" parameter |
| 6928 |
up to this specified level, which will cause it to include all |
| 6929 |
pages linked to from the pages you specify. Since this number |
| 6930 |
can become *really really large* and could easily break your wiki, |
| 6931 |
it's disabled by default for now. |
| 6932 |
@warning There's a HARD CODED limit of 5 levels of recursion to prevent a |
| 6933 |
crazy-big export from being done by someone setting the depth number too |
| 6934 |
high. In other words, last resort safety net. |
| 6935 |
ExportFromNamespaces: |
| 6936 |
default: false |
| 6937 |
description: 'Whether to allow the "export all pages in namespace" option' |
| 6938 |
ExportAllowAll: |
| 6939 |
default: false |
| 6940 |
description: 'Whether to allow exporting the entire wiki into a single file' |
| 6941 |
ExportPagelistLimit: |
| 6942 |
default: 5000 |
| 6943 |
description: |- |
| 6944 |
Maximum number of pages returned by the GetPagesFromCategory and |
| 6945 |
GetPagesFromNamespace functions. |
| 6946 |
@since 1.27 |
| 6947 |
XmlDumpSchemaVersion: |
| 6948 |
default: '0.11' |
| 6949 |
description: |- |
| 6950 |
The schema to use by default when generating XML dumps. This allows sites to control |
| 6951 |
explicitly when to make breaking changes to their export and dump format. |
| 6952 |
WikiFarmSettingsDirectory: |
| 6953 |
default: null |
| 6954 |
description: |- |
| 6955 |
A directory that contains site-specific configuration files. |
| 6956 |
Setting this will enable multi-tenant ("wiki farm") mode, causing |
| 6957 |
site-specific settings to be loaded based on information from the web request. |
| 6958 |
@unstable EXPERIMENTAL |
| 6959 |
@since 1.38 |
| 6960 |
WikiFarmSettingsExtension: |
| 6961 |
default: yaml |
| 6962 |
description: |- |
| 6963 |
The file extension to be used when looking up site-specific settings files in |
| 6964 |
$wgWikiFarmSettingsDirectory, such as 'json' or 'yaml'. |
| 6965 |
@unstable EXPERIMENTAL |
| 6966 |
@since 1.38 |
| 6967 |
ExtensionFunctions: |
| 6968 |
default: [] |
| 6969 |
type: array |
| 6970 |
description: |- |
| 6971 |
A list of callback functions which are called once MediaWiki is fully |
| 6972 |
initialised |
| 6973 |
ExtensionMessagesFiles: |
| 6974 |
default: { } |
| 6975 |
type: object |
| 6976 |
description: |- |
| 6977 |
Extension messages files. |
| 6978 |
Associative array mapping extension name to the filename where messages can be |
| 6979 |
found. The file should contain variable assignments. Any of the variables |
| 6980 |
present in languages/messages/MessagesEn.php may be defined, but $messages |
| 6981 |
is the most common. |
| 6982 |
Variables defined in extensions will override conflicting variables defined |
| 6983 |
in the core. |
| 6984 |
Since MediaWiki 1.23, use of this variable to define messages is discouraged; instead, store |
| 6985 |
messages in JSON format and use $wgMessagesDirs. For setting other variables than |
| 6986 |
$messages, $wgExtensionMessagesFiles should still be used. Use a DIFFERENT key because |
| 6987 |
any entry having a key that also exists in $wgMessagesDirs will be ignored. |
| 6988 |
Extensions using the JSON message format can preserve backward compatibility with |
| 6989 |
earlier versions of MediaWiki by using a compatibility shim, such as one generated |
| 6990 |
by the generateJsonI18n.php maintenance script, listing it under the SAME key |
| 6991 |
as for the $wgMessagesDirs entry. |
| 6992 |
**Example:** |
| 6993 |
``` |
| 6994 |
$wgExtensionMessagesFiles['ConfirmEdit'] = __DIR__.'/ConfirmEdit.i18n.php'; |
| 6995 |
``` |
| 6996 |
MessagesDirs: |
| 6997 |
default: { } |
| 6998 |
type: object |
| 6999 |
description: |- |
| 7000 |
Extension messages directories. |
| 7001 |
Associative array mapping extension name to the path of the directory where message files can |
| 7002 |
be found. The message files are expected to be JSON files named for their language code, e.g. |
| 7003 |
en.json, de.json, etc. Extensions with messages in multiple places may specify an array of |
| 7004 |
message directories. |
| 7005 |
Message directories in core should be added to LocalisationCache::getMessagesDirs() |
| 7006 |
**Simple example:** |
| 7007 |
``` |
| 7008 |
$wgMessagesDirs['Example'] = __DIR__ . '/i18n'; |
| 7009 |
``` |
| 7010 |
**Complex example:** |
| 7011 |
``` |
| 7012 |
$wgMessagesDirs['Example'] = [ |
| 7013 |
__DIR__ . '/lib/ve/i18n', |
| 7014 |
__DIR__ . '/lib/ooui/i18n', |
| 7015 |
__DIR__ . '/i18n', |
| 7016 |
] |
| 7017 |
``` |
| 7018 |
@since 1.23 |
| 7019 |
TranslationAliasesDirs: |
| 7020 |
default: { } |
| 7021 |
type: object |
| 7022 |
description: |- |
| 7023 |
Message directories containing JSON files for localisation of special page aliases. |
| 7024 |
Associative array mapping extension name to the directory where configurations can be |
| 7025 |
found. The directory is expected to contain JSON files corresponding to each language code. |
| 7026 |
Variables defined in extensions will override conflicting variables defined |
| 7027 |
in the core. We recommend using this configuration to set variables that require localisation: |
| 7028 |
special page aliases, and in the future namespace aliases and magic words. |
| 7029 |
**Simple example**: extension.json |
| 7030 |
``` |
| 7031 |
"TranslationAliasesDirs": { |
| 7032 |
"TranslationNotificationsAlias": "i18n/aliases" |
| 7033 |
} |
| 7034 |
``` |
| 7035 |
**Complex example**: extension.json |
| 7036 |
``` |
| 7037 |
"TranslationAliasesDirs": { |
| 7038 |
"TranslationNotificationsAlias": [ "i18n/special-page-aliases", "i18n/magic-words", "i18n/namespaces" ] |
| 7039 |
} |
| 7040 |
``` |
| 7041 |
@unstable EXPERIMENTAL |
| 7042 |
@since 1.42 |
| 7043 |
ExtensionEntryPointListFiles: |
| 7044 |
default: { } |
| 7045 |
type: object |
| 7046 |
description: |- |
| 7047 |
Array of files with list(s) of extension entry points to be used in |
| 7048 |
maintenance/mergeMessageFileList.php |
| 7049 |
@since 1.22 |
| 7050 |
EnableParserLimitReporting: |
| 7051 |
default: true |
| 7052 |
description: 'Whether to include the NewPP limit report as a HTML comment' |
| 7053 |
ValidSkinNames: |
| 7054 |
default: { } |
| 7055 |
type: object |
| 7056 |
description: |- |
| 7057 |
List of valid skin names |
| 7058 |
The key should be the name in all lower case. |
| 7059 |
As of 1.35, the value should be a an array in the form of the ObjectFactory specification. |
| 7060 |
For example for 'foobarskin' where the PHP class is 'MediaWiki\Skins\FooBar\FooBarSkin' set: |
| 7061 |
**skin.json Example:** |
| 7062 |
``` |
| 7063 |
"ValidSkinNames": { |
| 7064 |
"foobarskin": { |
| 7065 |
"displayname": "FooBarSkin", |
| 7066 |
"class": "MediaWiki\\Skins\\FooBar\\FooBarSkin" |
| 7067 |
} |
| 7068 |
} |
| 7069 |
``` |
| 7070 |
Historically, the value was a properly cased name for the skin (and is still currently |
| 7071 |
supported). This value will be prefixed with "Skin" to create the class name of the |
| 7072 |
skin to load. Use Skin::getSkinNames() as an accessor if you wish to have access to the |
| 7073 |
full list. |
| 7074 |
SpecialPages: |
| 7075 |
default: { } |
| 7076 |
type: object |
| 7077 |
description: |- |
| 7078 |
Special page list. This is an associative array mapping the (canonical) names of |
| 7079 |
special pages to either a class name or a ObjectFactory spec to be instantiated, or a callback to use for |
| 7080 |
creating the special page object. In all cases, the result must be an instance of SpecialPage. |
| 7081 |
ExtensionCredits: |
| 7082 |
default: { } |
| 7083 |
type: object |
| 7084 |
description: |- |
| 7085 |
Add information about an installed extension, keyed by its type. |
| 7086 |
This is for use from LocalSettings.php and legacy PHP-entrypoint |
| 7087 |
extensions. In general, extensions should (only) declare this |
| 7088 |
information in their extension.json file. |
| 7089 |
The 'name', 'path' and 'author' keys are required. |
| 7090 |
``` |
| 7091 |
$wgExtensionCredits['other'][] = [ |
| 7092 |
'path' => __FILE__, |
| 7093 |
'name' => 'Example extension', |
| 7094 |
'namemsg' => 'exampleextension-name', |
| 7095 |
'author' => [ |
| 7096 |
'Foo Barstein', |
| 7097 |
], |
| 7098 |
'version' => '0.0.1', |
| 7099 |
'url' => 'https://example.org/example-extension/', |
| 7100 |
'descriptionmsg' => 'exampleextension-desc', |
| 7101 |
'license-name' => 'GPL-2.0-or-later', |
| 7102 |
]; |
| 7103 |
``` |
| 7104 |
The extensions are listed on Special:Version. This page also looks for a file |
| 7105 |
named COPYING or LICENSE (optional .txt extension) and provides a link to |
| 7106 |
view said file. When the 'license-name' key is specified, this file is |
| 7107 |
interpreted as wikitext. |
| 7108 |
- $type: One of 'specialpage', 'parserhook', 'variable', 'media', 'antispam', |
| 7109 |
'skin', 'api', or 'other', or any additional types as specified through the |
| 7110 |
ExtensionTypes hook as used in SpecialVersion::getExtensionTypes(). |
| 7111 |
- name: Name of extension as an inline string instead of localizable message. |
| 7112 |
Do not omit this even if 'namemsg' is provided, as it is used to override |
| 7113 |
the path Special:Version uses to find extension's license info, and is |
| 7114 |
required for backwards-compatibility with MediaWiki 1.23 and older. |
| 7115 |
- namemsg (since MW 1.24): A message key for a message containing the |
| 7116 |
extension's name, if the name is localizable. (For example, skin names |
| 7117 |
usually are.) |
| 7118 |
- author: A string or an array of strings. Authors can be linked using |
| 7119 |
the regular wikitext link syntax. To have an internationalized version of |
| 7120 |
"and others" show, add an element "...". This element can also be linked, |
| 7121 |
for instance "[https://example ...]". |
| 7122 |
- descriptionmsg: A message key or an array with message key and parameters: |
| 7123 |
`'descriptionmsg' => 'exampleextension-desc',` |
| 7124 |
- description: Description of extension as an inline string instead of |
| 7125 |
localizable message (omit in favour of 'descriptionmsg'). |
| 7126 |
- license-name: Short name of the license (used as label for the link), such |
| 7127 |
as "GPL-2.0-or-later" or "MIT" (https://spdx.org/licenses/ for a list of identifiers). |
| 7128 |
@see \MediaWiki\Specials\SpecialVersion::getCredits |
| 7129 |
Hooks: |
| 7130 |
default: { } |
| 7131 |
type: object |
| 7132 |
mergeStrategy: array_merge_recursive |
| 7133 |
description: |- |
| 7134 |
Global list of hooks. |
| 7135 |
The key is one of the events made available by MediaWiki, you can find |
| 7136 |
a description for most of them in their respective hook interfaces. For |
| 7137 |
overview of the hook system see docs/Hooks.md. The array is used internally |
| 7138 |
by HookContainer::run(). |
| 7139 |
The value can be one of: |
| 7140 |
- A function name: `$wgHooks['event_name'][] = $function;` |
| 7141 |
- A function with some data: `$wgHooks['event_name'][] = [ $function, $data ];` |
| 7142 |
- A an object method: `$wgHooks['event_name'][] = [ $object, 'method' ];` |
| 7143 |
- A closure: |
| 7144 |
``` |
| 7145 |
$wgHooks['event_name'][] = function ( $hookParam ) { |
| 7146 |
// Handler code goes here. |
| 7147 |
}; |
| 7148 |
``` |
| 7149 |
@warning You should always append to an event array or you will end up |
| 7150 |
deleting a previous registered hook. |
| 7151 |
@warning Hook handlers should be registered at file scope. Registering |
| 7152 |
handlers after file scope can lead to unexpected results due to caching. |
| 7153 |
ServiceWiringFiles: |
| 7154 |
default: [] |
| 7155 |
type: array |
| 7156 |
description: |- |
| 7157 |
List of service wiring files to be loaded by the default instance of MediaWikiServices. Each |
| 7158 |
file listed here is expected to return an associative array mapping service names to |
| 7159 |
instantiator functions. Extensions may add wiring files to define their own services. |
| 7160 |
However, this cannot be used to replace existing services - use the MediaWikiServices hook |
| 7161 |
for that. |
| 7162 |
@note the default wiring file will be added automatically by Setup.php |
| 7163 |
@see \MediaWiki\MediaWikiServices |
| 7164 |
@see \Wikimedia\Services\ServiceContainer::loadWiringFiles() for details on loading |
| 7165 |
service instantiator functions. |
| 7166 |
@see docs/Injection.md for an overview of dependency |
| 7167 |
injection in MediaWiki. |
| 7168 |
JobClasses: |
| 7169 |
default: |
| 7170 |
deletePage: DeletePageJob |
| 7171 |
refreshLinks: RefreshLinksJob |
| 7172 |
deleteLinks: DeleteLinksJob |
| 7173 |
htmlCacheUpdate: HTMLCacheUpdateJob |
| 7174 |
sendMail: { class: EmaillingJob, services: [Emailer] } |
| 7175 |
enotifNotify: EnotifNotifyJob |
| 7176 |
fixDoubleRedirect: { class: DoubleRedirectJob, services: [RevisionLookup, MagicWordFactory, WikiPageFactory], needsPage: true } |
| 7177 |
AssembleUploadChunks: AssembleUploadChunksJob |
| 7178 |
PublishStashedFile: PublishStashedFileJob |
| 7179 |
ThumbnailRender: ThumbnailRenderJob |
| 7180 |
UploadFromUrl: UploadFromUrlJob |
| 7181 |
recentChangesUpdate: RecentChangesUpdateJob |
| 7182 |
refreshLinksPrioritized: RefreshLinksJob |
| 7183 |
refreshLinksDynamic: RefreshLinksJob |
| 7184 |
activityUpdateJob: MediaWiki\Watchlist\ActivityUpdateJob |
| 7185 |
categoryMembershipChange: CategoryMembershipChangeJob |
| 7186 |
clearUserWatchlist: MediaWiki\Watchlist\ClearUserWatchlistJob |
| 7187 |
watchlistExpiry: MediaWiki\Watchlist\WatchlistExpiryJob |
| 7188 |
cdnPurge: CdnPurgeJob |
| 7189 |
userGroupExpiry: UserGroupExpiryJob |
| 7190 |
clearWatchlistNotifications: MediaWiki\Watchlist\ClearWatchlistNotificationsJob |
| 7191 |
userOptionsUpdate: UserOptionsUpdateJob |
| 7192 |
revertedTagUpdate: RevertedTagUpdateJob |
| 7193 |
'null': NullJob |
| 7194 |
userEditCountInit: UserEditCountInitJob |
| 7195 |
parsoidCachePrewarm: { class: ParsoidCachePrewarmJob, services: [ParserOutputAccess, PageStore, RevisionLookup, ParsoidSiteConfig], needsPage: false } |
| 7196 |
renameUser: { class: MediaWiki\RenameUser\RenameUserJob, services: [MainConfig, DBLoadBalancerFactory] } |
| 7197 |
type: object |
| 7198 |
description: |- |
| 7199 |
Maps jobs to their handlers; extensions |
| 7200 |
can add to this to provide custom jobs. |
| 7201 |
Since 1.40, job handlers can be specified as object specs |
| 7202 |
for use with ObjectFactory, using an array, a plain class name, |
| 7203 |
or a callback. |
| 7204 |
@note The constructor signature of job classes has to follow one of two patterns: |
| 7205 |
Either it takes a parameter array as the first argument, followed by any services it |
| 7206 |
needs to have injected: ( array $params, ... ). |
| 7207 |
Or it takes a PageReference as the first parameter, followed by the parameter array, |
| 7208 |
followed by any services: ( PageReference $page, array $params, ... ). |
| 7209 |
In order to signal to the JobFactory that the $page parameter should be omitted from |
| 7210 |
the constructor arguments, the job class has to be a subclass of GenericParameterJob, |
| 7211 |
or the object specification for the job has to set the 'needsPage' key to false. |
| 7212 |
If a callback is used, its signature follows the same rules. |
| 7213 |
JobTypesExcludedFromDefaultQueue: |
| 7214 |
default: |
| 7215 |
- AssembleUploadChunks |
| 7216 |
- PublishStashedFile |
| 7217 |
- UploadFromUrl |
| 7218 |
type: array |
| 7219 |
description: |- |
| 7220 |
Jobs that must be explicitly requested, i.e. aren't run by job runners unless |
| 7221 |
special flags are set. The values here are keys of $wgJobClasses. |
| 7222 |
These can be: |
| 7223 |
- Very long-running jobs. |
| 7224 |
- Jobs that you would never want to run as part of a page rendering request. |
| 7225 |
- Jobs that you want to run on specialized machines ( like transcoding, or a particular |
| 7226 |
machine on your cluster has 'outside' web access you could restrict uploadFromUrl ) |
| 7227 |
These settings should be global to all wikis. |
| 7228 |
JobBackoffThrottling: |
| 7229 |
default: { } |
| 7230 |
type: object |
| 7231 |
additionalProperties: |
| 7232 |
type: number |
| 7233 |
description: |- |
| 7234 |
Map of job types to how many job "work items" should be run per second |
| 7235 |
on each job runner process. The meaning of "work items" varies per job, |
| 7236 |
but typically would be something like "pages to update". A single job |
| 7237 |
may have a variable number of work items, as is the case with batch jobs. |
| 7238 |
This is used by runJobs.php and not jobs run via $wgJobRunRate. |
| 7239 |
These settings should be global to all wikis. |
| 7240 |
JobTypeConf: |
| 7241 |
default: |
| 7242 |
default: { class: JobQueueDB, order: random, claimTTL: 3600 } |
| 7243 |
additionalProperties: |
| 7244 |
type: object |
| 7245 |
properties: { class: { type: string }, order: { type: string }, claimTTL: { type: integer } } |
| 7246 |
type: object |
| 7247 |
description: |- |
| 7248 |
Map of job types to configuration arrays. |
| 7249 |
This determines which queue class and storage system is used for each job type. |
| 7250 |
Job types that do not have explicit configuration will use the 'default' config. |
| 7251 |
These settings should be global to all wikis. |
| 7252 |
JobQueueIncludeInMaxLagFactor: |
| 7253 |
default: false |
| 7254 |
description: |- |
| 7255 |
Whether to include the number of jobs that are queued |
| 7256 |
for the API's maxlag parameter. |
| 7257 |
The total number of jobs will be divided by this to get an |
| 7258 |
estimated second of maxlag. Typically bots backoff at maxlag=5, |
| 7259 |
so setting this to the max number of jobs that should be in your |
| 7260 |
queue divided by 5 should have the effect of stopping bots once |
| 7261 |
that limit is hit. |
| 7262 |
@since 1.29 |
| 7263 |
SpecialPageCacheUpdates: |
| 7264 |
default: |
| 7265 |
Statistics: [MediaWiki\Deferred\SiteStatsUpdate, cacheUpdate] |
| 7266 |
type: object |
| 7267 |
description: |- |
| 7268 |
Additional functions to be performed with updateSpecialPages. |
| 7269 |
Expensive Querypages are already updated. |
| 7270 |
PagePropLinkInvalidations: |
| 7271 |
default: |
| 7272 |
hiddencat: categorylinks |
| 7273 |
type: object |
| 7274 |
description: |- |
| 7275 |
Page property link table invalidation lists. When a page property |
| 7276 |
changes, this may require other link tables to be updated (eg |
| 7277 |
adding __HIDDENCAT__ means the hiddencat tracking category will |
| 7278 |
have been added, so the categorylinks table needs to be rebuilt). |
| 7279 |
This array can be added to by extensions. |
| 7280 |
CategoryMagicGallery: |
| 7281 |
default: true |
| 7282 |
description: |- |
| 7283 |
On category pages, show thumbnail gallery for images belonging to that |
| 7284 |
category instead of listing them as articles. |
| 7285 |
CategoryPagingLimit: |
| 7286 |
default: 200 |
| 7287 |
description: 'Paging limit for categories' |
| 7288 |
CategoryCollation: |
| 7289 |
default: uppercase |
| 7290 |
description: |- |
| 7291 |
Specify how category names should be sorted, when listed on a category page. |
| 7292 |
A sorting scheme is also known as a collation. |
| 7293 |
Available values are: |
| 7294 |
- uppercase: Converts the category name to upper case, and sorts by that. |
| 7295 |
- identity: Does no conversion. Sorts by binary value of the string. |
| 7296 |
- uca-default: Provides access to the Unicode Collation Algorithm with |
| 7297 |
the default element table. This is a compromise collation which sorts |
| 7298 |
all languages in a mediocre way. However, it is better than "uppercase". |
| 7299 |
To use the uca-default collation, you must have PHP's intl extension |
| 7300 |
installed. See https://www.php.net/manual/en/intl.setup.php . The details of the |
| 7301 |
resulting collation will depend on the version of ICU installed on the |
| 7302 |
server. |
| 7303 |
After you change this, you must run maintenance/updateCollation.php to fix |
| 7304 |
the sort keys in the database. |
| 7305 |
Extensions can define there own collations by subclassing Collation |
| 7306 |
and using the Collation::factory hook. |
| 7307 |
TempCategoryCollations: |
| 7308 |
default: [] |
| 7309 |
type: array |
| 7310 |
description: |- |
| 7311 |
Additional category collations to store during LinksUpdate. This can be used |
| 7312 |
to perform online migration of categories from one collation to another. An |
| 7313 |
array of associative arrays each having the following keys: |
| 7314 |
- table: (string) The table name |
| 7315 |
- collation: (string) The collation to use for cl_sortkey |
| 7316 |
- fakeCollation: (string) The collation name to insert into cl_collation |
| 7317 |
@since 1.38 |
| 7318 |
SortedCategories: |
| 7319 |
default: false |
| 7320 |
type: boolean |
| 7321 |
description: |- |
| 7322 |
Whether to sort categories in OutputPage for display. |
| 7323 |
The value of CategoryCollation is used for sorting. |
| 7324 |
@unstable EXPERIMENTAL This feature is used for Parsoid development, |
| 7325 |
but its future as a core feature will depend on community uptake. |
| 7326 |
TrackingCategories: |
| 7327 |
default: [] |
| 7328 |
type: array |
| 7329 |
deprecated: |- |
| 7330 |
since 1.25 Extensions should now register tracking categories using the new |
| 7331 |
extension registration system. |
| 7332 |
description: |- |
| 7333 |
Array holding default tracking category names. |
| 7334 |
Array contains the system messages for each tracking category. |
| 7335 |
Tracking categories allow pages with certain characteristics to be tracked. |
| 7336 |
It works by adding any such page to a category automatically. |
| 7337 |
A message with the suffix '-desc' should be added as a description message |
| 7338 |
to have extra information on Special:TrackingCategories. |
| 7339 |
@deprecated since 1.25 Extensions should now register tracking categories using |
| 7340 |
the new extension registration system. |
| 7341 |
@since 1.23 |
| 7342 |
LogTypes: |
| 7343 |
default: |
| 7344 |
- '' |
| 7345 |
- block |
| 7346 |
- protect |
| 7347 |
- rights |
| 7348 |
- delete |
| 7349 |
- upload |
| 7350 |
- move |
| 7351 |
- import |
| 7352 |
- patrol |
| 7353 |
- merge |
| 7354 |
- suppress |
| 7355 |
- tag |
| 7356 |
- managetags |
| 7357 |
- contentmodel |
| 7358 |
- renameuser |
| 7359 |
type: array |
| 7360 |
description: |- |
| 7361 |
The logging system has two levels: an event type, which describes the |
| 7362 |
general category and can be viewed as a named subset of all logs; and |
| 7363 |
an action, which is a specific kind of event that can exist in that |
| 7364 |
log type. |
| 7365 |
Note that code should call LogPage::validTypes() to get a list of valid |
| 7366 |
log types instead of checking the global variable. |
| 7367 |
LogRestrictions: |
| 7368 |
default: |
| 7369 |
suppress: suppressionlog |
| 7370 |
type: object |
| 7371 |
description: |- |
| 7372 |
This restricts log access to those who have a certain right |
| 7373 |
Users without this will not see it in the option menu and can not view it |
| 7374 |
Restricted logs are not added to recent changes |
| 7375 |
Logs should remain non-transcludable |
| 7376 |
Format: logtype => permissiontype |
| 7377 |
FilterLogTypes: |
| 7378 |
default: |
| 7379 |
patrol: true |
| 7380 |
tag: true |
| 7381 |
newusers: false |
| 7382 |
type: object |
| 7383 |
description: |- |
| 7384 |
Show/hide links on Special:Log will be shown for these log types. |
| 7385 |
This is associative array of log type => boolean "hide by default" |
| 7386 |
See $wgLogTypes for a list of available log types. |
| 7387 |
**Example:** |
| 7388 |
`$wgFilterLogTypes = [ 'move' => true, 'import' => false ];` |
| 7389 |
Will display show/hide links for the move and import logs. Move logs will be |
| 7390 |
hidden by default unless the link is clicked. Import logs will be shown by |
| 7391 |
default, and hidden when the link is clicked. |
| 7392 |
A message of the form logeventslist-[type]-log should be added, and will be |
| 7393 |
used for the link text. |
| 7394 |
LogNames: |
| 7395 |
default: |
| 7396 |
'': all-logs-page |
| 7397 |
block: blocklogpage |
| 7398 |
protect: protectlogpage |
| 7399 |
rights: rightslog |
| 7400 |
delete: dellogpage |
| 7401 |
upload: uploadlogpage |
| 7402 |
move: movelogpage |
| 7403 |
import: importlogpage |
| 7404 |
patrol: patrol-log-page |
| 7405 |
merge: mergelog |
| 7406 |
suppress: suppressionlog |
| 7407 |
type: object |
| 7408 |
description: |- |
| 7409 |
Lists the message key string for each log type. The localized messages |
| 7410 |
will be listed in the user interface. |
| 7411 |
Extensions with custom log types may add to this array. |
| 7412 |
@since 1.19, if you follow the naming convention log-name-TYPE, |
| 7413 |
where TYPE is your log type, you don't need to use this array. |
| 7414 |
LogHeaders: |
| 7415 |
default: |
| 7416 |
'': alllogstext |
| 7417 |
block: blocklogtext |
| 7418 |
delete: dellogpagetext |
| 7419 |
import: importlogpagetext |
| 7420 |
merge: mergelogpagetext |
| 7421 |
move: movelogpagetext |
| 7422 |
patrol: patrol-log-header |
| 7423 |
protect: protectlogtext |
| 7424 |
rights: rightslogtext |
| 7425 |
suppress: suppressionlogtext |
| 7426 |
upload: uploadlogpagetext |
| 7427 |
type: object |
| 7428 |
description: |- |
| 7429 |
Lists the message key string for descriptive text to be shown at the |
| 7430 |
top of each log type. |
| 7431 |
Extensions with custom log types may add to this array. |
| 7432 |
@since 1.19, if you follow the naming convention log-description-TYPE, |
| 7433 |
where TYPE is your log type, yoy don't need to use this array. |
| 7434 |
LogActions: |
| 7435 |
default: { } |
| 7436 |
type: object |
| 7437 |
description: |- |
| 7438 |
Maps log actions to message keys, for formatting log entries of each type |
| 7439 |
and action when displaying logs to the user. |
| 7440 |
The array keys are composed as "$type/$action". |
| 7441 |
Extensions with custom log types may add to this array. |
| 7442 |
LogActionsHandlers: |
| 7443 |
default: |
| 7444 |
block/block: BlockLogFormatter |
| 7445 |
block/reblock: BlockLogFormatter |
| 7446 |
block/unblock: BlockLogFormatter |
| 7447 |
contentmodel/change: ContentModelLogFormatter |
| 7448 |
contentmodel/new: ContentModelLogFormatter |
| 7449 |
delete/delete: DeleteLogFormatter |
| 7450 |
delete/delete_redir: DeleteLogFormatter |
| 7451 |
delete/delete_redir2: DeleteLogFormatter |
| 7452 |
delete/event: DeleteLogFormatter |
| 7453 |
delete/restore: DeleteLogFormatter |
| 7454 |
delete/revision: DeleteLogFormatter |
| 7455 |
import/interwiki: ImportLogFormatter |
| 7456 |
import/upload: ImportLogFormatter |
| 7457 |
managetags/activate: LogFormatter |
| 7458 |
managetags/create: LogFormatter |
| 7459 |
managetags/deactivate: LogFormatter |
| 7460 |
managetags/delete: LogFormatter |
| 7461 |
merge/merge: MergeLogFormatter |
| 7462 |
move/move: MoveLogFormatter |
| 7463 |
move/move_redir: MoveLogFormatter |
| 7464 |
patrol/patrol: PatrolLogFormatter |
| 7465 |
patrol/autopatrol: PatrolLogFormatter |
| 7466 |
protect/modify: ProtectLogFormatter |
| 7467 |
protect/move_prot: ProtectLogFormatter |
| 7468 |
protect/protect: ProtectLogFormatter |
| 7469 |
protect/unprotect: ProtectLogFormatter |
| 7470 |
renameuser/renameuser: RenameuserLogFormatter |
| 7471 |
rights/autopromote: RightsLogFormatter |
| 7472 |
rights/rights: RightsLogFormatter |
| 7473 |
suppress/block: BlockLogFormatter |
| 7474 |
suppress/delete: DeleteLogFormatter |
| 7475 |
suppress/event: DeleteLogFormatter |
| 7476 |
suppress/reblock: BlockLogFormatter |
| 7477 |
suppress/revision: DeleteLogFormatter |
| 7478 |
tag/update: TagLogFormatter |
| 7479 |
upload/overwrite: UploadLogFormatter |
| 7480 |
upload/revert: UploadLogFormatter |
| 7481 |
upload/upload: UploadLogFormatter |
| 7482 |
type: object |
| 7483 |
description: |- |
| 7484 |
The same as above, but here values are class names or ObjectFactory specifications, |
| 7485 |
not messages. The specification must resolve to a LogFormatter subclass, |
| 7486 |
and will receive the LogEntry object as its first constructor argument. |
| 7487 |
The type can be specified as '*' (e.g. 'block/*') to handle all types. |
| 7488 |
@see \LogPage::actionText |
| 7489 |
@see \LogFormatter |
| 7490 |
ActionFilteredLogs: |
| 7491 |
default: |
| 7492 |
block: { block: [block], reblock: [reblock], unblock: [unblock] } |
| 7493 |
contentmodel: { change: [change], new: [new] } |
| 7494 |
delete: { delete: [delete], delete_redir: [delete_redir, delete_redir2], restore: [restore], event: [event], revision: [revision] } |
| 7495 |
import: { interwiki: [interwiki], upload: [upload] } |
| 7496 |
managetags: { create: [create], delete: [delete], activate: [activate], deactivate: [deactivate] } |
| 7497 |
move: { move: [move], move_redir: [move_redir] } |
| 7498 |
newusers: { create: [create, newusers], create2: [create2], autocreate: [autocreate], byemail: [byemail] } |
| 7499 |
protect: { protect: [protect], modify: [modify], unprotect: [unprotect], move_prot: [move_prot] } |
| 7500 |
rights: { rights: [rights], autopromote: [autopromote] } |
| 7501 |
suppress: { event: [event], revision: [revision], delete: [delete], block: [block], reblock: [reblock] } |
| 7502 |
upload: { upload: [upload], overwrite: [overwrite], revert: [revert] } |
| 7503 |
type: object |
| 7504 |
description: |- |
| 7505 |
List of log types that can be filtered by action types |
| 7506 |
To each action is associated the list of log_action |
| 7507 |
subtypes to search for, usually one, but not necessarily so |
| 7508 |
Extensions may append to this array |
| 7509 |
@since 1.27 |
| 7510 |
NewUserLog: |
| 7511 |
default: true |
| 7512 |
description: 'Maintain a log of newusers at Special:Log/newusers?' |
| 7513 |
PageCreationLog: |
| 7514 |
default: true |
| 7515 |
description: |- |
| 7516 |
Maintain a log of page creations at Special:Log/create? |
| 7517 |
@since 1.32 |
| 7518 |
AllowSpecialInclusion: |
| 7519 |
default: true |
| 7520 |
description: 'Allow special page inclusions such as {{Special:Allpages}}' |
| 7521 |
DisableQueryPageUpdate: |
| 7522 |
default: false |
| 7523 |
description: |- |
| 7524 |
Set this to an array of special page names to prevent |
| 7525 |
maintenance/updateSpecialPages.php from updating those pages. |
| 7526 |
Mapping each special page name to a run mode like 'periodical' if a cronjob is set up. |
| 7527 |
CountCategorizedImagesAsUsed: |
| 7528 |
default: false |
| 7529 |
description: |- |
| 7530 |
On Special:Unusedimages, consider images "used", if they are put |
| 7531 |
into a category. Default (false) is not to count those as used. |
| 7532 |
MaxRedirectLinksRetrieved: |
| 7533 |
default: 500 |
| 7534 |
description: |- |
| 7535 |
Maximum number of links to a redirect page listed on |
| 7536 |
Special:Whatlinkshere/RedirectDestination |
| 7537 |
RangeContributionsCIDRLimit: |
| 7538 |
default: |
| 7539 |
IPv4: 16 |
| 7540 |
IPv6: 32 |
| 7541 |
type: object |
| 7542 |
additionalProperties: |
| 7543 |
type: integer |
| 7544 |
description: |- |
| 7545 |
Shortest CIDR limits that can be checked in any individual range check |
| 7546 |
at Special:Contributions. |
| 7547 |
@since 1.30 |
| 7548 |
Actions: |
| 7549 |
default: { } |
| 7550 |
type: object |
| 7551 |
description: |- |
| 7552 |
Map of allowed values for the "title=foo&action=<action>" parameter. |
| 7553 |
to the corresponding handler code. |
| 7554 |
See ActionFactory for the syntax. Core defaults are in ActionFactory::CORE_ACTIONS, |
| 7555 |
anything here overrides that. |
| 7556 |
DefaultRobotPolicy: |
| 7557 |
default: 'index,follow' |
| 7558 |
description: |- |
| 7559 |
Default robot policy. The default policy is to encourage indexing and fol- |
| 7560 |
lowing of links. It may be overridden on a per-namespace and/or per-page |
| 7561 |
basis. |
| 7562 |
NamespaceRobotPolicies: |
| 7563 |
default: { } |
| 7564 |
type: object |
| 7565 |
description: |- |
| 7566 |
Robot policies per namespaces. The default policy is given above, the array |
| 7567 |
is made of namespace constants as defined in includes/Defines.php. You can- |
| 7568 |
not specify a different default policy for NS_SPECIAL: it is always noindex, |
| 7569 |
nofollow. This is because a number of special pages (e.g., ListPages) have |
| 7570 |
many permutations of options that display the same data under redundant |
| 7571 |
URLs, so search engine spiders risk getting lost in a maze of twisty special |
| 7572 |
pages, all alike, and never reaching your actual content. |
| 7573 |
**Example:** |
| 7574 |
``` |
| 7575 |
$wgNamespaceRobotPolicies = [ NS_TALK => 'noindex' ]; |
| 7576 |
``` |
| 7577 |
ArticleRobotPolicies: |
| 7578 |
default: { } |
| 7579 |
type: object |
| 7580 |
description: |- |
| 7581 |
Robot policies per article. These override the per-namespace robot policies. |
| 7582 |
Must be in the form of an array where the key part is a properly canonicalised |
| 7583 |
text form title and the value is a robot policy. |
| 7584 |
**Example:** |
| 7585 |
``` |
| 7586 |
$wgArticleRobotPolicies = [ |
| 7587 |
'Main Page' => 'noindex,follow', |
| 7588 |
'User:Bob' => 'index,follow', |
| 7589 |
]; |
| 7590 |
``` |
| 7591 |
**Example that DOES NOT WORK because the names are not canonical text** |
| 7592 |
forms: |
| 7593 |
``` |
| 7594 |
$wgArticleRobotPolicies = [ |
| 7595 |
// Underscore, not space! |
| 7596 |
'Main_Page' => 'noindex,follow', |
| 7597 |
// "Project", not the actual project name! |
| 7598 |
'Project:X' => 'index,follow', |
| 7599 |
// Needs to be "Abc", not "abc" (unless $wgCapitalLinks is false for that namespace)! |
| 7600 |
'abc' => 'noindex,nofollow' |
| 7601 |
]; |
| 7602 |
``` |
| 7603 |
ExemptFromUserRobotsControl: |
| 7604 |
default: null |
| 7605 |
type: |
| 7606 |
- array |
| 7607 |
- 'null' |
| 7608 |
description: |- |
| 7609 |
An array of namespace keys in which the __INDEX__/__NOINDEX__ magic words |
| 7610 |
will not function, so users can't decide whether pages in that namespace are |
| 7611 |
indexed by search engines. If set to null, default to $wgContentNamespaces. |
| 7612 |
**Example:** |
| 7613 |
``` |
| 7614 |
$wgExemptFromUserRobotsControl = [ NS_MAIN, NS_TALK, NS_PROJECT ]; |
| 7615 |
``` |
| 7616 |
DebugAPI: |
| 7617 |
default: false |
| 7618 |
description: |- |
| 7619 |
WARNING: SECURITY THREAT - debug use only |
| 7620 |
Disables many security checks in the API for debugging purposes. |
| 7621 |
This flag should never be used on the production servers, as it introduces |
| 7622 |
a number of potential security holes. Even when enabled, the validation |
| 7623 |
will still be performed, but instead of failing, API will return a warning. |
| 7624 |
Also, there will always be a warning notifying that this flag is set. |
| 7625 |
At this point, the flag allows GET requests to go through for modules |
| 7626 |
requiring POST. |
| 7627 |
@since 1.21 |
| 7628 |
APIModules: |
| 7629 |
default: { } |
| 7630 |
type: object |
| 7631 |
description: |- |
| 7632 |
API module extensions. |
| 7633 |
Associative array mapping module name to modules specs; |
| 7634 |
Each module spec is an associative array containing at least |
| 7635 |
the 'class' key for the module's class, and optionally a |
| 7636 |
'factory' key for the factory function to use for the module. |
| 7637 |
That factory function will be called with two parameters, |
| 7638 |
the parent module (an instance of ApiBase, usually ApiMain) |
| 7639 |
and the name the module was registered under. The return |
| 7640 |
value must be an instance of the class given in the 'class' |
| 7641 |
field. |
| 7642 |
For backward compatibility, the module spec may also be a |
| 7643 |
simple string containing the module's class name. In that |
| 7644 |
case, the class' constructor will be called with the parent |
| 7645 |
module and module name as parameters, as described above. |
| 7646 |
Examples for registering API modules: |
| 7647 |
``` |
| 7648 |
$wgAPIModules['foo'] = 'ApiFoo'; |
| 7649 |
$wgAPIModules['bar'] = [ |
| 7650 |
'class' => ApiBar::class, |
| 7651 |
'factory' => function( $main, $name ) { ... } |
| 7652 |
]; |
| 7653 |
$wgAPIModules['xyzzy'] = [ |
| 7654 |
'class' => ApiXyzzy::class, |
| 7655 |
'factory' => [ XyzzyFactory::class, 'newApiModule' ] |
| 7656 |
]; |
| 7657 |
``` |
| 7658 |
Extension modules may override the core modules. |
| 7659 |
See ApiMain::MODULES for a list of the core modules. |
| 7660 |
APIFormatModules: |
| 7661 |
default: { } |
| 7662 |
type: object |
| 7663 |
description: |- |
| 7664 |
API format module extensions. |
| 7665 |
Associative array mapping format module name to module specs (see $wgAPIModules). |
| 7666 |
Extension modules may override the core modules. |
| 7667 |
See ApiMain::FORMATS for a list of the core format modules. |
| 7668 |
APIMetaModules: |
| 7669 |
default: { } |
| 7670 |
type: object |
| 7671 |
description: |- |
| 7672 |
API Query meta module extensions. |
| 7673 |
Associative array mapping meta module name to module specs (see $wgAPIModules). |
| 7674 |
Extension modules may override the core modules. |
| 7675 |
See ApiQuery::QUERY_META_MODULES for a list of the core meta modules. |
| 7676 |
APIPropModules: |
| 7677 |
default: { } |
| 7678 |
type: object |
| 7679 |
description: |- |
| 7680 |
API Query prop module extensions. |
| 7681 |
Associative array mapping prop module name to module specs (see $wgAPIModules). |
| 7682 |
Extension modules may override the core modules. |
| 7683 |
See ApiQuery::QUERY_PROP_MODULES for a list of the core prop modules. |
| 7684 |
APIListModules: |
| 7685 |
default: { } |
| 7686 |
type: object |
| 7687 |
description: |- |
| 7688 |
API Query list module extensions. |
| 7689 |
Associative array mapping list module name to module specs (see $wgAPIModules). |
| 7690 |
Extension modules may override the core modules. |
| 7691 |
See ApiQuery::QUERY_LIST_MODULES for a list of the core list modules. |
| 7692 |
APIMaxDBRows: |
| 7693 |
default: 5000 |
| 7694 |
description: |- |
| 7695 |
Maximum amount of rows to scan in a DB query in the API |
| 7696 |
The default value is generally fine |
| 7697 |
APIMaxResultSize: |
| 7698 |
default: 8388608 |
| 7699 |
description: |- |
| 7700 |
The maximum size (in bytes) of an API result. |
| 7701 |
@warning Do not set this lower than $wgMaxArticleSize*1024 |
| 7702 |
APIMaxUncachedDiffs: |
| 7703 |
default: 1 |
| 7704 |
description: |- |
| 7705 |
The maximum number of uncached diffs that can be retrieved in one API |
| 7706 |
request. Set this to 0 to disable API diffs altogether |
| 7707 |
APIMaxLagThreshold: |
| 7708 |
default: 7 |
| 7709 |
description: |- |
| 7710 |
Maximum amount of DB lag on a majority of DB replica DBs to tolerate |
| 7711 |
before forcing bots to retry any write requests via API errors. |
| 7712 |
This should be lower than the 'max lag' value in $wgLBFactoryConf. |
| 7713 |
APIRequestLog: |
| 7714 |
default: false |
| 7715 |
deprecated: 'since 1.43; use api or api-request $wgDebugLogGroups channel' |
| 7716 |
description: |- |
| 7717 |
Log file or URL (TCP or UDP) to log API requests to, or false to disable |
| 7718 |
API request logging |
| 7719 |
APICacheHelpTimeout: |
| 7720 |
default: 3600 |
| 7721 |
description: 'Set the timeout for the API help text cache. If set to 0, caching disabled' |
| 7722 |
APIUselessQueryPages: |
| 7723 |
default: |
| 7724 |
- MIMEsearch |
| 7725 |
- LinkSearch |
| 7726 |
type: array |
| 7727 |
description: |- |
| 7728 |
The ApiQueryQueryPages module should skip pages that are redundant to true |
| 7729 |
API queries. |
| 7730 |
AjaxLicensePreview: |
| 7731 |
default: true |
| 7732 |
description: 'Enable previewing licences via AJAX.' |
| 7733 |
CrossSiteAJAXdomains: |
| 7734 |
default: { } |
| 7735 |
type: object |
| 7736 |
description: |- |
| 7737 |
Settings for incoming cross-site AJAX requests: |
| 7738 |
Newer browsers support cross-site AJAX when the target resource allows requests |
| 7739 |
from the origin domain by the Access-Control-Allow-Origin header. |
| 7740 |
This is currently only used by the API (requests to api.php) |
| 7741 |
$wgCrossSiteAJAXdomains can be set using a wildcard syntax: |
| 7742 |
- '*' matches any number of characters |
| 7743 |
- '?' matches any 1 character |
| 7744 |
**Example:** |
| 7745 |
``` |
| 7746 |
$wgCrossSiteAJAXdomains = [ |
| 7747 |
'www.mediawiki.org', |
| 7748 |
'*.wikipedia.org', |
| 7749 |
'*.wikimedia.org', |
| 7750 |
'*.wiktionary.org', |
| 7751 |
]; |
| 7752 |
``` |
| 7753 |
CrossSiteAJAXdomainExceptions: |
| 7754 |
default: { } |
| 7755 |
type: object |
| 7756 |
description: |- |
| 7757 |
Domains that should not be allowed to make AJAX requests, |
| 7758 |
even if they match one of the domains allowed by $wgCrossSiteAJAXdomains |
| 7759 |
Uses the same syntax as $wgCrossSiteAJAXdomains |
| 7760 |
AllowedCorsHeaders: |
| 7761 |
default: |
| 7762 |
- Accept |
| 7763 |
- Accept-Language |
| 7764 |
- Content-Language |
| 7765 |
- Content-Type |
| 7766 |
- Accept-Encoding |
| 7767 |
- DNT |
| 7768 |
- Origin |
| 7769 |
- User-Agent |
| 7770 |
- Api-User-Agent |
| 7771 |
- Access-Control-Max-Age |
| 7772 |
- Authorization |
| 7773 |
type: array |
| 7774 |
description: 'List of allowed headers for cross-origin API requests.' |
| 7775 |
RestAPIAdditionalRouteFiles: |
| 7776 |
default: [] |
| 7777 |
type: array |
| 7778 |
description: |- |
| 7779 |
Additional REST API Route files. |
| 7780 |
A common usage is to enable development/experimental endpoints only on test wikis. |
| 7781 |
MaxShellMemory: |
| 7782 |
default: 307200 |
| 7783 |
description: 'Maximum amount of virtual memory available to shell processes under linux, in KiB.' |
| 7784 |
MaxShellFileSize: |
| 7785 |
default: 102400 |
| 7786 |
description: |- |
| 7787 |
Maximum file size created by shell processes under linux, in KiB |
| 7788 |
ImageMagick convert for example can be fairly hungry for scratch space |
| 7789 |
MaxShellTime: |
| 7790 |
default: 180 |
| 7791 |
description: 'Maximum CPU time in seconds for shell processes under Linux' |
| 7792 |
MaxShellWallClockTime: |
| 7793 |
default: 180 |
| 7794 |
description: |- |
| 7795 |
Maximum wall clock time (i.e. real time, of the kind the clock on the wall |
| 7796 |
would measure) in seconds for shell processes under Linux |
| 7797 |
ShellCgroup: |
| 7798 |
default: false |
| 7799 |
description: |- |
| 7800 |
Under Linux: a cgroup directory used to constrain memory usage of shell |
| 7801 |
commands. The directory must be writable by the user which runs MediaWiki. |
| 7802 |
If specified, this is used instead of ulimit, which is inaccurate, and |
| 7803 |
causes malloc() to return NULL, which exposes bugs in C applications, making |
| 7804 |
them segfault or deadlock. |
| 7805 |
A wrapper script will create a cgroup for each shell command that runs, as |
| 7806 |
a subgroup of the specified cgroup. If the memory limit is exceeded, the |
| 7807 |
kernel will send a SIGKILL signal to a process in the subgroup. |
| 7808 |
**Example:** |
| 7809 |
``` |
| 7810 |
mkdir -p /sys/fs/cgroup/memory/mediawiki |
| 7811 |
mkdir -m 0777 /sys/fs/cgroup/memory/mediawiki/job |
| 7812 |
echo '$wgShellCgroup = "/sys/fs/cgroup/memory/mediawiki/job";' >> LocalSettings.php |
| 7813 |
``` |
| 7814 |
The reliability of cgroup cleanup can be improved by installing a |
| 7815 |
notify_on_release script in the root cgroup, see e.g. |
| 7816 |
https://gerrit.wikimedia.org/r/#/c/40784 |
| 7817 |
PhpCli: |
| 7818 |
default: /usr/bin/php |
| 7819 |
description: 'Executable path of the PHP cli binary. Should be set up on install.' |
| 7820 |
ShellRestrictionMethod: |
| 7821 |
default: autodetect |
| 7822 |
type: |
| 7823 |
- string |
| 7824 |
- boolean |
| 7825 |
description: |- |
| 7826 |
Method to use to restrict shell commands |
| 7827 |
Supported options: |
| 7828 |
- 'autodetect': Autodetect if any restriction methods are available |
| 7829 |
- 'firejail': Use firejail <https://firejail.wordpress.com/> |
| 7830 |
- false: Don't use any restrictions |
| 7831 |
@note If using firejail with MediaWiki running in a home directory different |
| 7832 |
from the webserver user, firejail 0.9.44+ is required. |
| 7833 |
@since 1.31 |
| 7834 |
ShellboxUrls: |
| 7835 |
default: |
| 7836 |
default: null |
| 7837 |
type: object |
| 7838 |
additionalProperties: |
| 7839 |
type: [string, boolean, 'null'] |
| 7840 |
description: |- |
| 7841 |
Shell commands can be run on a remote server using Shellbox. To use this |
| 7842 |
feature, set this to the URLs mapped by the service, and also configure $wgShellboxSecretKey. |
| 7843 |
You can also disable a certain service by setting it to false or null. |
| 7844 |
'default' would be the default URL if no URL is defined for that service. |
| 7845 |
For more information about installing Shellbox, see |
| 7846 |
https://www.mediawiki.org/wiki/Shellbox |
| 7847 |
@since 1.37 |
| 7848 |
ShellboxSecretKey: |
| 7849 |
default: null |
| 7850 |
type: |
| 7851 |
- string |
| 7852 |
- 'null' |
| 7853 |
description: |- |
| 7854 |
The secret key for HMAC verification of Shellbox requests. Set this to |
| 7855 |
a long random string. |
| 7856 |
@since 1.36 |
| 7857 |
ShellboxShell: |
| 7858 |
default: /bin/sh |
| 7859 |
type: |
| 7860 |
- string |
| 7861 |
- 'null' |
| 7862 |
description: |- |
| 7863 |
The POSIX-compatible shell to use when running scripts. This is used by |
| 7864 |
some media handling shell commands. |
| 7865 |
If ShellboxUrls is configured, this path should exist on the remote side. |
| 7866 |
On Windows this should be the full path to bash.exe, not git-bash.exe. |
| 7867 |
@since 1.42 |
| 7868 |
HTTPTimeout: |
| 7869 |
default: 25 |
| 7870 |
type: number |
| 7871 |
description: |- |
| 7872 |
Timeout for HTTP requests done internally, in seconds. |
| 7873 |
@since 1.5 |
| 7874 |
HTTPConnectTimeout: |
| 7875 |
default: 5.0 |
| 7876 |
type: number |
| 7877 |
description: |- |
| 7878 |
Timeout for connections done internally (in seconds). |
| 7879 |
Only supported if cURL is installed, ignored otherwise. |
| 7880 |
@since 1.22 |
| 7881 |
HTTPMaxTimeout: |
| 7882 |
default: 0 |
| 7883 |
type: number |
| 7884 |
description: |- |
| 7885 |
The maximum HTTP request timeout in seconds. If any specified or configured |
| 7886 |
request timeout is larger than this, then this value will be used instead. |
| 7887 |
Zero is interpreted as "no limit". |
| 7888 |
@since 1.35 |
| 7889 |
HTTPMaxConnectTimeout: |
| 7890 |
default: 0 |
| 7891 |
type: number |
| 7892 |
description: |- |
| 7893 |
The maximum HTTP connect timeout in seconds. If any specified or configured |
| 7894 |
connect timeout is larger than this, then this value will be used instead. |
| 7895 |
Zero is interpreted as "no limit". |
| 7896 |
@since 1.35 |
| 7897 |
HTTPImportTimeout: |
| 7898 |
default: 25 |
| 7899 |
description: |- |
| 7900 |
Timeout for HTTP requests done internally for transwiki imports, in seconds. |
| 7901 |
@since 1.29 |
| 7902 |
AsyncHTTPTimeout: |
| 7903 |
default: 25 |
| 7904 |
description: 'Timeout for Asynchronous (background) HTTP requests, in seconds.' |
| 7905 |
HTTPProxy: |
| 7906 |
default: '' |
| 7907 |
description: 'Proxy to use for CURL requests.' |
| 7908 |
LocalVirtualHosts: |
| 7909 |
default: { } |
| 7910 |
type: object |
| 7911 |
description: |- |
| 7912 |
Local virtual hosts. |
| 7913 |
This lists domains that are configured as virtual hosts on the same machine. |
| 7914 |
It is expected that each domain can be identified by its hostname alone, |
| 7915 |
without any ports. |
| 7916 |
This affects the following: |
| 7917 |
- MWHttpRequest: If a request is to be made to a domain listed here, or any |
| 7918 |
subdomain thereof, then $wgLocalHTTPProxy will be used. |
| 7919 |
Command-line scripts are not affected by this setting and will always use |
| 7920 |
the proxy if it is configured. |
| 7921 |
@since 1.25 |
| 7922 |
LocalHTTPProxy: |
| 7923 |
default: false |
| 7924 |
type: |
| 7925 |
- string |
| 7926 |
- boolean |
| 7927 |
description: |- |
| 7928 |
Reverse proxy to use for requests to domains in $wgLocalVirtualHosts |
| 7929 |
When used, any port in the request URL will be dropped. The behavior of |
| 7930 |
redirects and cookies is dependent upon the reverse proxy actually in use, |
| 7931 |
as MediaWiki doesn't implement any special handling for them. |
| 7932 |
If set to false, no reverse proxy will be used for local requests. |
| 7933 |
@since 1.38 |
| 7934 |
AllowExternalReqID: |
| 7935 |
default: false |
| 7936 |
description: |- |
| 7937 |
Whether to respect/honour |
| 7938 |
- request ID provided by the incoming request via the `X-Request-Id` |
| 7939 |
- trace context provided by the incoming request via the `tracestate` and `traceparent` |
| 7940 |
Set to `true` if the entity sitting in front of MediaWiki sanitises external requests. |
| 7941 |
Default: `false`. |
| 7942 |
JobRunRate: |
| 7943 |
default: 1 |
| 7944 |
description: |- |
| 7945 |
Number of jobs to perform per request. May be less than one in which case jobs are |
| 7946 |
performed probabilistically. If this is zero, jobs will not be done during ordinary |
| 7947 |
apache requests. In this case, maintenance/runJobs.php should be run in loop every |
| 7948 |
few seconds via a service or cron job. If using a cron job, be sure to handle the |
| 7949 |
case where the script is already running (e.g. via `/usr/bin/flock -n <lock_file>`). |
| 7950 |
If this is set to a non-zero number, then it is highly recommended that PHP run in |
| 7951 |
fastcgi mode (php_fpm). When using a standard Apache PHP handler (mod_php), it is |
| 7952 |
recommended that output_buffering and zlib.output_compression both be set to "Off", |
| 7953 |
allowing MediaWiki to install an unlimited size output buffer on the fly. Setting |
| 7954 |
output_buffering to an integer (e.g. 4096) or enabling zlib.output_compression can |
| 7955 |
cause user-visible slowness as background tasks execute during web requests. |
| 7956 |
Regardless of the web server engine in use, be sure to configure a sufficient number |
| 7957 |
processes/threads in order to avoid exhaustion (which will cause user-visible slowness). |
| 7958 |
RunJobsAsync: |
| 7959 |
default: false |
| 7960 |
description: |- |
| 7961 |
When $wgJobRunRate > 0, try to run jobs asynchronously, spawning a new process |
| 7962 |
to handle the job execution, instead of blocking the request until the job |
| 7963 |
execution finishes. |
| 7964 |
@since 1.23 |
| 7965 |
UpdateRowsPerJob: |
| 7966 |
default: 300 |
| 7967 |
description: 'Number of rows to update per job' |
| 7968 |
UpdateRowsPerQuery: |
| 7969 |
default: 100 |
| 7970 |
description: 'Number of rows to update per query' |
| 7971 |
RedirectOnLogin: |
| 7972 |
default: null |
| 7973 |
description: |- |
| 7974 |
Allow redirection to another page when a user logs in. |
| 7975 |
To enable, set to a string like 'Main Page' |
| 7976 |
VirtualRestConfig: |
| 7977 |
default: |
| 7978 |
paths: [] |
| 7979 |
modules: [] |
| 7980 |
global: { timeout: 360, forwardCookies: false, HTTPProxy: null } |
| 7981 |
mergeStrategy: array_plus_2d |
| 7982 |
type: object |
| 7983 |
description: |- |
| 7984 |
Global configuration variable for Virtual REST Services. |
| 7985 |
Use the 'path' key to define automatically mounted services. The value for this |
| 7986 |
key is a map of path prefixes to service configuration. The latter is an array of: |
| 7987 |
- class : the fully qualified class name |
| 7988 |
- options : map of arguments to the class constructor |
| 7989 |
Such services will be available to handle queries under their path from the VRS |
| 7990 |
singleton, e.g. MediaWikiServices::getInstance()->getVirtualRESTServiceClient(); |
| 7991 |
Auto-mounting example for Parsoid: |
| 7992 |
$wgVirtualRestConfig['paths']['/parsoid/'] = [ |
| 7993 |
'class' => ParsoidVirtualRESTService::class, |
| 7994 |
'options' => [ |
| 7995 |
'url' => 'http://localhost:8000', |
| 7996 |
'prefix' => 'enwiki', |
| 7997 |
'domain' => 'en.wikipedia.org' |
| 7998 |
] |
| 7999 |
]; |
| 8000 |
Parameters for different services can also be declared inside the 'modules' value, |
| 8001 |
which is to be treated as an associative array. The parameters in 'global' will be |
| 8002 |
merged with service-specific ones. The result will then be passed to |
| 8003 |
VirtualRESTService::__construct() in the module. |
| 8004 |
Example config for Parsoid: |
| 8005 |
$wgVirtualRestConfig['modules']['parsoid'] = [ |
| 8006 |
'url' => 'http://localhost:8000', |
| 8007 |
'prefix' => 'enwiki', |
| 8008 |
'domain' => 'en.wikipedia.org', |
| 8009 |
]; |
| 8010 |
@since 1.25 |
| 8011 |
EventRelayerConfig: |
| 8012 |
default: |
| 8013 |
default: { class: Wikimedia\EventRelayer\EventRelayerNull } |
| 8014 |
type: object |
| 8015 |
description: |- |
| 8016 |
Mapping of event channels (or channel categories) to EventRelayer configuration. |
| 8017 |
By setting up a PubSub system (like Kafka) and enabling a corresponding EventRelayer class |
| 8018 |
that uses it, MediaWiki can broadcast events to all subscribers. Certain features like WAN |
| 8019 |
cache purging and CDN cache purging will emit events to this system. Appropriate listeners |
| 8020 |
can subscribe to the channel and take actions based on the events. For example, a local daemon |
| 8021 |
can run on each CDN cache node and perform local purges based on the URL purge channel |
| 8022 |
events. |
| 8023 |
Some extensions may want to use "channel categories" so that different channels can also |
| 8024 |
share the same custom relayer instance (e.g. when it's likely to be overridden). They can use |
| 8025 |
EventRelayerGroup::getRelayer() based on the category but call notify() on various different |
| 8026 |
actual channels. One reason for this would be that some systems have very different |
| 8027 |
performance vs durability needs, so one system (e.g. Kafka) may not be suitable for all |
| 8028 |
uses. |
| 8029 |
The 'default' key is for all channels (or channel categories) without an explicit entry |
| 8030 |
here. |
| 8031 |
@since 1.27 |
| 8032 |
Pingback: |
| 8033 |
default: false |
| 8034 |
type: boolean |
| 8035 |
description: |- |
| 8036 |
Share data about this installation with MediaWiki developers |
| 8037 |
When set to true, MediaWiki will periodically ping https://www.mediawiki.org/ with basic |
| 8038 |
data about this MediaWiki instance. This data includes, for example, the type of system, |
| 8039 |
PHP version, and chosen database backend. The Wikimedia Foundation shares this data with |
| 8040 |
MediaWiki developers to help guide future development efforts. |
| 8041 |
For details about what data is sent, see: https://www.mediawiki.org/wiki/Manual:$wgPingback |
| 8042 |
For the pingback privacy policy, see: |
| 8043 |
https://wikimediafoundation.org/wiki/MediaWiki_Pingback_Privacy_Statement |
| 8044 |
Aggregate pingback data is available at: https://pingback.wmcloud.org/ |
| 8045 |
@since 1.28 |
| 8046 |
OriginTrials: |
| 8047 |
default: [] |
| 8048 |
type: array |
| 8049 |
description: |- |
| 8050 |
Origin Trials tokens. |
| 8051 |
@since 1.33 |
| 8052 |
ReportToExpiry: |
| 8053 |
default: 86400 |
| 8054 |
type: integer |
| 8055 |
description: |- |
| 8056 |
Expiry of the endpoint definition for the Reporting API. |
| 8057 |
@unstable EXPERIMENTAL |
| 8058 |
@since 1.34 |
| 8059 |
ReportToEndpoints: |
| 8060 |
default: [] |
| 8061 |
type: array |
| 8062 |
description: |- |
| 8063 |
List of endpoints for the Reporting API. |
| 8064 |
@unstable EXPERIMENTAL |
| 8065 |
@since 1.34 |
| 8066 |
FeaturePolicyReportOnly: |
| 8067 |
default: [] |
| 8068 |
type: array |
| 8069 |
description: |- |
| 8070 |
List of Feature Policy Reporting types to enable. |
| 8071 |
Each entry is turned into a Feature-Policy-Report-Only header. |
| 8072 |
@unstable EXPERIMENTAL |
| 8073 |
@since 1.34 |
| 8074 |
SkinsPreferred: |
| 8075 |
default: |
| 8076 |
- vector-2022 |
| 8077 |
- vector |
| 8078 |
type: array |
| 8079 |
description: |- |
| 8080 |
List of preferred skins to be listed higher in Special:Preferences |
| 8081 |
@since 1.38 |
| 8082 |
SpecialContributeSkinsEnabled: |
| 8083 |
default: [] |
| 8084 |
type: array |
| 8085 |
description: |- |
| 8086 |
List of skins that show a link to the Special:Contribute page |
| 8087 |
@since 1.40 |
| 8088 |
EnableEditRecovery: |
| 8089 |
default: false |
| 8090 |
type: boolean |
| 8091 |
description: |- |
| 8092 |
Whether to enable the client-side edit recovery feature. |
| 8093 |
@unstable Temporary feature flag, T341844 |
| 8094 |
@since 1.41 |
| 8095 |
EditRecoveryExpiry: |
| 8096 |
default: 2592000 |
| 8097 |
type: integer |
| 8098 |
description: 'Number of seconds to keep edit recovery data after the edit is stored.' |
| 8099 |
UseCodexSpecialBlock: |
| 8100 |
default: false |
| 8101 |
type: boolean |
| 8102 |
description: |- |
| 8103 |
Whether to use Codex in Special:Block form. |
| 8104 |
@unstable Temporary feature flag, T358153 |
| 8105 |
@since 1.42 |
| 8106 |
ShowLogoutConfirmation: |
| 8107 |
default: false |
| 8108 |
type: boolean |
| 8109 |
description: |- |
| 8110 |
Whether to display a confirmation screen during user log out. |
| 8111 |
@unstable Temporary feature flag, T357484 |
| 8112 |
@since 1.42 |
| 8113 |
EnableProtectionIndicators: |
| 8114 |
default: false |
| 8115 |
type: boolean |
| 8116 |
description: |- |
| 8117 |
Whether to show indicators on a page when it is protected. |
| 8118 |
@since 1.43 |
| 8119 |
OutputPipelineStages: |
| 8120 |
default: { } |
| 8121 |
type: object |
| 8122 |
description: |- |
| 8123 |
OutputPipelineStages to add to the DefaultOutputPipeline. |
| 8124 |
@unstable EXPERIMENTAL |
| 8125 |
@since 1.43 |