CentralIdLookup: Add @since to factoryNonLocal()
[mediawiki.git] / includes / DefaultSettings.php
blob60347ddd6a4fdcd4b4837b053d24d9720ae028c0
1 <?php
2 /**
3 * Default values for MediaWiki configuration settings.
6 * NEVER EDIT THIS FILE
9 * To customize your installation, edit "LocalSettings.php". If you make
10 * changes here, they will be lost on next upgrade of MediaWiki!
12 * In this file, variables whose default values depend on other
13 * variables are set to false. The actual default value of these variables
14 * will only be set in Setup.php, taking into account any custom settings
15 * performed in LocalSettings.php.
17 * Documentation is in the source and on:
18 * https://www.mediawiki.org/wiki/Manual:Configuration_settings
20 * @warning Note: this (and other things) will break if the autoloader is not
21 * enabled. Please include includes/AutoLoader.php before including this file.
23 * This program is free software; you can redistribute it and/or modify
24 * it under the terms of the GNU General Public License as published by
25 * the Free Software Foundation; either version 2 of the License, or
26 * (at your option) any later version.
28 * This program is distributed in the hope that it will be useful,
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU General Public License for more details.
33 * You should have received a copy of the GNU General Public License along
34 * with this program; if not, write to the Free Software Foundation, Inc.,
35 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
36 * http://www.gnu.org/copyleft/gpl.html
38 * @file
41 /**
42 * @cond file_level_code
43 * This is not a valid entry point, perform no further processing unless
44 * MEDIAWIKI is defined
46 if ( !defined( 'MEDIAWIKI' ) ) {
47 echo "This file is part of MediaWiki and is not a valid entry point\n";
48 die( 1 );
51 /** @endcond */
53 /**
54 * $wgConf hold the site configuration.
55 * Not used for much in a default install.
56 * @since 1.5
58 $wgConf = new SiteConfiguration;
60 /**
61 * Registry of factory functions to create config objects:
62 * The 'main' key must be set, and the value should be a valid
63 * callable.
64 * @since 1.23
66 $wgConfigRegistry = [
67 'main' => 'GlobalVarConfig::newInstance'
70 /**
71 * MediaWiki version number
72 * @since 1.2
73 * @deprecated since 1.35; use the MW_VERSION constant instead
75 $wgVersion = MW_VERSION;
77 /**
78 * Name of the site. It must be changed in LocalSettings.php
80 $wgSitename = 'MediaWiki';
82 /** @} */
84 /************************************************************************//**
85 * @name Server URLs and file paths
87 * In this section, a "path" is usually a host-relative URL, i.e. a URL without
88 * the host part, that starts with a slash. In most cases a full URL is also
89 * acceptable. A "directory" is a local file path.
91 * In both paths and directories, trailing slashes should not be included.
93 * @{
96 /**
97 * URL of the server.
99 * @par Example:
100 * @code
101 * $wgServer = 'http://example.com';
102 * @endcode
104 * This must be set in LocalSettings.php. The MediaWiki installer does this
105 * automatically since 1.18.
107 * If you want to use protocol-relative URLs on your wiki, set this to a
108 * protocol-relative URL like '//example.com' and set $wgCanonicalServer
109 * to a fully qualified URL.
111 $wgServer = false;
114 * Canonical URL of the server, to use in IRC feeds and notification e-mails.
115 * Must be fully qualified, even if $wgServer is protocol-relative.
117 * Defaults to $wgServer, expanded to a fully qualified http:// URL if needed.
118 * @since 1.18
120 $wgCanonicalServer = false;
123 * Server name. This is automatically computed by parsing the bare
124 * hostname out of $wgCanonicalServer. It should not be customized.
125 * @since 1.24
127 $wgServerName = false;
130 * When the wiki is running behind a proxy and this is set to true, assumes that the proxy exposes
131 * the wiki on the standard ports (443 for https and 80 for http).
132 * @var bool
133 * @since 1.26
135 $wgAssumeProxiesUseDefaultProtocolPorts = true;
138 * For installations where the canonical server is HTTP but HTTPS is optionally
139 * supported, you can specify a non-standard HTTPS port here. $wgServer should
140 * be a protocol-relative URL.
142 * If HTTPS is always used, just specify the port number in $wgServer.
144 * @see https://phabricator.wikimedia.org/T67184
146 * @since 1.24
148 $wgHttpsPort = 443;
151 * If this is true, when an insecure HTTP request is received, always redirect
152 * to HTTPS. This overrides and disables the preferhttps user preference, and it
153 * overrides $wgSecureLogin and the CanIPUseHTTPS hook.
155 * $wgServer may be either https or protocol-relative. If $wgServer starts with
156 * "http://", an exception will be thrown.
158 * If a reverse proxy or CDN is used to forward requests from HTTPS to HTTP,
159 * the request header "X-Forwarded-Proto: https" should be sent to suppress
160 * the redirect.
162 * In addition to setting this to true, for optimal security, the web server
163 * should also be configured to send Strict-Transport-Security response headers.
165 * @var bool
166 * @since 1.35
168 $wgForceHTTPS = false;
171 * The path we should point to.
172 * It might be a virtual path in case with use apache mod_rewrite for example.
174 * This *needs* to be set correctly.
176 * Other paths will be set to defaults based on it unless they are directly
177 * set in LocalSettings.php
179 $wgScriptPath = '/wiki';
182 * Whether to support URLs like index.php/Page_title These often break when PHP
183 * is set up in CGI mode. PATH_INFO *may* be correct if cgi.fix_pathinfo is set,
184 * but then again it may not; lighttpd converts incoming path data to lowercase
185 * on systems with case-insensitive filesystems, and there have been reports of
186 * problems on Apache as well.
188 * To be safe we'll continue to keep it off by default.
190 * Override this to false if $_SERVER['PATH_INFO'] contains unexpectedly
191 * incorrect garbage, or to true if it is really correct.
193 * The default $wgArticlePath will be set based on this value at runtime, but if
194 * you have customized it, having this incorrectly set to true can cause
195 * redirect loops when "pretty URLs" are used.
196 * @since 1.2.1
198 $wgUsePathInfo = ( strpos( PHP_SAPI, 'cgi' ) === false ) &&
199 ( strpos( PHP_SAPI, 'apache2filter' ) === false ) &&
200 ( strpos( PHP_SAPI, 'isapi' ) === false );
203 * The URL path to index.php.
205 * Defaults to "{$wgScriptPath}/index.php".
207 $wgScript = false;
210 * The URL path to load.php.
212 * Defaults to "{$wgScriptPath}/load.php".
213 * @since 1.17
215 $wgLoadScript = false;
218 * The URL path to the REST API
219 * Defaults to "{$wgScriptPath}/rest.php"
220 * @since 1.34
222 $wgRestPath = false;
225 * The URL path of the skins directory.
226 * Defaults to "{$wgResourceBasePath}/skins".
227 * @since 1.3
229 $wgStylePath = false;
230 $wgStyleSheetPath = &$wgStylePath;
233 * The URL path of the skins directory. Should not point to an external domain.
234 * Defaults to "{$wgScriptPath}/skins".
235 * @since 1.17
237 $wgLocalStylePath = false;
240 * The URL path of the extensions directory.
241 * Defaults to "{$wgResourceBasePath}/extensions".
242 * @since 1.16
244 $wgExtensionAssetsPath = false;
247 * Filesystem extensions directory.
248 * Defaults to "{$IP}/extensions".
249 * @since 1.25
251 $wgExtensionDirectory = "{$IP}/extensions";
254 * Filesystem stylesheets directory.
255 * Defaults to "{$IP}/skins".
256 * @since 1.3
258 $wgStyleDirectory = "{$IP}/skins";
261 * The URL path for primary article page views. This path should contain $1,
262 * which is replaced by the article title.
264 * Defaults to "{$wgScript}/$1" or "{$wgScript}?title=$1",
265 * depending on $wgUsePathInfo.
267 $wgArticlePath = false;
270 * The URL path for the images directory.
271 * Defaults to "{$wgScriptPath}/images".
273 $wgUploadPath = false;
276 * The base path for img_auth.php. This is used to interpret the request URL
277 * for requests to img_auth.php that do not match the base upload path. If
278 * false, "{$wgScriptPath}/img_auth.php" is used.
280 * Normally, requests to img_auth.php have a REQUEST_URI which matches
281 * $wgUploadPath, and in that case, setting this should not be necessary.
282 * This variable is used in case img_auth.php is accessed via a different path
283 * than $wgUploadPath.
285 * @since 1.35
287 $wgImgAuthPath = false;
290 * The filesystem path of the images directory. Defaults to "{$IP}/images".
292 $wgUploadDirectory = false;
295 * Directory where the cached page will be saved.
296 * Defaults to "{$wgUploadDirectory}/cache".
298 $wgFileCacheDirectory = false;
301 * The URL path of the wiki logo. The logo size should be 135x135 pixels.
302 * Defaults to "$wgResourceBasePath/resources/assets/wiki.png".
303 * Developers should retrieve this logo (and other variants) using
304 * the static function ResourceLoaderSkinModule::getAvailableLogos
305 * Ignored if $wgLogos is set.
307 $wgLogo = false;
310 * The URL path to various wiki logos.
311 * The `1x` logo size should be 135x135 pixels.
312 * The `1.5x` 1.5x version of square logo
313 * The `2x` 2x version of square logo
314 * The `svg` version of square logo
315 * The `wordmark` key should point to an array with the following fields
316 * - `src` relative or absolute path to a landscape logo
317 * - `width` defining the width of the logo in pixels.
318 * - `height` defining the height of the logo in pixels.
319 * All values can be either an absolute or relative URI
320 * Configuration is optional provided $wgLogo is used instead.
321 * Defaults to [ "1x" => $wgLogo ],
322 * or [ "1x" => "$wgResourceBasePath/resources/assets/wiki.png" ] if $wgLogo is not set.
323 * @since 1.35
324 * @var array|false
326 $wgLogos = false;
329 * Array with URL paths to HD versions of the wiki logo. The scaled logo size
330 * should be under 135x155 pixels.
331 * Only 1.5x and 2x versions are supported.
333 * @par Example:
334 * @code
335 * $wgLogoHD = [
336 * "1.5x" => "path/to/1.5x_version.png",
337 * "2x" => "path/to/2x_version.png"
338 * ];
339 * @endcode
341 * SVG is also supported but when enabled, it
342 * disables 1.5x and 2x as svg will already
343 * be optimised for screen resolution.
345 * @par Example:
346 * @code
347 * $wgLogoHD = [
348 * "svg" => "path/to/svg_version.svg",
349 * ];
350 * @endcode
352 * @var array|false
353 * @since 1.25
354 * @deprecated since 1.35. Developers should retrieve this logo (and other variants) using
355 * the static function ResourceLoaderSkinModule::getAvailableLogos. $wgLogos should be used
356 * instead.
358 $wgLogoHD = false;
361 * The URL path of the shortcut icon.
362 * @since 1.6
364 $wgFavicon = '/favicon.ico';
367 * The URL path of the icon for iPhone and iPod Touch web app bookmarks.
368 * Defaults to no icon.
369 * @since 1.12
371 $wgAppleTouchIcon = false;
374 * Value for the referrer policy meta tag.
375 * One or more of the values defined in the Referrer Policy specification:
376 * https://w3c.github.io/webappsec-referrer-policy/
377 * ('no-referrer', 'no-referrer-when-downgrade', 'same-origin',
378 * 'origin', 'strict-origin', 'origin-when-cross-origin',
379 * 'strict-origin-when-cross-origin', or 'unsafe-url')
380 * Setting it to false prevents the meta tag from being output
381 * (which results in falling back to the Referrer-Policy header,
382 * or 'no-referrer-when-downgrade' if that's not set either.)
383 * Setting it to an array (supported since 1.31) will create a meta tag for
384 * each value, in the reverse of the order (meaning that the first array element
385 * will be the default and the others used as fallbacks for browsers which do not
386 * understand it).
388 * @var array|string|bool
389 * @since 1.25
391 $wgReferrerPolicy = false;
394 * The local filesystem path to a temporary directory. This must not be web accessible.
396 * When this setting is set to false, its value will automatically be decided
397 * through the first call to wfTempDir(). See that method's implementation for
398 * the actual detection logic.
400 * To find the temporary path for the current wiki, developers must not use
401 * this variable directly. Use the global function wfTempDir() instead.
403 * The temporary directory is expected to be shared with other applications,
404 * including other MediaWiki instances (which might not run the same version
405 * or configution). When storing files here, take care to avoid conflicts
406 * with other instances of MediaWiki. For example, when caching the result
407 * of a computation, the file name should incorporate the input of the
408 * computation so that it cannot be confused for the result of a similar
409 * computation by another MediaWiki instance.
411 * @see wfTempDir()
412 * @note Default changed to false in MediaWiki 1.20.
414 $wgTmpDirectory = false;
417 * If set, this URL is added to the start of $wgUploadPath to form a complete
418 * upload URL.
419 * @since 1.4
421 $wgUploadBaseUrl = '';
424 * To enable remote on-demand scaling, set this to the thumbnail base URL.
425 * Full thumbnail URL will be like $wgUploadStashScalerBaseUrl/e/e6/Foo.jpg/123px-Foo.jpg
426 * where 'e6' are the first two characters of the MD5 hash of the file name.
427 * If $wgUploadStashScalerBaseUrl is set to false, thumbs are rendered locally as needed.
428 * @since 1.17
430 $wgUploadStashScalerBaseUrl = false;
433 * To set 'pretty' URL paths for actions other than
434 * plain page views, add to this array.
436 * @par Example:
437 * Set pretty URL for the edit action:
438 * @code
439 * 'edit' => "$wgScriptPath/edit/$1"
440 * @endcode
442 * There must be an appropriate script or rewrite rule in place to handle these
443 * URLs.
444 * @since 1.5
446 $wgActionPaths = [];
448 /** @} */
450 /************************************************************************//**
451 * @name Files and file uploads
452 * @{
456 * Allow users to upload files.
458 * Use $wgLocalFileRepo to control how and where uploads are stored.
459 * Disabled by default as for security reasons.
460 * See <https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads>.
462 * @since 1.5
464 $wgEnableUploads = false;
467 * The maximum age of temporary (incomplete) uploaded files
469 $wgUploadStashMaxAge = 6 * 3600; // 6 hours
472 * Allows to move images and other media files
474 * @deprecated since 1.35, use group permission settings instead.
475 * (eg $wgGroupPermissions['sysop']['movefile'] = false; to revoke the
476 * ability from sysops)
478 $wgAllowImageMoving = true;
481 * Enable deferred upload tasks that use the job queue.
482 * Only enable this if job runners are set up for both the
483 * 'AssembleUploadChunks' and 'PublishStashedFile' job types.
485 * @note If you use suhosin, this setting is incompatible with
486 * suhosin.session.encrypt.
488 $wgEnableAsyncUploads = false;
491 * Additional characters that are not allowed in filenames. They are replaced with '-' when
492 * uploading. Like $wgLegalTitleChars, this is a regexp character class.
494 * Slashes and backslashes are disallowed regardless of this setting, but included here for
495 * completeness.
497 $wgIllegalFileChars = ":\\/\\\\";
500 * What directory to place deleted uploads in.
501 * Defaults to "{$wgUploadDirectory}/deleted".
503 $wgDeletedDirectory = false;
506 * Set this to true if you use img_auth and want the user to see details on why access failed.
508 $wgImgAuthDetails = false;
511 * Map of relative URL directories to match to internal mwstore:// base storage paths.
512 * For img_auth.php requests, everything after "img_auth.php/" is checked to see
513 * if starts with any of the prefixes defined here. The prefixes should not overlap.
514 * The prefix that matches has a corresponding storage path, which the rest of the URL
515 * is assumed to be relative to. The file at that path (or a 404) is send to the client.
517 * Example:
518 * $wgImgAuthUrlPathMap['/timeline/'] = 'mwstore://local-fs/timeline-render/';
519 * The above maps ".../img_auth.php/timeline/X" to "mwstore://local-fs/timeline-render/".
520 * The name "local-fs" should correspond by name to an entry in $wgFileBackends.
522 * @see $wgFileBackends
524 $wgImgAuthUrlPathMap = [];
527 * File repository structures
529 * $wgLocalFileRepo is a single repository structure, and $wgForeignFileRepos is
530 * an array of such structures. Each repository structure is an associative
531 * array of properties configuring the repository.
533 * Properties required for all repos:
534 * - class The class name for the repository. May come from the core or an extension.
535 * The core repository classes are FileRepo, LocalRepo, ForeignDBRepo.
537 * - name A unique name for the repository (but $wgLocalFileRepo should be 'local').
538 * The name should consist of alpha-numeric characters.
539 * - backend A file backend name (see $wgFileBackends).
541 * For most core repos:
542 * - zones Associative array of zone names that each map to an array with:
543 * container : backend container name the zone is in
544 * directory : root path within container for the zone
545 * url : base URL to the root of the zone
546 * urlsByExt : map of file extension types to base URLs
547 * (useful for using a different cache for videos)
548 * Zones default to using "<repo name>-<zone name>" as the container name
549 * and default to using the container root as the zone's root directory.
550 * Nesting of zone locations within other zones should be avoided.
551 * - url Public zone URL. The 'zones' settings take precedence.
552 * - hashLevels The number of directory levels for hash-based division of files.
554 * Set this to 0 if you do not want MediaWiki to divide your images
555 * directory into many subdirectories.
557 * It is recommended to leave this enabled. In previous versions of
558 * MediaWiki, some users set this to false to allow images to be added to
559 * the wiki by copying them into $wgUploadDirectory and then running
560 * maintenance/rebuildImages.php to register them in the database.
561 * This is no longer supported, use maintenance/importImages.php instead.
563 * Default: 2.
564 * - deletedHashLevels
565 * Optional 'hashLevels' override for the 'deleted' zone.
566 * - thumbScriptUrl The URL for thumb.php (optional, not recommended)
567 * - transformVia404 Whether to skip media file transformation on parse and rely on a 404
568 * handler instead.
569 * - initialCapital Equivalent to $wgCapitalLinks (or $wgCapitalLinkOverrides[NS_FILE],
570 * determines whether filenames implicitly start with a capital letter.
571 * The current implementation may give incorrect description page links
572 * when the local $wgCapitalLinks and initialCapital are mismatched.
573 * - pathDisclosureProtection
574 * May be 'paranoid' to remove all parameters from error messages, 'none' to
575 * leave the paths in unchanged, or 'simple' to replace paths with
576 * placeholders. Default for LocalRepo is 'simple'.
577 * - fileMode This allows wikis to set the file mode when uploading/moving files. Default
578 * is 0644.
579 * - directory The local filesystem directory where public files are stored. Not used for
580 * some remote repos.
581 * - thumbDir The base thumbnail directory. Defaults to "<directory>/thumb".
582 * - thumbUrl The base thumbnail URL. Defaults to "<url>/thumb".
583 * - isPrivate Set this if measures should always be taken to keep the files private.
584 * One should not trust this to assure that the files are not web readable;
585 * the server configuration should be done manually depending on the backend.
587 * These settings describe a foreign MediaWiki installation. They are optional, and will be ignored
588 * for local repositories:
589 * - descBaseUrl URL of image description pages, e.g. https://en.wikipedia.org/wiki/File:
590 * - scriptDirUrl URL of the MediaWiki installation, equivalent to $wgScriptPath, e.g.
591 * https://en.wikipedia.org/w
592 * - articleUrl Equivalent to $wgArticlePath, e.g. https://en.wikipedia.org/wiki/$1
593 * - fetchDescription Fetch the text of the remote file description page and display them
594 * on the local wiki.
595 * - abbrvThreshold File names over this size will use the short form of thumbnail names.
596 * Short thumbnail names only have the width, parameters, and the extension.
598 * ForeignDBRepo:
599 * - dbType, dbServer, dbUser, dbPassword, dbName, dbFlags
600 * equivalent to the corresponding member of $wgDBservers
601 * - tablePrefix Table prefix, the foreign wiki's $wgDBprefix
602 * - hasSharedCache Set to true if the foreign wiki's $wgMainCacheType is identical to,
603 * and accessible from, this wiki.
605 * ForeignAPIRepo:
606 * - apibase Use for the foreign API's URL
607 * - apiThumbCacheExpiry How long to locally cache thumbs for
609 * If you leave $wgLocalFileRepo set to false, Setup will fill in appropriate values.
610 * Otherwise, set $wgLocalFileRepo to a repository structure as described above.
611 * If you set $wgUseInstantCommons to true, it will add an entry for Commons.
612 * If you set $wgForeignFileRepos to an array of repository structures, those will
613 * be searched after the local file repo.
614 * Otherwise, you will only have access to local media files.
616 * @see FileRepo::__construct for the default options.
617 * @see Setup.php for an example usage and default initialization.
619 $wgLocalFileRepo = false;
622 * Enable the use of files from one or more other wikis.
624 * If you operate multiple wikis, you can declare a shared upload path here.
625 * Uploads to the local wiki will NOT be stored here - See $wgLocalFileRepo
626 * and $wgUploadDirectory for that.
628 * The wiki will only consider the foreign repository if no file of the given name
629 * is found in the local repository (e.g. via `[[File:..]]` syntax).
631 * @since 1.11
632 * @see $wgLocalFileRepo
634 $wgForeignFileRepos = [];
637 * Use Wikimedia Commons as a foreign file repository.
639 * This is a shortcut for adding an entry to to $wgForeignFileRepos
640 * for https://commons.wikimedia.org, using ForeignAPIRepo with the
641 * default settings.
643 * @since 1.16
645 $wgUseInstantCommons = false;
648 * Shortcut for adding an entry to $wgForeignFileRepos.
650 * Uses the following variables:
652 * - directory: $wgSharedUploadDirectory.
653 * - url: $wgSharedUploadPath.
654 * - hashLevels: Based on $wgHashedSharedUploadDirectory.
655 * - thumbScriptUrl: $wgSharedThumbnailScriptPath.
656 * - transformVia404: Based on $wgGenerateThumbnailOnParse.
657 * - descBaseUrl: $wgRepositoryBaseUrl.
658 * - fetchDescription: $wgFetchCommonsDescriptions.
660 * If $wgSharedUploadDBname is set, it uses the ForeignDBRepo
661 * class, with also the following variables:
663 * - dbName: $wgSharedUploadDBname.
664 * - dbType: $wgDBtype.
665 * - dbServer: $wgDBserver.
666 * - dbUser: $wgDBuser.
667 * - dbPassword: $wgDBpassword.
668 * - dbFlags: Based on $wgDebugDumpSql.
669 * - tablePrefix: $wgSharedUploadDBprefix,
670 * - hasSharedCache: $wgCacheSharedUploads.
672 * @var bool
673 * @since 1.3
675 $wgUseSharedUploads = false;
678 * Shortcut for the 'directory' setting of $wgForeignFileRepos.
679 * Only used if $wgUseSharedUploads is enabled.
681 * @var string
682 * @since 1.3
684 $wgSharedUploadDirectory = null;
687 * Shortcut for the 'url' setting of $wgForeignFileRepos.
688 * Only used if $wgUseSharedUploads is enabled.
690 * @var string
691 * @since 1.3
693 $wgSharedUploadPath = null;
696 * Shortcut for the 'hashLevels' setting of $wgForeignFileRepos.
697 * Only used if $wgUseSharedUploads is enabled.
699 * @var bool
700 * @since 1.3
702 $wgHashedSharedUploadDirectory = true;
705 * Shortcut for the 'descBaseUrl' setting of $wgForeignFileRepos.
706 * Only used if $wgUseSharedUploads is enabled.
708 * @since 1.5
710 $wgRepositoryBaseUrl = 'https://commons.wikimedia.org/wiki/File:';
713 * Shortcut for the 'fetchDescription' setting of $wgForeignFileRepos.
714 * Only used if $wgUseSharedUploads is enabled.
716 * @var bool
717 * @since 1.5
719 $wgFetchCommonsDescriptions = false;
722 * Shortcut for the ForeignDBRepo 'dbName' setting in $wgForeignFileRepos.
723 * Set this to false if the uploads do not come from a wiki.
724 * Only used if $wgUseSharedUploads is enabled.
726 * @var bool|string
727 * @since 1.4
729 $wgSharedUploadDBname = false;
732 * Shortcut for the ForeignDBRepo 'tablePrefix' setting in $wgForeignFileRepos.
733 * Only used if $wgUseSharedUploads is enabled.
735 * @var string
736 * @since 1.5
738 $wgSharedUploadDBprefix = '';
741 * Shortcut for the ForeignDBRepo 'hasSharedCache' setting in $wgForeignFileRepos.
742 * Only used if $wgUseSharedUploads is enabled.
744 * @var bool
745 * @since 1.5
747 $wgCacheSharedUploads = true;
750 * Array of foreign file repo names (set in $wgForeignFileRepos above) that
751 * are allowable upload targets. These wikis must have some method of
752 * authentication (i.e. CentralAuth), and be CORS-enabled for this wiki.
753 * The string 'local' signifies the default local file repository.
755 * Example:
756 * $wgForeignUploadTargets = [ 'shared' ];
758 $wgForeignUploadTargets = [ 'local' ];
761 * Configuration for file uploads using the embeddable upload dialog
762 * (https://www.mediawiki.org/wiki/Upload_dialog).
764 * This applies also to foreign uploads to this wiki (the configuration is loaded by remote wikis
765 * using the action=query&meta=siteinfo API).
767 * See below for documentation of each property. None of the properties may be omitted.
769 $wgUploadDialog = [
770 // Fields to make available in the dialog. `true` means that this field is visible, `false` means
771 // that it is hidden. The "Name" field can't be hidden. Note that you also have to add the
772 // matching replacement to the 'filepage' format key below to make use of these.
773 'fields' => [
774 'description' => true,
775 'date' => false,
776 'categories' => false,
778 // Suffix of localisation messages used to describe the license under which the uploaded file will
779 // be released. The same value may be set for both 'local' and 'foreign' uploads.
780 'licensemessages' => [
781 // The 'local' messages are used for local uploads on this wiki:
782 // * upload-form-label-own-work-message-generic-local
783 // * upload-form-label-not-own-work-message-generic-local
784 // * upload-form-label-not-own-work-local-generic-local
785 'local' => 'generic-local',
786 // The 'foreign' messages are used for cross-wiki uploads from other wikis to this wiki:
787 // * upload-form-label-own-work-message-generic-foreign
788 // * upload-form-label-not-own-work-message-generic-foreign
789 // * upload-form-label-not-own-work-local-generic-foreign
790 'foreign' => 'generic-foreign',
792 // Upload comments to use for 'local' and 'foreign' uploads. This can also be set to a single
793 // string value, in which case it is used for both kinds of uploads. Available replacements:
794 // * $HOST - domain name from which a cross-wiki upload originates
795 // * $PAGENAME - wiki page name from which an upload originates
796 'comment' => [
797 'local' => '',
798 'foreign' => '',
800 // Format of the file page wikitext to be generated from the fields input by the user.
801 'format' => [
802 // Wrapper for the whole page. Available replacements:
803 // * $DESCRIPTION - file description, as input by the user (only if the 'description' field is
804 // enabled), wrapped as defined below in the 'description' key
805 // * $DATE - file creation date, as input by the user (only if the 'date' field is enabled)
806 // * $SOURCE - as defined below in the 'ownwork' key, may be extended in the future
807 // * $AUTHOR - linked user name, may be extended in the future
808 // * $LICENSE - as defined below in the 'license' key, may be extended in the future
809 // * $CATEGORIES - file categories wikitext, as input by the user (only if the 'categories'
810 // field is enabled), or if no input, as defined below in the 'uncategorized' key
811 'filepage' => '$DESCRIPTION',
812 // Wrapped for file description. Available replacements:
813 // * $LANGUAGE - source wiki's content language
814 // * $TEXT - input by the user
815 'description' => '$TEXT',
816 'ownwork' => '',
817 'license' => '',
818 'uncategorized' => '',
823 * File backend structure configuration.
825 * This is an array of file backend configuration arrays.
826 * Each backend configuration has the following parameters:
827 * - name : A unique name for the backend
828 * - class : The file backend class to use
829 * - wikiId : A unique string that identifies the wiki (container prefix)
830 * - lockManager : The name of a lock manager (see $wgLockManagers) [optional]
831 * - fileJournal : File journal configuration for FileJournal::__construct() [optional]
833 * See FileBackend::__construct() for more details.
834 * Additional parameters are specific to the file backend class used.
835 * These settings should be global to all wikis when possible.
837 * FileBackendMultiWrite::__construct() is augmented with a 'template' option that
838 * can be used in any of the values of the 'backends' array. Its value is the name of
839 * another backend in $wgFileBackends. When set, it pre-fills the array with all of the
840 * configuration of the named backend. Explicitly set values in the array take precedence.
842 * There are two particularly important aspects about each backend:
843 * - a) Whether it is fully qualified or wiki-relative.
844 * By default, the paths of files are relative to the current wiki,
845 * which works via prefixing them with the current wiki ID when accessed.
846 * Setting 'domainId' forces the backend to be fully qualified by prefixing
847 * all paths with the specified value instead. This can be useful if
848 * multiple wikis need to share the same data. Note that 'name' is *not*
849 * part of any prefix and thus should not be relied upon for namespacing.
850 * - b) Whether it is only defined for some wikis or is defined on all
851 * wikis in the wiki farm. Defining a backend globally is useful
852 * if multiple wikis need to share the same data.
853 * One should be aware of these aspects when configuring a backend for use with
854 * any basic feature or plugin. For example, suppose an extension stores data for
855 * different wikis in different directories and sometimes needs to access data from
856 * a foreign wiki's directory in order to render a page on given wiki. The extension
857 * would need a fully qualified backend that is defined on all wikis in the wiki farm.
859 $wgFileBackends = [];
862 * Array of configuration arrays for each lock manager.
863 * Each backend configuration has the following parameters:
864 * - name : A unique name for the lock manager
865 * - class : The lock manger class to use
867 * See LockManager::__construct() for more details.
868 * Additional parameters are specific to the lock manager class used.
869 * These settings should be global to all wikis.
871 $wgLockManagers = [];
874 * Show Exif data, on by default if available.
875 * Requires PHP's Exif extension: https://www.php.net/manual/en/ref.exif.php
877 * @note FOR WINDOWS USERS:
878 * To enable Exif functions, add the following line to the "Windows
879 * extensions" section of php.ini:
880 * @code{.ini}
881 * extension=extensions/php_exif.dll
882 * @endcode
884 $wgShowEXIF = function_exists( 'exif_read_data' );
887 * If to automatically update the img_metadata field
888 * if the metadata field is outdated but compatible with the current version.
889 * Defaults to false.
891 $wgUpdateCompatibleMetadata = false;
894 * Allow for upload to be copied from an URL.
895 * The timeout for copy uploads is set by $wgCopyUploadTimeout.
896 * You have to assign the user right 'upload_by_url' to a user group, to use this.
898 $wgAllowCopyUploads = false;
901 * A list of domains copy uploads can come from
903 * @since 1.20
905 $wgCopyUploadsDomains = [];
908 * Enable copy uploads from Special:Upload. $wgAllowCopyUploads must also be
909 * true. If $wgAllowCopyUploads is true, but this is false, you will only be
910 * able to perform copy uploads from the API or extensions (e.g. UploadWizard).
912 $wgCopyUploadsFromSpecialUpload = false;
915 * Proxy to use for copy upload requests.
916 * @since 1.20
918 $wgCopyUploadProxy = false;
921 * Different timeout for upload by url
922 * This could be useful since when fetching large files, you may want a
923 * timeout longer than the default $wgHTTPTimeout. False means fallback
924 * to default.
926 * @var int|bool
928 * @since 1.22
930 $wgCopyUploadTimeout = false;
933 * Max size for uploads, in bytes.
935 * If not set to an array, applies to all uploads. If set to an array, per upload
936 * type maximums can be set, using the file and url keys. If the `*` key is set
937 * this value will be used as maximum for non-specified types.
939 * The below example would set the maximum for all uploads to 250 kB except,
940 * for upload-by-url, which would have a maximum of 500 kB.
942 * @par Example:
943 * @code
944 * $wgMaxUploadSize = [
945 * '*' => 250 * 1024,
946 * 'url' => 500 * 1024,
947 * ];
948 * @endcode
950 * Default: 100 MB.
952 $wgMaxUploadSize = 1024 * 1024 * 100;
955 * Minimum upload chunk size, in bytes.
957 * When using chunked upload, non-final chunks smaller than this will be rejected.
959 * Note that this may be further reduced by the `upload_max_filesize` and
960 * `post_max_size` PHP settings. Use ApiUpload::getMinUploadChunkSize to
961 * get the effective minimum chunk size used by MediaWiki.
963 * Default: 1 KB.
965 * @since 1.26
966 * @see ApiUpload::getMinUploadChunkSize
968 $wgMinUploadChunkSize = 1024;
971 * Point the upload navigation link to an external URL
972 * Useful if you want to use a shared repository by default
973 * without disabling local uploads (use $wgEnableUploads = false for that).
975 * @par Example:
976 * @code
977 * $wgUploadNavigationUrl = 'https://commons.wikimedia.org/wiki/Special:Upload';
978 * @endcode
980 $wgUploadNavigationUrl = false;
983 * Point the upload link for missing files to an external URL, as with
984 * $wgUploadNavigationUrl. The URL will get "(?|&)wpDestFile=<filename>"
985 * appended to it as appropriate.
987 $wgUploadMissingFileUrl = false;
990 * Give a path here to use thumb.php for thumbnail generation on client
991 * request, instead of generating them on render and outputting a static URL.
992 * This is necessary if some of your apache servers don't have read/write
993 * access to the thumbnail path.
995 * @par Example:
996 * @code
997 * $wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
998 * @endcode
1000 $wgThumbnailScriptPath = false;
1003 * Shortcut for the 'thumbScriptUrl' setting of $wgForeignFileRepos.
1004 * Only used if $wgUseSharedUploads is enabled.
1006 * @var string
1007 * @since 1.3
1009 $wgSharedThumbnailScriptPath = false;
1012 * Shortcut for setting `hashLevels=2` in $wgLocalFileRepo.
1014 * @note Only used if $wgLocalFileRepo is not set.
1015 * @var bool
1017 $wgHashedUploadDirectory = true;
1020 * This is the list of preferred extensions for uploading files. Uploading files
1021 * with extensions not in this list will trigger a warning.
1023 * @warning If you add any OpenOffice or Microsoft Office file formats here,
1024 * such as odt or doc, and untrusted users are allowed to upload files, then
1025 * your wiki will be vulnerable to cross-site request forgery (CSRF).
1027 $wgFileExtensions = [ 'png', 'gif', 'jpg', 'jpeg', 'webp' ];
1030 * Files with these extensions will never be allowed as uploads.
1031 * An array of file extensions to blacklist. You should append to this array
1032 * if you want to blacklist additional files.
1034 $wgFileBlacklist = [
1035 # HTML may contain cookie-stealing JavaScript and web bugs
1036 'html', 'htm', 'js', 'jsb', 'mhtml', 'mht', 'xhtml', 'xht',
1037 # PHP scripts may execute arbitrary code on the server
1038 'php', 'phtml', 'php3', 'php4', 'php5', 'phps', 'phar',
1039 # Other types that may be interpreted by some servers
1040 'shtml', 'jhtml', 'pl', 'py', 'cgi',
1041 # May contain harmful executables for Windows victims
1042 'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' ];
1045 * Files with these MIME types will never be allowed as uploads
1046 * if $wgVerifyMimeType is enabled.
1048 $wgMimeTypeBlacklist = [
1049 # HTML may contain cookie-stealing JavaScript and web bugs
1050 'text/html', 'text/javascript', 'text/x-javascript', 'application/x-shellscript',
1051 # PHP scripts may execute arbitrary code on the server
1052 'application/x-php', 'text/x-php',
1053 # Other types that may be interpreted by some servers
1054 'text/x-python', 'text/x-perl', 'text/x-bash', 'text/x-sh', 'text/x-csh',
1055 # Client-side hazards on Internet Explorer
1056 'text/scriptlet', 'application/x-msdownload',
1057 # Windows metafile, client-side vulnerability on some systems
1058 'application/x-msmetafile',
1062 * Allow Java archive uploads.
1063 * This is not recommended for public wikis since a maliciously-constructed
1064 * applet running on the same domain as the wiki can steal the user's cookies.
1066 $wgAllowJavaUploads = false;
1069 * This is a flag to determine whether or not to check file extensions on upload.
1071 * @warning Setting this to false is insecure for public wikis.
1073 $wgCheckFileExtensions = true;
1076 * If this is turned off, users may override the warning for files not covered
1077 * by $wgFileExtensions.
1079 * @warning Setting this to false is insecure for public wikis.
1081 $wgStrictFileExtensions = true;
1084 * Setting this to true will disable the upload system's checks for HTML/JavaScript.
1086 * @warning THIS IS VERY DANGEROUS on a publicly editable site, so USE
1087 * $wgGroupPermissions TO RESTRICT UPLOADING to only those that you trust
1089 $wgDisableUploadScriptChecks = false;
1092 * Warn if uploaded files are larger than this (in bytes), or false to disable
1094 $wgUploadSizeWarning = false;
1097 * list of trusted media-types and MIME types.
1098 * Use the MEDIATYPE_xxx constants to represent media types.
1099 * This list is used by File::isSafeFile
1101 * Types not listed here will have a warning about unsafe content
1102 * displayed on the images description page. It would also be possible
1103 * to use this for further restrictions, like disabling direct
1104 * [[media:...]] links for non-trusted formats.
1106 $wgTrustedMediaFormats = [
1107 MEDIATYPE_BITMAP, // all bitmap formats
1108 MEDIATYPE_AUDIO, // all audio formats
1109 MEDIATYPE_VIDEO, // all plain video formats
1110 "image/svg+xml", // svg (only needed if inline rendering of svg is not supported)
1111 "application/pdf", // PDF files
1112 # "application/x-shockwave-flash", //flash/shockwave movie
1116 * Plugins for media file type handling.
1117 * Each entry in the array maps a MIME type to a class name
1119 * Core media handlers are listed in MediaHandlerFactory,
1120 * and extensions should use extension.json.
1122 $wgMediaHandlers = [];
1125 * Media handler overrides for parser tests (they don't need to generate actual
1126 * thumbnails, so a mock will do)
1128 $wgParserTestMediaHandlers = [
1129 'image/jpeg' => 'MockBitmapHandler',
1130 'image/png' => 'MockBitmapHandler',
1131 'image/gif' => 'MockBitmapHandler',
1132 'image/tiff' => 'MockBitmapHandler',
1133 'image/webp' => 'MockBitmapHandler',
1134 'image/x-ms-bmp' => 'MockBitmapHandler',
1135 'image/x-bmp' => 'MockBitmapHandler',
1136 'image/x-xcf' => 'MockBitmapHandler',
1137 'image/svg+xml' => 'MockSvgHandler',
1138 'image/vnd.djvu' => 'MockDjVuHandler',
1142 * Plugins for page content model handling.
1143 * Each entry in the array maps a model id to a class name or callback
1144 * that creates an instance of the appropriate ContentHandler subclass.
1146 * @since 1.21
1148 $wgContentHandlers = [
1149 // the usual case
1150 CONTENT_MODEL_WIKITEXT => WikitextContentHandler::class,
1151 // dumb version, no syntax highlighting
1152 CONTENT_MODEL_JAVASCRIPT => JavaScriptContentHandler::class,
1153 // simple implementation, for use by extensions, etc.
1154 CONTENT_MODEL_JSON => JsonContentHandler::class,
1155 // dumb version, no syntax highlighting
1156 CONTENT_MODEL_CSS => CssContentHandler::class,
1157 // plain text, for use by extensions, etc.
1158 CONTENT_MODEL_TEXT => TextContentHandler::class,
1159 // fallback for unknown models, from imports or extensions that were removed
1160 CONTENT_MODEL_UNKNOWN => FallbackContentHandler::class,
1164 * Whether to enable server-side image thumbnailing. If false, images will
1165 * always be sent to the client in full resolution, with appropriate width= and
1166 * height= attributes on the <img> tag for the client to do its own scaling.
1168 $wgUseImageResize = true;
1171 * Resizing can be done using PHP's internal image libraries or using
1172 * ImageMagick or another third-party converter, e.g. GraphicMagick.
1173 * These support more file formats than PHP, which only supports PNG,
1174 * GIF, JPG, XBM and WBMP.
1176 * Use Image Magick instead of PHP builtin functions.
1178 $wgUseImageMagick = false;
1181 * The convert command shipped with ImageMagick
1183 $wgImageMagickConvertCommand = '/usr/bin/convert';
1186 * Array of max pixel areas for interlacing per MIME type
1187 * @since 1.27
1189 $wgMaxInterlacingAreas = [];
1192 * Sharpening parameter to ImageMagick
1194 $wgSharpenParameter = '0x0.4';
1197 * Reduction in linear dimensions below which sharpening will be enabled
1199 $wgSharpenReductionThreshold = 0.85;
1202 * Temporary directory used for ImageMagick. The directory must exist. Leave
1203 * this set to false to let ImageMagick decide for itself.
1205 $wgImageMagickTempDir = false;
1208 * Use another resizing converter, e.g. GraphicMagick
1209 * %s will be replaced with the source path, %d with the destination
1210 * %w and %h will be replaced with the width and height.
1212 * @par Example for GraphicMagick:
1213 * @code
1214 * $wgCustomConvertCommand = "gm convert %s -resize %wx%h %d"
1215 * @endcode
1217 * Leave as false to skip this.
1219 $wgCustomConvertCommand = false;
1222 * used for lossless jpeg rotation
1224 * @since 1.21
1226 $wgJpegTran = '/usr/bin/jpegtran';
1229 * At default setting of 'yuv420', JPEG thumbnails will use 4:2:0 chroma
1230 * subsampling to reduce file size, at the cost of possible color fringing
1231 * at sharp edges.
1233 * See https://en.wikipedia.org/wiki/Chroma_subsampling
1235 * Supported values:
1236 * false - use scaling system's default (same as pre-1.27 behavior)
1237 * 'yuv444' - luma and chroma at same resolution
1238 * 'yuv422' - chroma at 1/2 resolution horizontally, full vertically
1239 * 'yuv420' - chroma at 1/2 resolution in both dimensions
1241 * This setting is currently supported only for the ImageMagick backend;
1242 * others may default to 4:2:0 or 4:4:4 or maintaining the source file's
1243 * sampling in the thumbnail.
1245 * @since 1.27
1247 $wgJpegPixelFormat = 'yuv420';
1250 * When scaling a JPEG thumbnail, this is the quality we request
1251 * from the backend. It should be an int between 1 and 100,
1252 * with 100 indicating 100% quality.
1254 * @since 1.32
1256 $wgJpegQuality = 80;
1259 * Some tests and extensions use exiv2 to manipulate the Exif metadata in some
1260 * image formats.
1262 $wgExiv2Command = '/usr/bin/exiv2';
1265 * Path to exiftool binary. Used for lossless ICC profile swapping.
1267 * @since 1.26
1269 $wgExiftool = '/usr/bin/exiftool';
1272 * Scalable Vector Graphics (SVG) may be uploaded as images.
1273 * Since SVG support is not yet standard in browsers, it is
1274 * necessary to rasterize SVGs to PNG as a fallback format.
1276 * An external program is required to perform this conversion.
1277 * If set to an array, the first item is a PHP callable and any further items
1278 * are passed as parameters after $srcPath, $dstPath, $width, $height
1280 $wgSVGConverters = [
1281 'ImageMagick' =>
1282 '$path/convert -background "#ffffff00" -thumbnail $widthx$height\! $input PNG:$output',
1283 'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
1284 'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
1285 'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d '
1286 . '$output $input',
1287 'rsvg' => '$path/rsvg-convert -w $width -h $height -o $output $input',
1288 'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output',
1289 'ImagickExt' => [ 'SvgHandler::rasterizeImagickExt' ],
1293 * Pick a converter defined in $wgSVGConverters
1295 $wgSVGConverter = 'ImageMagick';
1298 * If not in the executable PATH, specify the SVG converter path.
1300 $wgSVGConverterPath = '';
1303 * Don't scale a SVG larger than this
1305 $wgSVGMaxSize = 5120;
1308 * Don't read SVG metadata beyond this point.
1309 * Default is 1024*256 bytes
1311 $wgSVGMetadataCutoff = 262144;
1314 * Whether thumbnails should be generated in target language (usually, same as
1315 * page language), if available.
1316 * Currently, applies only to SVG images that use the systemLanguage attribute
1317 * to specify text language.
1319 * @since 1.33
1321 $wgMediaInTargetLanguage = true;
1324 * The maximum number of pixels a source image can have if it is to be scaled
1325 * down by a scaler that requires the full source image to be decompressed
1326 * and stored in decompressed form, before the thumbnail is generated.
1328 * This provides a limit on memory usage for the decompression side of the
1329 * image scaler. The limit is used when scaling PNGs with any of the
1330 * built-in image scalers, such as ImageMagick or GD. It is ignored for
1331 * JPEGs with ImageMagick, and when using the VipsScaler extension.
1333 * The default is 50 MB if decompressed to RGBA form, which corresponds to
1334 * 12.5 million pixels or 3500x3500.
1336 $wgMaxImageArea = 1.25e7;
1339 * Force thumbnailing of animated GIFs above this size to a single
1340 * frame instead of an animated thumbnail. As of MW 1.17 this limit
1341 * is checked against the total size of all frames in the animation.
1342 * It probably makes sense to keep this equal to $wgMaxImageArea.
1344 $wgMaxAnimatedGifArea = 1.25e7;
1347 * Browsers don't support TIFF inline generally...
1348 * For inline display, we need to convert to PNG or JPEG.
1349 * Note scaling should work with ImageMagick, but may not with GD scaling.
1351 * @par Example:
1352 * @code
1353 * // PNG is lossless, but inefficient for photos
1354 * $wgTiffThumbnailType = [ 'png', 'image/png' ];
1355 * // JPEG is good for photos, but has no transparency support. Bad for diagrams.
1356 * $wgTiffThumbnailType = [ 'jpg', 'image/jpeg' ];
1357 * @endcode
1359 $wgTiffThumbnailType = [];
1362 * If rendered thumbnail files are older than this timestamp, they
1363 * will be rerendered on demand as if the file didn't already exist.
1364 * Update if there is some need to force thumbs and SVG rasterizations
1365 * to rerender, such as fixes to rendering bugs.
1367 $wgThumbnailEpoch = '20030516000000';
1370 * Certain operations are avoided if there were too many recent failures,
1371 * for example, thumbnail generation. Bump this value to invalidate all
1372 * memory of failed operations and thus allow further attempts to resume.
1373 * This is useful when a cause for the failures has been found and fixed.
1375 $wgAttemptFailureEpoch = 1;
1378 * If set, inline scaled images will still produce "<img>" tags ready for
1379 * output instead of showing an error message.
1381 * This may be useful if errors are transitory, especially if the site
1382 * is configured to automatically render thumbnails on request.
1384 * On the other hand, it may obscure error conditions from debugging.
1385 * Enable the debug log or the 'thumbnail' log group to make sure errors
1386 * are logged to a file for review.
1388 $wgIgnoreImageErrors = false;
1391 * Render thumbnails while parsing wikitext.
1393 * If set to false, then the Parser will output valid thumbnail URLs without
1394 * generating or storing the thumbnail files. This can significantly speed up
1395 * processing on the web server. The site admin needs to configure a 404 handler
1396 * in order for the URLs in question to regenerate the thumbnails in question
1397 * on-demand. This can enable concurrency and also save computing resources
1398 * as not every resolution of every image on every page is accessed between
1399 * re-parses of the article. For example, re-parses triggered by bot edits,
1400 * or cascading updates from template edits.
1402 * If you use $wgLocalFileRepo, then you will also need to set the following:
1404 * @code
1405 * $wgLocalFileRepo['transformVia404'] = true;
1406 * @endcode
1407 * @var bool
1408 * @since 1.7.0
1410 $wgGenerateThumbnailOnParse = true;
1413 * Show thumbnails for old images on the image description page
1415 $wgShowArchiveThumbnails = true;
1418 * If set to true, images that contain certain the exif orientation tag will
1419 * be rotated accordingly. If set to null, try to auto-detect whether a scaler
1420 * is available that can rotate.
1422 $wgEnableAutoRotation = null;
1425 * Internal name of virus scanner. This serves as a key to the
1426 * $wgAntivirusSetup array. Set this to NULL to disable virus scanning. If not
1427 * null, every file uploaded will be scanned for viruses.
1429 $wgAntivirus = null;
1432 * Configuration for different virus scanners. This an associative array of
1433 * associative arrays. It contains one setup array per known scanner type.
1434 * The entry is selected by $wgAntivirus, i.e.
1435 * valid values for $wgAntivirus are the keys defined in this array.
1437 * The configuration array for each scanner contains the following keys:
1438 * "command", "codemap", "messagepattern":
1440 * "command" is the full command to call the virus scanner - %f will be
1441 * replaced with the name of the file to scan. If not present, the filename
1442 * will be appended to the command. Note that this must be overwritten if the
1443 * scanner is not in the system path; in that case, please set
1444 * $wgAntivirusSetup[$wgAntivirus]['command'] to the desired command with full
1445 * path.
1447 * "codemap" is a mapping of exit code to return codes of the detectVirus
1448 * function in SpecialUpload.
1449 * - An exit code mapped to AV_SCAN_FAILED causes the function to consider
1450 * the scan to be failed. This will pass the file if $wgAntivirusRequired
1451 * is not set.
1452 * - An exit code mapped to AV_SCAN_ABORTED causes the function to consider
1453 * the file to have an unsupported format, which is probably immune to
1454 * viruses. This causes the file to pass.
1455 * - An exit code mapped to AV_NO_VIRUS will cause the file to pass, meaning
1456 * no virus was found.
1457 * - All other codes (like AV_VIRUS_FOUND) will cause the function to report
1458 * a virus.
1459 * - You may use "*" as a key in the array to catch all exit codes not mapped otherwise.
1461 * "messagepattern" is a perl regular expression to extract the meaningful part of the scanners
1462 * output. The relevant part should be matched as group one (\1).
1463 * If not defined or the pattern does not match, the full message is shown to the user.
1465 $wgAntivirusSetup = [
1467 # setup for clamav
1468 'clamav' => [
1469 'command' => 'clamscan --no-summary ',
1470 'codemap' => [
1471 "0" => AV_NO_VIRUS, # no virus
1472 "1" => AV_VIRUS_FOUND, # virus found
1473 "52" => AV_SCAN_ABORTED, # unsupported file format (probably immune)
1474 "*" => AV_SCAN_FAILED, # else scan failed
1476 'messagepattern' => '/.*?:(.*)/sim',
1481 * Determines if a failed virus scan (AV_SCAN_FAILED) will cause the file to be rejected.
1483 $wgAntivirusRequired = true;
1486 * Determines if the MIME type of uploaded files should be checked
1488 $wgVerifyMimeType = true;
1491 * Determines whether extra checks for IE type detection should be applied.
1492 * This is a conservative check for exactly what IE 6 or so checked for,
1493 * and shouldn't trigger on for instance JPEG files containing links in EXIF
1494 * metadata.
1496 * @since 1.34
1498 $wgVerifyMimeTypeIE = true;
1501 * Sets the MIME type definition file to use by includes/libs/mime/MimeAnalyzer.php.
1502 * When this is set to the path of a mime.types file, MediaWiki will use this
1503 * file to map MIME types to file extensions and vice versa, in lieu of its
1504 * internal MIME map. Note that some MIME mappings are considered "baked in"
1505 * and cannot be overridden. See includes/libs/mime/MimeMapMinimal.php for a
1506 * full list.
1507 * example: $wgMimeTypeFile = '/etc/mime.types';
1509 $wgMimeTypeFile = 'internal';
1512 * Sets the MIME type info file to use by includes/libs/mime/MimeAnalyzer.php.
1513 * Set to null to use the minimum set of built-in defaults only.
1515 $wgMimeInfoFile = 'internal';
1518 * Sets an external MIME detector program. The command must print only
1519 * the MIME type to standard output.
1520 * The name of the file to process will be appended to the command given here.
1521 * If not set or NULL, PHP's mime_content_type function will be used.
1523 * @par Example:
1524 * @code
1525 * #$wgMimeDetectorCommand = "file -bi"; # use external MIME detector (Linux)
1526 * @endcode
1528 $wgMimeDetectorCommand = null;
1531 * Switch for trivial MIME detection. Used by thumb.php to disable all fancy
1532 * things, because only a few types of images are needed and file extensions
1533 * can be trusted.
1535 $wgTrivialMimeDetection = false;
1538 * Additional XML types we can allow via MIME-detection.
1539 * array = [ 'rootElement' => 'associatedMimeType' ]
1541 $wgXMLMimeTypes = [
1542 'http://www.w3.org/2000/svg:svg' => 'image/svg+xml',
1543 'svg' => 'image/svg+xml',
1544 'http://www.lysator.liu.se/~alla/dia/:diagram' => 'application/x-dia-diagram',
1545 'http://www.w3.org/1999/xhtml:html' => 'text/html', // application/xhtml+xml?
1546 'html' => 'text/html', // application/xhtml+xml?
1550 * Limit images on image description pages to a user-selectable limit. In order
1551 * to reduce disk usage, limits can only be selected from a list.
1552 * The user preference is saved as an array offset in the database, by default
1553 * the offset is set with $wgDefaultUserOptions['imagesize']. Make sure you
1554 * change it if you alter the array (see T10858).
1555 * This is the list of settings the user can choose from:
1557 $wgImageLimits = [
1558 [ 320, 240 ],
1559 [ 640, 480 ],
1560 [ 800, 600 ],
1561 [ 1024, 768 ],
1562 [ 1280, 1024 ]
1566 * Adjust thumbnails on image pages according to a user setting. In order to
1567 * reduce disk usage, the values can only be selected from a list. This is the
1568 * list of settings the user can choose from:
1570 $wgThumbLimits = [
1571 120,
1572 150,
1573 180,
1574 200,
1575 250,
1580 * When defined, is an array of image widths used as buckets for thumbnail generation.
1581 * The goal is to save resources by generating thumbnails based on reference buckets instead of
1582 * always using the original. This will incur a speed gain but cause a quality loss.
1584 * The buckets generation is chained, with each bucket generated based on the above bucket
1585 * when possible. File handlers have to opt into using that feature. For now only BitmapHandler
1586 * supports it.
1588 $wgThumbnailBuckets = null;
1591 * When using thumbnail buckets as defined above, this sets the minimum distance to the bucket
1592 * above the requested size. The distance represents how many extra pixels of width the bucket
1593 * needs in order to be used as the reference for a given thumbnail. For example, with the
1594 * following buckets:
1596 * $wgThumbnailBuckets = [ 128, 256, 512 ];
1598 * and a distance of 50:
1600 * $wgThumbnailMinimumBucketDistance = 50;
1602 * If we want to render a thumbnail of width 220px, the 512px bucket will be used,
1603 * because 220 + 50 = 270 and the closest bucket bigger than 270px is 512.
1605 $wgThumbnailMinimumBucketDistance = 50;
1608 * When defined, is an array of thumbnail widths to be rendered at upload time. The idea is to
1609 * prerender common thumbnail sizes, in order to avoid the necessity to render them on demand, which
1610 * has a performance impact for the first client to view a certain size.
1612 * This obviously means that more disk space is needed per upload upfront.
1614 * @since 1.25
1617 $wgUploadThumbnailRenderMap = [];
1620 * The method through which the thumbnails will be prerendered for the entries in
1621 * $wgUploadThumbnailRenderMap
1623 * The method can be either "http" or "jobqueue". The former uses an http request to hit the
1624 * thumbnail's URL.
1625 * This method only works if thumbnails are configured to be rendered by a 404 handler. The latter
1626 * option uses the job queue to render the thumbnail.
1628 * @since 1.25
1630 $wgUploadThumbnailRenderMethod = 'jobqueue';
1633 * When using the "http" $wgUploadThumbnailRenderMethod, lets one specify a custom Host HTTP header.
1635 * @since 1.25
1637 $wgUploadThumbnailRenderHttpCustomHost = false;
1640 * When using the "http" $wgUploadThumbnailRenderMethod, lets one specify a custom domain to send
1641 * the HTTP request to.
1643 * @since 1.25
1645 $wgUploadThumbnailRenderHttpCustomDomain = false;
1648 * When this variable is true and JPGs use the sRGB ICC profile, swaps it for the more lightweight
1649 * (and free) TinyRGB profile when generating thumbnails.
1651 * @since 1.26
1653 $wgUseTinyRGBForJPGThumbnails = false;
1656 * Parameters for the "<gallery>" tag.
1657 * Fields are:
1658 * - imagesPerRow: Default number of images per-row in the gallery. 0 -> Adapt to screensize
1659 * - imageWidth: Width of the cells containing images in galleries (in "px")
1660 * - imageHeight: Height of the cells containing images in galleries (in "px")
1661 * - captionLength: Length to truncate filename to in caption when using "showfilename".
1662 * A value of 'true' will truncate the filename to one line using CSS
1663 * and will be the behaviour after deprecation.
1664 * @deprecated since 1.28
1665 * - showBytes: Show the filesize in bytes in categories
1666 * - showDimensions: Show the dimensions (width x height) in categories
1667 * - mode: Gallery mode
1669 $wgGalleryOptions = [];
1672 * Adjust width of upright images when parameter 'upright' is used
1673 * This allows a nicer look for upright images without the need to fix the width
1674 * by hardcoded px in wiki sourcecode.
1676 $wgThumbUpright = 0.75;
1679 * Default value for chmoding of new directories.
1681 $wgDirectoryMode = 0777;
1684 * Generate and use thumbnails suitable for screens with 1.5 and 2.0 pixel densities.
1686 * This means a 320x240 use of an image on the wiki will also generate 480x360 and 640x480
1687 * thumbnails, output via the srcset attribute.
1689 $wgResponsiveImages = true;
1692 * On pages containing images, tell the user agent to pre-connect to hosts from
1693 * $wgForeignFileRepos. This speeds up rendering, but may create unwanted
1694 * traffic if there are many possible URLs from which images are served.
1695 * @since 1.35
1696 * @warning EXPERIMENTAL!
1698 $wgImagePreconnect = false;
1701 * @name DJVU settings
1702 * @{
1706 * Path of the djvudump executable
1707 * Enable this and $wgDjvuRenderer to enable djvu rendering
1708 * example: $wgDjvuDump = 'djvudump';
1710 $wgDjvuDump = null;
1713 * Path of the ddjvu DJVU renderer
1714 * Enable this and $wgDjvuDump to enable djvu rendering
1715 * example: $wgDjvuRenderer = 'ddjvu';
1717 $wgDjvuRenderer = null;
1720 * Path of the djvutxt DJVU text extraction utility
1721 * Enable this and $wgDjvuDump to enable text layer extraction from djvu files
1722 * example: $wgDjvuTxt = 'djvutxt';
1724 $wgDjvuTxt = null;
1727 * Path of the djvutoxml executable
1728 * This works like djvudump except much, much slower as of version 3.5.
1730 * For now we recommend you use djvudump instead. The djvuxml output is
1731 * probably more stable, so we'll switch back to it as soon as they fix
1732 * the efficiency problem.
1733 * https://sourceforge.net/tracker/index.php?func=detail&aid=1704049&group_id=32953&atid=406583
1735 * @par Example:
1736 * @code
1737 * $wgDjvuToXML = 'djvutoxml';
1738 * @endcode
1740 $wgDjvuToXML = null;
1743 * Shell command for the DJVU post processor
1744 * Default: pnmtojpeg, since ddjvu generates ppm output
1745 * Set this to false to output the ppm file directly.
1747 $wgDjvuPostProcessor = 'pnmtojpeg';
1750 * File extension for the DJVU post processor output
1752 $wgDjvuOutputExtension = 'jpg';
1754 /** @} */ # end of DJvu }
1756 /** @} */ # end of file uploads }
1758 /************************************************************************//**
1759 * @name Email settings
1760 * @{
1764 * Site admin email address.
1766 * Defaults to "wikiadmin@$wgServerName" (in Setup.php).
1768 $wgEmergencyContact = false;
1771 * Sender email address for e-mail notifications.
1773 * The address we use as sender when a user requests a password reminder,
1774 * as well as other e-mail notifications.
1776 * Defaults to "apache@$wgServerName" (in Setup.php).
1778 $wgPasswordSender = false;
1781 * Reply-To address for e-mail notifications.
1783 * Defaults to $wgPasswordSender (in Setup.php).
1785 $wgNoReplyAddress = false;
1788 * Set to true to enable the e-mail basic features:
1789 * Password reminders, etc. If sending e-mail on your
1790 * server doesn't work, you might want to disable this.
1792 $wgEnableEmail = true;
1795 * Set to true to enable user-to-user e-mail.
1796 * This can potentially be abused, as it's hard to track.
1798 $wgEnableUserEmail = true;
1801 * Set to true to enable the Special Mute page. This allows users
1802 * to mute unwanted communications from other users, and is linked
1803 * to from emails originating from Special:Email.
1805 * @since 1.34
1806 * @deprecated 1.34
1808 $wgEnableSpecialMute = false;
1811 * Set to true to enable user-to-user e-mail blacklist.
1813 * @since 1.30
1815 $wgEnableUserEmailBlacklist = false;
1818 * If true put the sending user's email in a Reply-To header
1819 * instead of From (false). ($wgPasswordSender will be used as From.)
1821 * Some mailers (eg SMTP) set the SMTP envelope sender to the From value,
1822 * which can cause problems with SPF validation and leak recipient addresses
1823 * when bounces are sent to the sender. In addition, DMARC restrictions
1824 * can cause emails to fail to be received when false.
1826 $wgUserEmailUseReplyTo = true;
1829 * Minimum time, in hours, which must elapse between password reminder
1830 * emails for a given account. This is to prevent abuse by mail flooding.
1832 $wgPasswordReminderResendTime = 24;
1835 * The time, in seconds, when an emailed temporary password expires.
1837 $wgNewPasswordExpiry = 3600 * 24 * 7;
1840 * The time, in seconds, when an email confirmation email expires
1842 $wgUserEmailConfirmationTokenExpiry = 7 * 24 * 60 * 60;
1845 * The number of days that a user's password is good for. After this number of days, the
1846 * user will be asked to reset their password. Set to false to disable password expiration.
1848 $wgPasswordExpirationDays = false;
1851 * If a user's password is expired, the number of seconds when they can still login,
1852 * and cancel their password change, but are sent to the password change form on each login.
1854 $wgPasswordExpireGrace = 3600 * 24 * 7; // 7 days
1857 * SMTP Mode.
1859 * For using a direct (authenticated) SMTP server connection.
1860 * Default to false or fill an array :
1862 * @code
1863 * $wgSMTP = [
1864 * 'host' => 'SMTP domain',
1865 * 'IDHost' => 'domain for MessageID',
1866 * 'port' => '25',
1867 * 'auth' => [true|false],
1868 * 'username' => [SMTP username],
1869 * 'password' => [SMTP password],
1870 * ];
1871 * @endcode
1873 $wgSMTP = false;
1876 * Additional email parameters, will be passed as the last argument to mail() call.
1878 $wgAdditionalMailParams = null;
1881 * For parts of the system that have been updated to provide HTML email content, send
1882 * both text and HTML parts as the body of the email
1884 $wgAllowHTMLEmail = false;
1887 * Allow sending of e-mail notifications with the editor's address as sender.
1889 * This setting depends on $wgEnotifRevealEditorAddress also being enabled.
1890 * If both are enabled, notifications for actions from users that have opted-in,
1891 * will be sent to other users with their address as "From" instead of "Reply-To".
1893 * If disabled, or not opted-in, notifications come from $wgPasswordSender.
1895 * @var bool
1897 $wgEnotifFromEditor = false;
1899 // TODO move UPO to preferences probably ?
1900 # If set to true, users get a corresponding option in their preferences and can choose to
1901 # enable or disable at their discretion
1902 # If set to false, the corresponding input form on the user preference page is suppressed
1903 # It call this to be a "user-preferences-option (UPO)"
1906 * Require email authentication before sending mail to an email address.
1907 * This is highly recommended. It prevents MediaWiki from being used as an open
1908 * spam relay.
1910 $wgEmailAuthentication = true;
1913 * Allow users to enable email notification ("enotif") on watchlist changes.
1915 $wgEnotifWatchlist = false;
1918 * Allow users to enable email notification ("enotif") when someone edits their
1919 * user talk page.
1921 * The owner of the user talk page must also have the 'enotifusertalkpages' user
1922 * preference set to true.
1924 $wgEnotifUserTalk = false;
1927 * Allow sending of e-mail notifications with the editor's address in "Reply-To".
1929 * Note, enabling this only actually uses it in notification e-mails if the user
1930 * opted-in to this feature. This feature flag also controls visibility of the
1931 * 'enotifrevealaddr' preference, which, if users opt into, will make e-mail
1932 * notifications about their actions use their address as "Reply-To".
1934 * To set the address as "From" instead of "Reply-To", also enable $wgEnotifFromEditor.
1936 * If disabled, or not opted-in, notifications come from $wgPasswordSender.
1938 * @var bool
1940 $wgEnotifRevealEditorAddress = false;
1943 * Potentially send notification mails on minor edits to pages. This is enabled
1944 * by default. If this is false, users will never be notified on minor edits.
1946 * If it is true, editors with the 'nominornewtalk' right (typically bots) will still not
1947 * trigger notifications for minor edits they make (to any page, not just user talk).
1949 * Finally, if the watcher/recipient has the 'enotifminoredits' user preference set to
1950 * false, they will not receive notifications for minor edits.
1952 * User talk notifications are also affected by $wgEnotifMinorEdits, the above settings,
1953 * $wgEnotifUserTalk, and the preference described there.
1955 $wgEnotifMinorEdits = true;
1958 * Send a generic mail instead of a personalised mail for each user. This
1959 * always uses UTC as the time zone, and doesn't include the username.
1961 * For pages with many users watching, this can significantly reduce mail load.
1962 * Has no effect when using sendmail rather than SMTP.
1964 $wgEnotifImpersonal = false;
1967 * Maximum number of users to mail at once when using impersonal mail. Should
1968 * match the limit on your mail server.
1970 $wgEnotifMaxRecips = 500;
1973 * Use real name instead of username in e-mail "from" field.
1975 $wgEnotifUseRealName = false;
1978 * Array of usernames who will be sent a notification email for every change
1979 * which occurs on a wiki. Users will not be notified of their own changes.
1981 $wgUsersNotifiedOnAllChanges = [];
1983 /** @} */ # end of email settings
1985 /************************************************************************//**
1986 * @name Database settings
1987 * @{
1991 * Current wiki database name
1993 * Should be alphanumeric, without spaces nor hyphens.
1994 * This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain).
1996 * This should still be set even if $wgLBFactoryConf is configured.
1998 $wgDBname = 'my_wiki';
2001 * Current wiki database schema name
2003 * Should be alphanumeric, without spaces nor hyphens.
2004 * This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain).
2006 * This should still be set even if $wgLBFactoryConf is configured.
2008 $wgDBmwschema = null;
2011 * Current wiki database table name prefix
2013 * Should be alphanumeric, without spaces nor hyphens, preferably ending in an underscore.
2014 * This is used to determine the current/local wiki ID (WikiMap::getCurrentWikiDbDomain).
2016 * This should still be set even if $wgLBFactoryConf is configured.
2018 $wgDBprefix = '';
2021 * Database host name or IP address
2023 $wgDBserver = 'localhost';
2026 * Database port number (for PostgreSQL and Microsoft SQL Server).
2028 $wgDBport = 5432;
2031 * Database username
2033 $wgDBuser = 'wikiuser';
2036 * Database user's password
2038 $wgDBpassword = '';
2041 * Database type
2043 $wgDBtype = 'mysql';
2046 * Whether to use SSL in DB connection.
2048 * This setting is only used if $wgLBFactoryConf['class'] is set to
2049 * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
2050 * the DBO_SSL flag must be set in the 'flags' option of the database
2051 * connection to achieve the same functionality.
2053 $wgDBssl = false;
2056 * Whether to use compression in DB connection.
2058 * This setting is only used $wgLBFactoryConf['class'] is set to
2059 * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
2060 * the DBO_COMPRESS flag must be set in the 'flags' option of the database
2061 * connection to achieve the same functionality.
2063 $wgDBcompress = false;
2066 * Separate username for maintenance tasks. Leave as null to use the default.
2068 $wgDBadminuser = null;
2071 * Separate password for maintenance tasks. Leave as null to use the default.
2073 $wgDBadminpassword = null;
2076 * Search type.
2078 * Leave as null to select the default search engine for the
2079 * selected database type (eg SearchMySQL), or set to a class
2080 * name to override to a custom search engine.
2082 * If the canonical name for the search engine doesn't match the class name
2083 * (because it's namespaced for example), you can add a mapping for this in
2084 * SearchMappings in extension.json.
2086 $wgSearchType = null;
2089 * Alternative search types
2091 * Sometimes you want to support multiple search engines for testing. This
2092 * allows users to select their search engine of choice via url parameters
2093 * to Special:Search and the action=search API. If using this, there's no
2094 * need to add $wgSearchType to it, that is handled automatically.
2096 * If the canonical name for the search engine doesn't match the class name
2097 * (because it's namespaced for example), you can add a mapping for this in
2098 * SearchMappings in extension.json.
2100 $wgSearchTypeAlternatives = null;
2103 * MySQL table options to use during installation or update
2105 $wgDBTableOptions = 'ENGINE=InnoDB, DEFAULT CHARSET=binary';
2108 * SQL Mode - default is turning off all modes, including strict, if set.
2109 * null can be used to skip the setting for performance reasons and assume
2110 * DBA has done his best job.
2111 * String override can be used for some additional fun :-)
2113 $wgSQLMode = '';
2116 * Default group to use when getting database connections.
2117 * Will be used as default query group in ILoadBalancer::getConnection.
2118 * @since 1.32
2120 $wgDBDefaultGroup = null;
2123 * To override default SQLite data directory ($docroot/../data)
2125 $wgSQLiteDataDir = '';
2128 * Shared database for multiple wikis. Commonly used for storing a user table
2129 * for single sign-on. The server for this database must be the same as for the
2130 * main database.
2132 * For backwards compatibility the shared prefix is set to the same as the local
2133 * prefix, and the user table is listed in the default list of shared tables.
2134 * The user_properties table is also added so that users will continue to have their
2135 * preferences shared (preferences were stored in the user table prior to 1.16)
2137 * $wgSharedTables may be customized with a list of tables to share in the shared
2138 * database. However it is advised to limit what tables you do share as many of
2139 * MediaWiki's tables may have side effects if you try to share them.
2141 * $wgSharedPrefix is the table prefix for the shared database. It defaults to
2142 * $wgDBprefix.
2144 * $wgSharedSchema is the table schema for the shared database. It defaults to
2145 * $wgDBmwschema.
2147 * @deprecated since 1.21 In new code, use the $wiki parameter to LBFactory::getMainLB() to
2148 * access remote databases. Using LBFactory::getMainLB() allows the shared database to
2149 * reside on separate servers to the wiki's own database, with suitable
2150 * configuration of $wgLBFactoryConf.
2152 $wgSharedDB = null;
2155 * @see $wgSharedDB
2157 $wgSharedPrefix = false;
2160 * @see $wgSharedDB
2162 $wgSharedTables = [ 'user', 'user_properties' ];
2165 * @see $wgSharedDB
2166 * @since 1.23
2168 $wgSharedSchema = false;
2171 * Database load balancer
2172 * This is a two-dimensional array, an array of server info structures
2173 * Fields are:
2174 * - host: Host name
2175 * - dbname: Default database name
2176 * - user: DB user
2177 * - password: DB password
2178 * - type: DB type
2179 * - driver: DB driver (when there are multiple drivers)
2181 * - load: Ratio of DB_REPLICA load, must be >=0, the sum of all loads must be >0.
2182 * If this is zero for any given server, no normal query traffic will be
2183 * sent to it. It will be excluded from lag checks in maintenance scripts.
2184 * The only way it can receive traffic is if groupLoads is used.
2186 * - groupLoads: (optional) Array of load ratios, the key is the query group name. A query
2187 * may belong to several groups, the most specific group defined here is used.
2189 * - flags: (optional) Bit field of properties:
2190 * - DBO_DEFAULT: Transactionalize web requests and use autocommit otherwise
2191 * - DBO_DEBUG: Equivalent of $wgDebugDumpSql
2192 * - DBO_SSL: Use TLS connection encryption if available
2193 * - DBO_COMPRESS: Use protocol compression with database connections
2194 * - DBO_PERSISTENT: Enables persistent database connections
2196 * - max lag: (optional) Maximum replication lag before a replica DB goes out of rotation
2197 * - is static: (optional) Set to true if the dataset is static and no replication is used.
2198 * - cliMode: (optional) Connection handles will not assume that requests are short-lived
2199 * nor that INSERT..SELECT can be rewritten into a buffered SELECT and INSERT.
2200 * This is what DBO_DEFAULT uses to determine when a web request is present.
2201 * [Default: uses value of $wgCommandLineMode]
2203 * These and any other user-defined properties will be assigned to the mLBInfo member
2204 * variable of the Database object.
2206 * Leave at false to use the single-server variables above. If you set this
2207 * variable, the single-server variables will generally be ignored (except
2208 * perhaps in some command-line scripts).
2210 * The first server listed in this array (with key 0) will be the master. The
2211 * rest of the servers will be replica DBs. To prevent writes to your replica DBs due to
2212 * accidental misconfiguration or MediaWiki bugs, set read_only=1 on all your
2213 * replica DBs in my.cnf. You can set read_only mode at runtime using:
2215 * @code
2216 * SET @@read_only=1;
2217 * @endcode
2219 * Since the effect of writing to a replica DB is so damaging and difficult to clean
2220 * up, we at Wikimedia set read_only=1 in my.cnf on all our DB servers, even
2221 * our masters, and then set read_only=0 on masters at runtime.
2223 $wgDBservers = false;
2226 * Load balancer factory configuration
2227 * To set up a multi-master wiki farm, set the class here to something that
2228 * can return a LoadBalancer with an appropriate master on a call to getMainLB().
2229 * The class identified here is responsible for reading $wgDBservers,
2230 * $wgDBserver, etc., so overriding it may cause those globals to be ignored.
2232 * The LBFactoryMulti class is provided for this purpose, please see
2233 * includes/db/LBFactoryMulti.php for configuration information.
2235 $wgLBFactoryConf = [ 'class' => \Wikimedia\Rdbms\LBFactorySimple::class ];
2238 * After a state-changing request is done by a client, this determines
2239 * how many seconds that client should keep using the master datacenter.
2240 * This avoids unexpected stale or 404 responses due to replication lag.
2241 * @since 1.27
2243 $wgDataCenterUpdateStickTTL = 10;
2246 * File to log database errors to
2248 $wgDBerrorLog = false;
2251 * Timezone to use in the error log.
2252 * Defaults to the wiki timezone ($wgLocaltimezone).
2254 * A list of usable timezones can found at:
2255 * https://www.php.net/manual/en/timezones.php
2257 * @par Examples:
2258 * @code
2259 * $wgDBerrorLogTZ = 'UTC';
2260 * $wgDBerrorLogTZ = 'GMT';
2261 * $wgDBerrorLogTZ = 'PST8PDT';
2262 * $wgDBerrorLogTZ = 'Europe/Sweden';
2263 * $wgDBerrorLogTZ = 'CET';
2264 * @endcode
2266 * @since 1.20
2268 $wgDBerrorLogTZ = false;
2271 * Other wikis on this site, can be administered from a single developer account.
2273 * @var string[] List of wiki DB domain IDs; the format of each ID consist of 1-3 hyphen
2274 * delimited alphanumeric components (each with no hyphens nor spaces) of any of the forms:
2275 * - "<DB NAME>-<DB SCHEMA>-<TABLE PREFIX>"
2276 * - "<DB NAME>-<TABLE PREFIX>"
2277 * - "<DB NAME>"
2278 * If hyphens appear in any of the components, then the domain ID parsing may not work
2279 * in all cases and site functionality might be affected. If the schema ($wgDBmwschema)
2280 * is left to the default "mediawiki" for all wikis, then the schema should be omitted
2281 * from these IDs.
2283 $wgLocalDatabases = [];
2286 * If lag is higher than $wgSlaveLagWarning, show a warning in some special
2287 * pages (like watchlist). If the lag is higher than $wgSlaveLagCritical,
2288 * show a more obvious warning.
2290 $wgSlaveLagWarning = 10;
2293 * @see $wgSlaveLagWarning
2295 $wgSlaveLagCritical = 30;
2297 /** @} */ # End of DB settings }
2299 /************************************************************************//**
2300 * @name Text storage
2301 * @{
2305 * We can also compress text stored in the 'text' table. If this is set on, new
2306 * revisions will be compressed on page save if zlib support is available. Any
2307 * compressed revisions will be decompressed on load regardless of this setting,
2308 * but will not be readable at all* if zlib support is not available.
2310 $wgCompressRevisions = false;
2313 * External stores allow including content
2314 * from non database sources following URL links.
2316 * Short names of ExternalStore classes may be specified in an array here:
2317 * @code
2318 * $wgExternalStores = [ "http","file","custom" ]...
2319 * @endcode
2321 * CAUTION: Access to database might lead to code execution
2323 $wgExternalStores = [];
2326 * An array of external MySQL servers.
2328 * @par Example:
2329 * Create a cluster named 'cluster1' containing three servers:
2330 * @code
2331 * $wgExternalServers = [
2332 * 'cluster1' => <array in the same format as $wgDBservers>
2333 * ];
2334 * @endcode
2336 * Used by \Wikimedia\Rdbms\LBFactorySimple, may be ignored if $wgLBFactoryConf is set to
2337 * another class.
2339 $wgExternalServers = [];
2342 * The place to put new revisions, false to put them in the local text table.
2343 * Part of a URL, e.g. DB://cluster1
2345 * Can be an array instead of a single string, to enable data distribution. Keys
2346 * must be consecutive integers, starting at zero.
2348 * @par Example:
2349 * @code
2350 * $wgDefaultExternalStore = [ 'DB://cluster1', 'DB://cluster2' ];
2351 * @endcode
2353 * @var array
2355 $wgDefaultExternalStore = false;
2358 * Revision text may be cached in the main WAN cache to reduce load on external
2359 * storage servers and object extraction overhead for frequently-loaded revisions.
2361 * Set to 0 to disable, or number of seconds before cache expiry.
2363 * @var int
2365 $wgRevisionCacheExpiry = 86400 * 7;
2367 /** @} */ # end text storage }
2369 /************************************************************************//**
2370 * @name Performance hacks and limits
2371 * @{
2375 * Disable database-intensive features
2377 $wgMiserMode = false;
2380 * Disable all query pages if miser mode is on, not just some
2382 $wgDisableQueryPages = false;
2385 * Number of rows to cache in 'querycache' table when miser mode is on
2387 $wgQueryCacheLimit = 1000;
2390 * Number of links to a page required before it is deemed "wanted"
2392 $wgWantedPagesThreshold = 1;
2395 * Enable slow parser functions
2397 $wgAllowSlowParserFunctions = false;
2400 * Allow schema updates
2402 $wgAllowSchemaUpdates = true;
2405 * Maximum article size in kilobytes
2407 $wgMaxArticleSize = 2048;
2410 * The minimum amount of memory that MediaWiki "needs"; MediaWiki will try to
2411 * raise PHP's memory limit if it's below this amount.
2413 $wgMemoryLimit = "50M";
2416 * The minimum amount of time that MediaWiki needs for "slow" write request,
2417 * particularly ones with multiple non-atomic writes that *should* be as
2418 * transactional as possible; MediaWiki will call set_time_limit() if needed.
2419 * @since 1.26
2421 $wgTransactionalTimeLimit = 120;
2423 /** @} */ # end performance hacks }
2425 /************************************************************************//**
2426 * @name Cache settings
2427 * @{
2431 * Directory for caching data in the local filesystem. Should not be accessible
2432 * from the web.
2434 * Note: if multiple wikis share the same localisation cache directory, they
2435 * must all have the same set of extensions. You can set a directory just for
2436 * the localisation cache using $wgLocalisationCacheConf['storeDirectory'].
2438 $wgCacheDirectory = false;
2441 * Main cache type. This should be a cache with fast access, but it may have
2442 * limited space. By default, it is disabled, since the stock database cache
2443 * is not fast enough to make it worthwhile.
2445 * The options are:
2447 * - CACHE_ANYTHING: Use anything, as long as it works
2448 * - CACHE_NONE: Do not cache
2449 * - CACHE_DB: Store cache objects in the DB
2450 * - CACHE_MEMCACHED: MemCached, must specify servers in $wgMemCachedServers
2451 * - CACHE_ACCEL: APC, APCU or WinCache
2452 * - (other): A string may be used which identifies a cache
2453 * configuration in $wgObjectCaches.
2455 * @see $wgMessageCacheType, $wgParserCacheType
2457 $wgMainCacheType = CACHE_NONE;
2460 * The cache type for storing the contents of the MediaWiki namespace. This
2461 * cache is used for a small amount of data which is expensive to regenerate.
2463 * For available types see $wgMainCacheType.
2465 $wgMessageCacheType = CACHE_ANYTHING;
2468 * The cache type for storing article HTML. This is used to store data which
2469 * is expensive to regenerate, and benefits from having plenty of storage space.
2471 * For available types see $wgMainCacheType.
2473 $wgParserCacheType = CACHE_ANYTHING;
2476 * The cache type for storing session data.
2478 * For available types see $wgMainCacheType.
2480 $wgSessionCacheType = CACHE_ANYTHING;
2483 * The cache type for storing language conversion tables,
2484 * which are used when parsing certain text and interface messages.
2486 * For available types see $wgMainCacheType.
2488 * @since 1.20
2490 $wgLanguageConverterCacheType = CACHE_ANYTHING;
2493 * Advanced object cache configuration.
2495 * Use this to define the class names and constructor parameters which are used
2496 * for the various cache types. Custom cache types may be defined here and
2497 * referenced from $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType,
2498 * or $wgLanguageConverterCacheType.
2500 * The format is an associative array where the key is a cache identifier, and
2501 * the value is an associative array of parameters. The "class" parameter is the
2502 * class name which will be used. Alternatively, a "factory" parameter may be
2503 * given, giving a callable function which will generate a suitable cache object.
2505 $wgObjectCaches = [
2506 CACHE_NONE => [ 'class' => EmptyBagOStuff::class, 'reportDupes' => false ],
2507 CACHE_DB => [ 'class' => SqlBagOStuff::class, 'loggroup' => 'SQLBagOStuff' ],
2509 CACHE_ANYTHING => [ 'factory' => 'ObjectCache::newAnything' ],
2510 CACHE_ACCEL => [ 'factory' => 'ObjectCache::getLocalServerInstance' ],
2511 CACHE_MEMCACHED => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ],
2513 'db-replicated' => [
2514 'class' => ReplicatedBagOStuff::class,
2515 'readFactory' => [
2516 'factory' => 'ObjectCache::newFromParams',
2517 'args' => [ [ 'class' => SqlBagOStuff::class, 'replicaOnly' => true ] ]
2519 'writeFactory' => [
2520 'factory' => 'ObjectCache::newFromParams',
2521 'args' => [ [ 'class' => SqlBagOStuff::class, 'replicaOnly' => false ] ]
2523 'loggroup' => 'SQLBagOStuff',
2524 'reportDupes' => false
2526 'memcached-php' => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ],
2527 'memcached-pecl' => [ 'class' => MemcachedPeclBagOStuff::class, 'loggroup' => 'memcached' ],
2528 'hash' => [ 'class' => HashBagOStuff::class, 'reportDupes' => false ],
2530 // Deprecated since 1.35.
2531 // - To configure a wg*CacheType variable to use the local server cache,
2532 // use CACHE_ACCEL instead, which will select these automatically.
2533 // - To access the object for the local server cache at run-time,
2534 // use MediaWikiServices::getLocalServerObjectCache()
2535 // instead of e.g. ObjectCache::getInstance( 'apcu' ).
2536 // - To instantiate a new one of these explicitly, do so directly
2537 // by using `new APCUBagOStuff( [ … ] )`
2538 // - To instantiate a new one of these including auto-detection and fallback,
2539 // use ObjectCache::makeLocalServerCache().
2540 'apc' => [ 'class' => APCUBagOStuff::class, 'reportDupes' => false ],
2541 'apcu' => [ 'class' => APCUBagOStuff::class, 'reportDupes' => false ],
2542 'wincache' => [ 'class' => WinCacheBagOStuff::class, 'reportDupes' => false ],
2546 * Main Wide-Area-Network cache type.
2548 * By default, this will wrap $wgMainCacheType (which is disabled, since the basic
2549 * stock default of CACHE_DB is not fast enough to make it worthwhile).
2551 * For single server or single data-center setup, setting $wgMainCacheType
2552 * is enough.
2554 * For a multiple data-center setup, WANObjectCache should be configured to
2555 * broadcast some if its operations using Mcrouter or Dynomite.
2556 * See @ref wanobjectcache-deployment "Deploying WANObjectCache".
2558 * The options are:
2559 * - false: Configure the cache using $wgMainCacheType, without using
2560 * a relayer (only matters if there are multiple data-centers)
2561 * - CACHE_NONE: Do not cache
2562 * - (other): A string may be used which identifies a cache
2563 * configuration in $wgWANObjectCaches
2564 * @since 1.26
2566 $wgMainWANCache = false;
2569 * Advanced WAN object cache configuration.
2571 * The format is an associative array where the key is an identifier
2572 * that may be referenced by $wgMainWANCache, and the value is an array of options:
2574 * - class: (Required) The class to use (must be WANObjectCache or a subclass).
2575 * - cacheId: (Required) A cache identifier from $wgObjectCaches.
2576 * - secret: (Optional) Stable secret for hashing long strings in key components.
2577 * Default: $wgSecretKey.
2579 * Any other options are treated as constructor parameters to WANObjectCache,
2580 * except for 'cache', 'logger', 'stats' and 'asyncHandler' which are
2581 * unconditionally set by MediaWiki core's ServiceWiring.
2583 * @par Example:
2584 * @code
2585 * $wgWANObjectCaches'memcached-php' => [
2586 * 'class' => WANObjectCache::class,
2587 * 'cacheId' => 'memcached-php',
2588 * ];
2589 * @endcode
2591 * @since 1.26
2593 $wgWANObjectCaches = [
2594 CACHE_NONE => [
2595 'class' => WANObjectCache::class,
2596 'cacheId' => CACHE_NONE,
2601 * Verify and enforce WAN cache purges using reliable DB sources as streams.
2603 * These secondary cache purges are de-duplicated via simple cache mutexes.
2604 * This improves consistency when cache purges are lost, which becomes more likely
2605 * as more cache servers are added or if there are multiple datacenters. Only keys
2606 * related to important mutable content will be checked.
2608 * @var bool
2609 * @since 1.29
2611 $wgEnableWANCacheReaper = false;
2614 * The object store type of the main stash.
2616 * This store should be a very fast storage system optimized for holding lightweight data
2617 * like incrementable hit counters and current user activity. The store should replicate the
2618 * dataset among all data-centers. Any add(), merge(), lock(), and unlock() operations should
2619 * maintain "best effort" linearizability; as long as connectivity is strong, latency is low,
2620 * and there is no eviction pressure prompted by low free space, those operations should be
2621 * linearizable. In terms of PACELC (https://en.wikipedia.org/wiki/PACELC_theorem), the store
2622 * should act as a PA/EL distributed system for these operations. One optimization for these
2623 * operations is to route them to a "primary" data-center (e.g. one that serves HTTP POST) for
2624 * synchronous execution and then replicate to the others asynchronously. This means that at
2625 * least calls to these operations during HTTP POST requests would quickly return.
2627 * All other operations, such as get(), set(), delete(), changeTTL(), incr(), and decr(),
2628 * should be synchronous in the local data-center, replicating asynchronously to the others.
2629 * This behavior can be overriden by the use of the WRITE_SYNC and READ_LATEST flags.
2631 * The store should *preferably* have eventual consistency to handle network partitions.
2633 * Modules that rely on the stash should be prepared for:
2634 * - add(), merge(), lock(), and unlock() to be slower than other write operations,
2635 * at least in "secondary" data-centers (e.g. one that only serves HTTP GET/HEAD)
2636 * - Other write operations to have race conditions accross data-centers
2637 * - Read operations to have race conditions accross data-centers
2638 * - Consistency to be either eventual (with Last-Write-Wins) or just "best effort"
2640 * In general, this means avoiding updates during idempotent HTTP requests (GET/HEAD) and
2641 * avoiding assumptions of true linearizability (e.g. accepting anomalies). Modules that need
2642 * these kind of guarantees should use other storage mediums.
2644 * Valid options are the keys of $wgObjectCaches, e.g. CACHE_* constants.
2646 * @since 1.26
2648 $wgMainStash = 'db-replicated';
2651 * The expiry time for the parser cache, in seconds.
2652 * The default is 86400 (one day).
2654 $wgParserCacheExpireTime = 86400;
2657 * The expiry time to use for session storage, in seconds.
2659 $wgObjectCacheSessionExpiry = 3600;
2662 * Whether to use PHP session handling ($_SESSION and session_*() functions)
2664 * If the constant MW_NO_SESSION is defined, this is forced to 'disable'.
2666 * If the constant MW_NO_SESSION_HANDLER is defined, this is ignored and PHP
2667 * session handling will function independently of SessionHandler.
2668 * SessionHandler and PHP's session handling may attempt to override each
2669 * others' cookies.
2671 * @since 1.27
2672 * @var string
2673 * - 'enable': Integrate with PHP's session handling as much as possible.
2674 * - 'warn': Integrate but log warnings if anything changes $_SESSION.
2675 * - 'disable': Throw exceptions if PHP session handling is used.
2677 $wgPHPSessionHandling = 'enable';
2680 * Number of internal PBKDF2 iterations to use when deriving session secrets.
2682 * @since 1.28
2684 $wgSessionPbkdf2Iterations = 10001;
2687 * The list of MemCached servers and port numbers
2689 $wgMemCachedServers = [ '127.0.0.1:11211' ];
2692 * Use persistent connections to MemCached, which are shared across multiple
2693 * requests.
2695 $wgMemCachedPersistent = false;
2698 * Read/write timeout for MemCached server communication, in microseconds.
2700 $wgMemCachedTimeout = 500000;
2703 * Set this to true to maintain a copy of the message cache on the local server.
2705 * This layer of message cache is in addition to the one configured by $wgMessageCacheType.
2707 * The local copy is put in APC. If APC is not installed, this setting does nothing.
2709 * Note that this is about the message cache, which stores interface messages
2710 * maintained as wiki pages. This is separate from the localisation cache for interface
2711 * messages provided by the software, which is configured by $wgLocalisationCacheConf.
2713 $wgUseLocalMessageCache = false;
2716 * Instead of caching everything, only cache those messages which have
2717 * been customised in the site content language. This means that
2718 * MediaWiki:Foo/ja is ignored if MediaWiki:Foo doesn't exist.
2719 * This option is probably only useful for translatewiki.net.
2721 $wgAdaptiveMessageCache = false;
2724 * Localisation cache configuration.
2726 * Used by Language::getLocalisationCache() to decide how to construct the
2727 * LocalisationCache instance. Associative array with keys:
2729 * class: The class to use for constructing the LocalisationCache object.
2730 * This may be overridden by extensions to a subclass of LocalisationCache.
2731 * Sub classes are expected to still honor the 'storeClass', 'storeDirectory'
2732 * and 'manualRecache' options where applicable.
2734 * storeClass: Which LCStore class implementation to use. This is optional.
2735 * The default LocalisationCache class offers the 'store' option
2736 * as abstraction for this.
2738 * store: How and where to store localisation cache data.
2739 * This option is ignored if 'storeClass' is explicitly set to a class name.
2740 * Must be one of:
2741 * - 'detect' (default): Automatically select 'files' if 'storeDirectory'
2742 * or $wgCacheDirectory is set, and fall back to 'db' otherwise.
2743 * - 'files': Store in $wgCacheDirectory as CDB files.
2744 * - 'array': Store in $wgCacheDirectory as PHP static array files.
2745 * - 'db': Store in the l10n_cache database table.
2747 * storeDirectory: If the selected LCStore class puts its data in files, then it
2748 * will use this directory. If set to false (default), then
2749 * $wgCacheDirectory is used instead.
2751 * manualRecache: Set this to true to disable cache updates on web requests.
2752 * Use maintenance/rebuildLocalisationCache.php instead.
2754 $wgLocalisationCacheConf = [
2755 'class' => LocalisationCache::class,
2756 'store' => 'detect',
2757 'storeClass' => false,
2758 'storeDirectory' => false,
2759 'storeServer' => [],
2760 'forceRecache' => false,
2761 'manualRecache' => false,
2765 * Allow client-side caching of pages
2767 $wgCachePages = true;
2770 * Set this to current time to invalidate all prior cached pages. Affects both
2771 * client-side and server-side caching.
2772 * You can get the current date on your server by using the command:
2773 * @verbatim
2774 * date +%Y%m%d%H%M%S
2775 * @endverbatim
2777 $wgCacheEpoch = '20030516000000';
2780 * Directory where GitInfo will look for pre-computed cache files. If false,
2781 * $wgCacheDirectory/gitinfo will be used.
2783 $wgGitInfoCacheDirectory = false;
2786 * This will cache static pages for non-logged-in users to reduce
2787 * database traffic on public sites. ResourceLoader requests to default
2788 * language and skins are cached as well as single module requests.
2790 $wgUseFileCache = false;
2793 * Depth of the subdirectory hierarchy to be created under
2794 * $wgFileCacheDirectory. The subdirectories will be named based on
2795 * the MD5 hash of the title. A value of 0 means all cache files will
2796 * be put directly into the main file cache directory.
2798 $wgFileCacheDepth = 2;
2801 * Append a configured value to the parser cache and the sitenotice key so
2802 * that they can be kept separate for some class of activity.
2804 $wgRenderHashAppend = '';
2807 * If on, the sidebar navigation links are cached for users with the
2808 * current language set. This can save a touch of load on a busy site
2809 * by shaving off extra message lookups.
2811 * However it is also fragile: changing the site configuration, or
2812 * having a variable $wgArticlePath, can produce broken links that
2813 * don't update as expected.
2815 $wgEnableSidebarCache = false;
2818 * Expiry time for the sidebar cache, in seconds
2820 $wgSidebarCacheExpiry = 86400;
2823 * Expiry time for the footer link cache, in seconds, or 0 if disabled
2825 * @since 1.35
2827 $wgFooterLinkCacheExpiry = 0;
2830 * When using the file cache, we can store the cached HTML gzipped to save disk
2831 * space. Pages will then also be served compressed to clients that support it.
2833 * Requires zlib support enabled in PHP.
2835 $wgUseGzip = false;
2838 * Invalidate various caches when LocalSettings.php changes. This is equivalent
2839 * to setting $wgCacheEpoch to the modification time of LocalSettings.php, as
2840 * was previously done in the default LocalSettings.php file.
2842 * On high-traffic wikis, this should be set to false, to avoid the need to
2843 * check the file modification time, and to avoid the performance impact of
2844 * unnecessary cache invalidations.
2846 $wgInvalidateCacheOnLocalSettingsChange = true;
2849 * When loading extensions through the extension registration system, this
2850 * can be used to invalidate the cache. A good idea would be to set this to
2851 * one file, you can just `touch` that one to invalidate the cache
2853 * @par Example:
2854 * @code
2855 * $wgExtensionInfoMtime = filemtime( "$IP/LocalSettings.php" );
2856 * @endcode
2858 * If set to false, the mtime for each individual JSON file will be checked,
2859 * which can be slow if a large number of extensions are being loaded.
2861 * @var int|bool
2863 $wgExtensionInfoMTime = false;
2865 /** @} */ # end of cache settings
2867 /************************************************************************//**
2868 * @name HTTP proxy (CDN) settings
2870 * Many of these settings apply to any HTTP proxy used in front of MediaWiki,
2871 * although they are sometimes still referred to as Squid settings for
2872 * historical reasons.
2874 * Achieving a high hit ratio with an HTTP proxy requires special configuration.
2875 * See https://www.mediawiki.org/wiki/Manual:Performance_tuning#Page_view_caching
2876 * for more details.
2878 * @{
2882 * Enable/disable CDN.
2884 * See https://www.mediawiki.org/wiki/Manual:Performance_tuning#Page_view_caching
2886 * @since 1.34 Renamed from $wgUseSquid.
2888 $wgUseCdn = false;
2891 * Add X-Forwarded-Proto to the Vary and Key headers for API requests and
2892 * RSS/Atom feeds. Use this if you have an SSL termination setup
2893 * and need to split the cache between HTTP and HTTPS for API requests,
2894 * feed requests and HTTP redirect responses in order to prevent cache
2895 * pollution. This does not affect 'normal' requests to index.php other than
2896 * HTTP redirects.
2898 $wgVaryOnXFP = false;
2901 * Internal server name as known to CDN, if different.
2903 * @par Example:
2904 * @code
2905 * $wgInternalServer = 'http://yourinternal.tld:8000';
2906 * @endcode
2908 $wgInternalServer = false;
2911 * Cache TTL for the CDN sent as s-maxage (without ESI) or
2912 * Surrogate-Control (with ESI). Without ESI, you should strip
2913 * out s-maxage in the CDN config.
2915 * 18000 seconds = 5 hours, more cache hits with 2678400 = 31 days.
2917 * @since 1.34 Renamed from $wgSquidMaxage
2919 $wgCdnMaxAge = 18000;
2922 * Cache timeout for the CDN when DB replica DB lag is high
2923 * @see $wgCdnMaxAge
2925 * @since 1.27
2927 $wgCdnMaxageLagged = 30;
2930 * Cache timeout when delivering a stale ParserCache response due to PoolCounter
2931 * contention.
2933 * @since 1.35
2935 $wgCdnMaxageStale = 10;
2938 * Cache TTL for the user agent sent as max-age, for logged out users.
2939 * Only applies if $wgUseCdn is false.
2940 * @see $wgUseCdn
2942 * @since 1.35
2944 $wgLoggedOutMaxAge = 0;
2947 * If set, any SquidPurge call on a URL or URLs will send a second purge no less than
2948 * this many seconds later via the job queue. This requires delayed job support.
2949 * This should be safely higher than the 'max lag' value in $wgLBFactoryConf, so that
2950 * replica DB lag does not cause page to be stuck in stales states in CDN.
2952 * This also fixes race conditions in two-tiered CDN setups (e.g. cdn2 => cdn1 => MediaWiki).
2953 * If a purge for a URL reaches cdn2 before cdn1 and a request reaches cdn2 for that URL,
2954 * it will populate the response from the stale cdn1 value. When cdn1 gets the purge, cdn2
2955 * will still be stale. If the rebound purge delay is safely higher than the time to relay
2956 * a purge to all nodes, then the rebound purge will clear cdn2 after cdn1 was cleared.
2958 * @since 1.27
2960 $wgCdnReboundPurgeDelay = 0;
2963 * Cache timeout for the CDN when a response is known to be wrong or incomplete (due to load)
2964 * @see $wgCdnMaxAge
2965 * @since 1.27
2967 $wgCdnMaxageSubstitute = 60;
2970 * Default maximum age for raw CSS/JS accesses
2972 * 300 seconds = 5 minutes.
2974 $wgForcedRawSMaxage = 300;
2977 * List of proxy servers to purge on changes; default port is 80. Use IP addresses.
2979 * When MediaWiki is running behind a proxy, it will trust X-Forwarded-For
2980 * headers sent/modified from these proxies when obtaining the remote IP address
2982 * For a list of trusted servers which *aren't* purged, see $wgSquidServersNoPurge.
2984 * @since 1.34 Renamed from $wgSquidServers.
2986 $wgCdnServers = [];
2989 * As with $wgCdnServers, except these servers aren't purged on page changes;
2990 * use to set a list of trusted proxies, etc. Supports both individual IP
2991 * addresses and CIDR blocks.
2993 * @since 1.23 Supports CIDR ranges
2994 * @since 1.34 Renamed from $wgSquidServersNoPurge
2996 $wgCdnServersNoPurge = [];
2999 * Whether to use a Host header in purge requests sent to the proxy servers
3000 * configured in $wgCdnServers. Set this to false to support a CDN
3001 * configured in forward-proxy mode.
3003 * If this is set to true, a Host header will be sent, and only the path
3004 * component of the URL will appear on the request line, as if the request
3005 * were a non-proxy HTTP 1.1 request. Varnish only supports this style of
3006 * request. Squid supports this style of request only if reverse-proxy mode
3007 * (http_port ... accel) is enabled.
3009 * If this is set to false, no Host header will be sent, and the absolute URL
3010 * will be sent in the request line, as is the standard for an HTTP proxy
3011 * request in both HTTP 1.0 and 1.1. This style of request is not supported
3012 * by Varnish, but is supported by Squid in either configuration (forward or
3013 * reverse).
3015 * @since 1.21
3016 * @deprecated since 1.33, will always be true in a future release.
3018 $wgSquidPurgeUseHostHeader = true;
3021 * Routing configuration for HTCP multicast purging. Add elements here to
3022 * enable HTCP and determine which purges are sent where. If set to an empty
3023 * array, HTCP is disabled.
3025 * Each key in this array is a regular expression to match against the purged
3026 * URL, or an empty string to match all URLs. The purged URL is matched against
3027 * the regexes in the order specified, and the first rule whose regex matches
3028 * is used, all remaining rules will thus be ignored.
3030 * @par Example configuration to send purges for upload.wikimedia.org to one
3031 * multicast group and all other purges to another:
3032 * @code
3033 * $wgHTCPRouting = [
3034 * '|^https?://upload\.wikimedia\.org|' => [
3035 * 'host' => '239.128.0.113',
3036 * 'port' => 4827,
3037 * ],
3038 * '' => [
3039 * 'host' => '239.128.0.112',
3040 * 'port' => 4827,
3041 * ],
3042 * ];
3043 * @endcode
3045 * You can also pass an array of hosts to send purges too. This is useful when
3046 * you have several multicast groups or unicast address that should receive a
3047 * given purge. Multiple hosts support was introduced in MediaWiki 1.22.
3049 * @par Example of sending purges to multiple hosts:
3050 * @code
3051 * $wgHTCPRouting = [
3052 * '' => [
3053 * // Purges to text caches using multicast
3054 * [ 'host' => '239.128.0.114', 'port' => '4827' ],
3055 * // Purges to a hardcoded list of caches
3056 * [ 'host' => '10.88.66.1', 'port' => '4827' ],
3057 * [ 'host' => '10.88.66.2', 'port' => '4827' ],
3058 * [ 'host' => '10.88.66.3', 'port' => '4827' ],
3059 * ],
3060 * ];
3061 * @endcode
3063 * @since 1.22
3064 * @see $wgHTCPMulticastTTL
3066 $wgHTCPRouting = [];
3069 * HTCP multicast TTL.
3070 * @see $wgHTCPRouting
3072 $wgHTCPMulticastTTL = 1;
3075 * Should forwarded Private IPs be accepted?
3077 $wgUsePrivateIPs = false;
3079 /** @} */ # end of HTTP proxy settings
3081 /************************************************************************//**
3082 * @name Language, regional and character encoding settings
3083 * @{
3087 * Site language code. See languages/data/Names.php for languages supported by
3088 * MediaWiki out of the box. Not all languages listed there have translations,
3089 * see languages/messages/ for the list of languages with some localisation.
3091 * Warning: Don't use any of MediaWiki's deprecated language codes listed in
3092 * LanguageCode::getDeprecatedCodeMapping or $wgDummyLanguageCodes, like "no"
3093 * for Norwegian (use "nb" instead). If you do, things will break unexpectedly.
3095 * This defines the default interface language for all users, but users can
3096 * change it in their preferences.
3098 * This also defines the language of pages in the wiki. The content is wrapped
3099 * in a html element with lang=XX attribute. This behavior can be overridden
3100 * via hooks, see Title::getPageLanguage.
3102 $wgLanguageCode = 'en';
3105 * Language cache size, or really how many languages can we handle
3106 * simultaneously without degrading to crawl speed.
3108 $wgLangObjCacheSize = 10;
3111 * Some languages need different word forms, usually for different cases.
3112 * Used in Language::convertGrammar().
3114 * @par Example:
3115 * @code
3116 * $wgGrammarForms['en']['genitive']['car'] = 'car\'s';
3117 * @endcode
3119 $wgGrammarForms = [];
3122 * Treat language links as magic connectors, not inline links
3124 $wgInterwikiMagic = true;
3127 * Hide interlanguage links from the sidebar
3129 $wgHideInterlanguageLinks = false;
3132 * List of additional interwiki prefixes that should be treated as
3133 * interlanguage links (i.e. placed in the sidebar).
3134 * Notes:
3135 * - This will not do anything unless the prefixes are defined in the interwiki
3136 * map.
3137 * - The display text for these custom interlanguage links will be fetched from
3138 * the system message "interlanguage-link-xyz" where xyz is the prefix in
3139 * this array.
3140 * - A friendly name for each site, used for tooltip text, may optionally be
3141 * placed in the system message "interlanguage-link-sitename-xyz" where xyz is
3142 * the prefix in this array.
3144 $wgExtraInterlanguageLinkPrefixes = [];
3147 * Map of interlanguage link codes to language codes. This is useful to override
3148 * what is shown as the language name when the interwiki code does not match it
3149 * exactly
3151 * @since 1.35
3153 $wgInterlanguageLinkCodeMap = [];
3156 * List of language names or overrides for default names in Names.php
3158 $wgExtraLanguageNames = [];
3161 * List of mappings from one language code to another.
3162 * This array makes the codes not appear as a selectable language on the
3163 * installer.
3165 * In Setup.php, the variable $wgDummyLanguageCodes is created by combining
3166 * these codes with a list of "deprecated" codes, which are mostly leftovers
3167 * from renames or other legacy things, and the internal codes 'qqq' and 'qqx'.
3168 * If a mapping in $wgExtraLanguageCodes collide with a built-in mapping, the
3169 * value in $wgExtraLanguageCodes will be used.
3171 * @since 1.29
3173 $wgExtraLanguageCodes = [
3174 // Language codes of macro languages, which get mapped to the main language
3175 'bh' => 'bho', // Bihari language family
3176 'no' => 'nb', // Norwegian language family
3178 // Language variants which get mapped to the main language
3179 'simple' => 'en', // Simple English
3183 * Functionally the same as $wgExtraLanguageCodes, but deprecated. Instead of
3184 * appending values to this array, append them to $wgExtraLanguageCodes.
3186 * @deprecated since 1.29
3188 $wgDummyLanguageCodes = [];
3191 * Set this to always convert certain Unicode sequences to modern ones
3192 * regardless of the content language. This has a small performance
3193 * impact.
3195 * @since 1.17
3197 $wgAllUnicodeFixes = false;
3200 * Set this to eg 'ISO-8859-1' to perform character set conversion when
3201 * loading old revisions not marked with "utf-8" flag. Use this when
3202 * converting a wiki from MediaWiki 1.4 or earlier to UTF-8 without the
3203 * burdensome mass conversion of old text data.
3205 * @note This DOES NOT touch any fields other than old_text. Titles, comments,
3206 * user names, etc still must be converted en masse in the database before
3207 * continuing as a UTF-8 wiki.
3209 $wgLegacyEncoding = false;
3212 * If set to true, the MediaWiki 1.4 to 1.5 schema conversion will
3213 * create stub reference rows in the text table instead of copying
3214 * the full text of all current entries from 'cur' to 'text'.
3216 * This will speed up the conversion step for large sites, but
3217 * requires that the cur table be kept around for those revisions
3218 * to remain viewable.
3220 * This option affects the updaters *only*. Any present cur stub
3221 * revisions will be readable at runtime regardless of this setting.
3223 $wgLegacySchemaConversion = false;
3226 * Enable dates like 'May 12' instead of '12 May', if the default date format
3227 * is 'dmy or mdy'.
3229 $wgAmericanDates = false;
3232 * For Hindi and Arabic use local numerals instead of Western style (0-9)
3233 * numerals in interface.
3235 $wgTranslateNumerals = true;
3238 * Translation using MediaWiki: namespace.
3239 * Interface messages will be loaded from the database.
3241 $wgUseDatabaseMessages = true;
3244 * Maximum entry size in the message cache, in bytes
3246 $wgMaxMsgCacheEntrySize = 10000;
3249 * Whether to enable language variant conversion.
3251 $wgDisableLangConversion = false;
3254 * Whether to enable language variant conversion for links.
3256 $wgDisableTitleConversion = false;
3259 * Default variant code, if false, the default will be the language code
3261 $wgDefaultLanguageVariant = false;
3264 * Whether to enable the pig Latin variant of English (en-x-piglatin),
3265 * used to ease variant development work.
3267 $wgUsePigLatinVariant = false;
3270 * Disabled variants array of language variant conversion.
3272 * @par Example:
3273 * @code
3274 * $wgDisabledVariants[] = 'zh-mo';
3275 * $wgDisabledVariants[] = 'zh-my';
3276 * @endcode
3278 $wgDisabledVariants = [];
3281 * Like $wgArticlePath, but on multi-variant wikis, this provides a
3282 * path format that describes which parts of the URL contain the
3283 * language variant.
3285 * @par Example:
3286 * @code
3287 * $wgLanguageCode = 'sr';
3288 * $wgVariantArticlePath = '/$2/$1';
3289 * $wgArticlePath = '/wiki/$1';
3290 * @endcode
3292 * A link to /wiki/ would be redirected to /sr/Главна_страна
3294 * It is important that $wgArticlePath not overlap with possible values
3295 * of $wgVariantArticlePath.
3297 $wgVariantArticlePath = false;
3300 * Show a bar of language selection links in the user login and user
3301 * registration forms; edit the "loginlanguagelinks" message to
3302 * customise these.
3304 $wgLoginLanguageSelector = false;
3307 * When translating messages with wfMessage(), it is not always clear what
3308 * should be considered UI messages and what should be content messages.
3310 * For example, for the English Wikipedia, there should be only one 'mainpage',
3311 * so when getting the link for 'mainpage', we should treat it as site content
3312 * and call ->inContentLanguage()->text(), but for rendering the text of the
3313 * link, we call ->text(). The code behaves this way by default. However,
3314 * sites like the Wikimedia Commons do offer different versions of 'mainpage'
3315 * and the like for different languages. This array provides a way to override
3316 * the default behavior.
3318 * @par Example:
3319 * To allow language-specific main page and community
3320 * portal:
3321 * @code
3322 * $wgForceUIMsgAsContentMsg = [ 'mainpage', 'portal-url' ];
3323 * @endcode
3325 $wgForceUIMsgAsContentMsg = [];
3328 * Fake out the timezone that the server thinks it's in. This will be used for
3329 * date display and not for what's stored in the DB. Leave to null to retain
3330 * your server's OS-based timezone value.
3332 * This variable is currently used only for signature formatting and for local
3333 * time/date parser variables ({{LOCALTIME}} etc.)
3335 * Timezones can be translated by editing MediaWiki messages of type
3336 * timezone-nameinlowercase like timezone-utc.
3338 * A list of usable timezones can found at:
3339 * https://www.php.net/manual/en/timezones.php
3341 * @par Examples:
3342 * @code
3343 * $wgLocaltimezone = 'UTC';
3344 * $wgLocaltimezone = 'GMT';
3345 * $wgLocaltimezone = 'PST8PDT';
3346 * $wgLocaltimezone = 'Europe/Sweden';
3347 * $wgLocaltimezone = 'CET';
3348 * @endcode
3350 $wgLocaltimezone = null;
3353 * Set an offset from UTC in minutes to use for the default timezone setting
3354 * for anonymous users and new user accounts.
3356 * This setting is used for most date/time displays in the software, and is
3357 * overridable in user preferences. It is *not* used for signature timestamps.
3359 * By default, this will be set to match $wgLocaltimezone.
3361 $wgLocalTZoffset = null;
3364 * List of Unicode characters for which capitalization is overridden in
3365 * Language::ucfirst. The characters should be
3366 * represented as char_to_convert => conversion_override. See T219279 for details
3367 * on why this is useful during php version transitions.
3369 * @warning: EXPERIMENTAL!
3371 * @since 1.34
3372 * @var array
3374 $wgOverrideUcfirstCharacters = [];
3376 /** @} */ # End of language/charset settings
3378 /*************************************************************************//**
3379 * @name Output format and skin settings
3380 * @{
3384 * The default Content-Type header.
3386 $wgMimeType = 'text/html';
3389 * Defines the value of the version attribute in the &lt;html&gt; tag, if any.
3391 * If your wiki uses RDFa, set it to the correct value for RDFa+HTML5.
3392 * Correct current values are 'HTML+RDFa 1.0' or 'XHTML+RDFa 1.0'.
3393 * See also https://www.w3.org/TR/rdfa-in-html/#document-conformance
3394 * @since 1.16
3396 $wgHtml5Version = null;
3399 * Temporary variable that allows HTMLForms to be rendered as tables.
3400 * Table based layouts cause various issues when designing for mobile.
3401 * This global allows skins or extensions a means to force non-table based rendering.
3402 * Setting to false forces form components to always render as div elements.
3403 * @since 1.24
3405 $wgHTMLFormAllowTableFormat = true;
3408 * Temporary variable that applies MediaWiki UI wherever it can be supported.
3409 * Temporary variable that should be removed when mediawiki ui is more
3410 * stable and change has been communicated.
3411 * @since 1.24
3413 $wgUseMediaWikiUIEverywhere = false;
3416 * Whether to label the store-to-database-and-show-to-others button in the editor
3417 * as "Save page"/"Save changes" if false (the default) or, if true, instead as
3418 * "Publish page"/"Publish changes".
3420 * @since 1.28
3422 $wgEditSubmitButtonLabelPublish = false;
3425 * Permit other namespaces in addition to the w3.org default.
3427 * Use the prefix for the key and the namespace for the value.
3429 * @par Example:
3430 * @code
3431 * $wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg';
3432 * @endcode
3433 * Normally we wouldn't have to define this in the root "<html>"
3434 * element, but IE needs it there in some circumstances.
3436 * This is ignored if $wgMimeType is set to a non-XML MIME type.
3438 $wgXhtmlNamespaces = [];
3441 * Site notice shown at the top of each page
3443 * MediaWiki:Sitenotice page, which will override this. You can also
3444 * provide a separate message for logged-out users using the
3445 * MediaWiki:Anonnotice page.
3447 $wgSiteNotice = '';
3450 * Default skin, for new users and anonymous visitors. Registered users may
3451 * change this to any one of the other available skins in their preferences.
3453 $wgDefaultSkin = 'vector';
3456 * Fallback skin used when the skin defined by $wgDefaultSkin can't be found.
3458 * @since 1.24
3460 $wgFallbackSkin = 'fallback';
3463 * Specify the names of skins that should not be presented in the list of
3464 * available skins in user preferences.
3466 * NOTE: This does not uninstall the skin, and it will still be accessible
3467 * via the `useskin` query parameter. To uninstall a skin, remove its inclusion
3468 * from LocalSettings.php.
3470 * @see SkinFactory::getAllowedSkins
3472 $wgSkipSkins = [];
3475 * Allow user Javascript page?
3476 * This enables a lot of neat customizations, but may
3477 * increase security risk to users and server load.
3479 $wgAllowUserJs = false;
3482 * Allow user Cascading Style Sheets (CSS)?
3483 * This enables a lot of neat customizations, but may
3484 * increase security risk to users and server load.
3486 $wgAllowUserCss = false;
3489 * Allow style-related user-preferences?
3491 * This controls whether the `editfont` and `underline` preferences
3492 * are available to users.
3494 $wgAllowUserCssPrefs = true;
3497 * Use the site's Javascript page?
3499 $wgUseSiteJs = true;
3502 * Use the site's Cascading Style Sheets (CSS)?
3504 $wgUseSiteCss = true;
3507 * Break out of framesets. This can be used to prevent clickjacking attacks,
3508 * or to prevent external sites from framing your site with ads.
3510 $wgBreakFrames = false;
3513 * The X-Frame-Options header to send on pages sensitive to clickjacking
3514 * attacks, such as edit pages. This prevents those pages from being displayed
3515 * in a frame or iframe. The options are:
3517 * - 'DENY': Do not allow framing. This is recommended for most wikis.
3519 * - 'SAMEORIGIN': Allow framing by pages on the same domain. This can be used
3520 * to allow framing within a trusted domain. This is insecure if there
3521 * is a page on the same domain which allows framing of arbitrary URLs.
3523 * - false: Allow all framing. This opens up the wiki to XSS attacks and thus
3524 * full compromise of local user accounts. Private wikis behind a
3525 * corporate firewall are especially vulnerable. This is not
3526 * recommended.
3528 * For extra safety, set $wgBreakFrames = true, to prevent framing on all pages,
3529 * not just edit pages.
3531 $wgEditPageFrameOptions = 'DENY';
3534 * Disallow framing of API pages directly, by setting the X-Frame-Options
3535 * header. Since the API returns CSRF tokens, allowing the results to be
3536 * framed can compromise your user's account security.
3537 * Options are:
3538 * - 'DENY': Do not allow framing. This is recommended for most wikis.
3539 * - 'SAMEORIGIN': Allow framing by pages on the same domain.
3540 * - false: Allow all framing.
3541 * Note: $wgBreakFrames will override this for human formatted API output.
3543 $wgApiFrameOptions = 'DENY';
3546 * Disable output compression (enabled by default if zlib is available)
3548 $wgDisableOutputCompression = false;
3551 * How should section IDs be encoded?
3552 * This array can contain 1 or 2 elements, each of them can be one of:
3553 * - 'html5' is modern HTML5 style encoding with minimal escaping. Displays Unicode
3554 * characters in most browsers' address bars.
3555 * - 'legacy' is old MediaWiki-style encoding, e.g. 啤酒 turns into .E5.95.A4.E9.85.92
3557 * The first element of this array specifies the primary mode of escaping IDs. This
3558 * is what users will see when they e.g. follow an [[#internal link]] to a section of
3559 * a page.
3561 * The optional second element defines a fallback mode, useful for migrations.
3562 * If present, it will direct MediaWiki to add empty <span>s to every section with its
3563 * id attribute set to fallback encoded title so that links using the previous encoding
3564 * would still work.
3566 * Example: you want to migrate your wiki from 'legacy' to 'html5'
3568 * On the first step, set this variable to [ 'legacy', 'html5' ]. After a while, when
3569 * all caches (parser, HTTP, etc.) contain only pages generated with this setting,
3570 * flip the value to [ 'html5', 'legacy' ]. This will result in all internal links being
3571 * generated in the new encoding while old links (both external and cached internal) will
3572 * still work. After a long time, you might want to ditch backwards compatibility and
3573 * set it to [ 'html5' ]. After all, pages get edited, breaking incoming links no matter which
3574 * fragment mode is used.
3576 * @since 1.30
3578 $wgFragmentMode = [ 'legacy', 'html5' ];
3581 * Which ID escaping mode should be used for external interwiki links? See documentation
3582 * for $wgFragmentMode above for details of each mode. Because you can't control external sites,
3583 * this setting should probably always be 'legacy', unless every wiki you link to has converted
3584 * to 'html5'.
3586 * @since 1.30
3588 $wgExternalInterwikiFragmentMode = 'legacy';
3591 * Abstract list of footer icons for skins in place of old copyrightico and poweredbyico code
3592 * You can add new icons to the built in copyright or poweredby, or you can create
3593 * a new block. Though note that you may need to add some custom css to get good styling
3594 * of new blocks in monobook. vector and modern should work without any special css.
3596 * $wgFooterIcons itself is a key/value array.
3597 * The key is the name of a block that the icons will be wrapped in. The final id varies
3598 * by skin; Monobook and Vector will turn poweredby into f-poweredbyico while Modern
3599 * turns it into mw_poweredby.
3600 * The value is either key/value array of icons or a string.
3601 * In the key/value array the key may or may not be used by the skin but it can
3602 * be used to find the icon and unset it or change the icon if needed.
3603 * This is useful for disabling icons that are set by extensions.
3604 * The value should be either a string or an array. If it is a string it will be output
3605 * directly as html, however some skins may choose to ignore it. An array is the preferred format
3606 * for the icon, the following keys are used:
3607 * - src: An absolute url to the image to use for the icon, this is recommended
3608 * but not required, however some skins will ignore icons without an image
3609 * - srcset: optional additional-resolution images; see HTML5 specs
3610 * - url: The url to use in the a element around the text or icon, if not set an a element will
3611 * not be outputted
3612 * - alt: This is the text form of the icon, it will be displayed without an image in
3613 * skins like Modern or if src is not set, and will otherwise be used as
3614 * the alt="" for the image. This key is required.
3615 * - width and height: If the icon specified by src is not of the standard size
3616 * you can specify the size of image to use with these keys.
3617 * Otherwise they will default to the standard 88x31.
3618 * @todo Reformat documentation.
3620 $wgFooterIcons = [
3621 "copyright" => [
3622 "copyright" => [], // placeholder for the built in copyright icon
3624 "poweredby" => [
3625 "mediawiki" => [
3626 // Defaults to point at
3627 // "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png"
3628 // plus srcset for 1.5x, 2x resolution variants.
3629 "src" => null,
3630 "url" => "https://www.mediawiki.org/",
3631 "alt" => "Powered by MediaWiki",
3637 * Login / create account link behavior when it's possible for anonymous users
3638 * to create an account.
3639 * - true = use a combined login / create account link
3640 * - false = split login and create account into two separate links
3642 $wgUseCombinedLoginLink = false;
3645 * Display user edit counts in various prominent places.
3647 $wgEdititis = false;
3650 * Some web hosts attempt to rewrite all responses with a 404 (not found)
3651 * status code, mangling or hiding MediaWiki's output. If you are using such a
3652 * host, you should start looking for a better one. While you're doing that,
3653 * set this to false to convert some of MediaWiki's 404 responses to 200 so
3654 * that the generated error pages can be seen.
3656 * In cases where for technical reasons it is more important for MediaWiki to
3657 * send the correct status code than for the body to be transmitted intact,
3658 * this configuration variable is ignored.
3660 $wgSend404Code = true;
3663 * The $wgShowRollbackEditCount variable is used to show how many edits can be rolled back.
3664 * The numeric value of the variable controls how many edits MediaWiki will look back to
3665 * determine whether a rollback is allowed (by checking that they are all from the same author).
3666 * If the value is false or 0, the edits are not counted. Disabling this will prevent MediaWiki
3667 * from hiding some useless rollback links.
3669 * @since 1.20
3671 $wgShowRollbackEditCount = 10;
3674 * Output a <link rel="canonical"> tag on every page indicating the canonical
3675 * server which should be used, i.e. $wgServer or $wgCanonicalServer. Since
3676 * detection of the current server is unreliable, the link is sent
3677 * unconditionally.
3679 $wgEnableCanonicalServerLink = false;
3682 * When OutputHandler is used, mangle any output that contains
3683 * <cross-domain-policy>. Without this, an attacker can send their own
3684 * cross-domain policy unless it is prevented by the crossdomain.xml file at
3685 * the domain root.
3687 * @since 1.25
3689 $wgMangleFlashPolicy = true;
3691 /** @} */ # End of output format settings }
3693 /*************************************************************************//**
3694 * @name ResourceLoader settings
3695 * @{
3699 * Define extra client-side modules to be registered with ResourceLoader.
3701 * NOTE: It is recommended to define modules in extension.json or skin.json
3702 * whenever possible.
3704 * ## Using resource modules
3706 * By default modules are registered as an instance of ResourceLoaderFileModule.
3707 * You find the relevant code in resources/Resources.php. These are the options:
3709 * ### class
3711 * Alternate subclass of ResourceLoaderModule (rather than default ResourceLoaderFileModule).
3712 * If this is used, some of the other properties may not apply, and you can specify your
3713 * own arguments. Since MediaWiki 1.30, it may now specify a callback function as an
3714 * alternative to a plain class name, using the factory key in the module description array.
3715 * This allows dependency injection to be used for %ResourceLoader modules.
3717 * Class name of alternate subclass
3719 * @par Example:
3720 * @code
3721 * $wgResourceModules['ext.myExtension'] = [
3722 * 'class' => ResourceLoaderWikiModule::class,
3723 * ];
3724 * @endcode
3726 * ### debugScripts
3728 * Scripts to include in debug contexts.
3730 * %File path string or array of file path strings.
3732 * @par Example:
3733 * @code
3734 * $wgResourceModules['ext.myExtension'] = [
3735 * 'debugScripts' => 'resources/MyExtension/debugMyExt.js',
3736 * ];
3737 * @endcode
3739 * ### dependencies
3741 * Modules which must be loaded before this module.
3743 * Module name string or array of module name strings.
3745 * @par Example:
3746 * @code
3747 * $wgResourceModules['ext.myExtension'] = [
3748 * 'dependencies' => [ 'jquery.cookie', 'mediawiki.util' ],
3749 * ];
3750 * @endcode
3752 * ### deprecated
3754 * Whether the module is deprecated and usage is discouraged.
3756 * Either a boolean, or a string or an object with key message can be used to customise
3757 * deprecation message.
3759 * @par Example:
3760 * @code
3761 * $wgResourceModules['ext.myExtension'] = [
3762 * 'deprecated' => 'You should use ext.myExtension2 instead',
3763 * ];
3764 * @endcode
3766 * ### group
3768 * Group which this module should be loaded together with.
3770 * Group name string.
3772 * @par Example:
3773 * @code
3774 * $wgResourceModules['ext.myExtension'] = [
3775 * 'group' => 'myExtGroup',
3776 * ];
3777 * @endcode
3779 * See also
3780 * [Groups](https://www.mediawiki.org/wiki/Special:MyLanguage/ResourceLoader/Features#Groups)
3781 * on mediawiki.org.
3783 * ### languageScripts
3785 * Scripts to include in specific language contexts. See the scripts option below for an
3786 * example.
3788 * Array keyed by language code containing file path string or array of file path strings.
3790 * ### localBasePath
3792 * Base path to prepend to all local paths in $options. Defaults to $IP.
3794 * Base path string
3796 * @par Example:
3797 * @code
3798 * $wgResourceModules['ext.myExtension'] = [
3799 * 'localBasePath' => __DIR__,
3800 * ];
3801 * @endcode
3803 * ### messages
3805 * Messages to always load
3807 * Array of message key strings.
3809 * @par Example:
3810 * @code
3811 * $wgResourceModules['ext.myExtension'] = [
3812 * 'messages' => [
3813 * 'searchsuggest-search',
3814 * 'searchsuggest-containing',
3815 * ],
3816 * ];
3817 * @endcode
3819 * ### noflip
3821 * Whether to skip CSSJanus LTR-to-RTL flipping for this module. Recommended for styles
3822 * imported from libraries that already properly handle their RTL styles. Default is false,
3823 * meaning CSSJanus will be applied on RTL-mode output.
3825 * Boolean.
3827 * @par Example:
3828 * @code
3829 * $wgResourceModules['ext.myExtension'] = [
3830 * 'noflip' => true,
3831 * ];
3832 * @endcode
3834 * ### packageFiles
3836 * Package files that can be require()d. 'packageFiles' cannot be combined with any of the
3837 * scripts options: 'scripts', 'languageScripts' and 'debugScripts'.
3839 * String or array of package file.
3841 * ### remoteBasePath
3843 * Base path to prepend to all remote paths in $options. Defaults to $wgScriptPath.
3844 * Cannot be combined with remoteExtPath.
3846 * Base path string
3848 * @par Example:
3849 * @code
3850 * $wgResourceModules['ext.myExtension'] = [
3851 * 'remoteBasePath' => '/w/extensions/MyExtension',
3852 * ];
3853 * @endcode
3855 * ### remoteExtPath
3857 * Equivalent of remoteBasePath, but relative to $wgExtensionAssetsPath. Cannot be
3858 * combined with remoteBasePath
3860 * Base path string
3862 * @par Example:
3863 * @code
3864 * $wgResourceModules['ext.myExtension'] = [
3865 * 'remoteExtPath' => 'MyExtension',
3866 * ];
3867 * @endcode
3869 * ### scripts
3871 * Scripts to always include.
3873 * %File path string or array of file path strings.
3875 * @par Example:
3876 * @code
3877 * $wgResourceModules['ext.myExtension'] = [
3878 * 'languageScripts' => [
3879 * 'bs' => 'extensions/MyExtension/languages/bs.js',
3880 * 'fi' => 'extensions/MyExtension/languages/fi.js',
3881 * ],
3882 * 'scripts' => [
3883 * 'extensions/MyExtension/myExtension.js',
3884 * 'extensions/MyExtension/utils.js',
3885 * ],
3886 * ];
3887 * @endcode
3889 * ### skinScripts
3891 * Scripts to include in specific skin contexts.
3893 * Array keyed by skin name containing file path string or array of file path strings.
3895 * @par Example:
3896 * @code
3897 * $wgResourceModules['ext.myExtension'] = [
3898 * 'skinScripts' => [
3899 * 'default' => 'extensions/MyExtension/default-skin-overrides.js',
3900 * ],
3901 * ];
3902 * @endcode
3904 * ### skinStyles
3906 * Styles to include in specific skin contexts. (mapping of skin name to style(s))
3907 * See $wgResourceModuleSkinStyles below for an example.
3909 * Array keyed by skin name containing file path string or array of file path strings.
3911 * ### skipFunction
3913 * Function that returns true when the module should be skipped. Intended for when the
3914 * module provides a polyfill that is not required in modern browsers
3916 * Filename of a JavaScript file with a top-level return (it should not be wrapped in a
3917 * function).
3919 * @par Example:
3920 * @code
3921 * $wgResourceModules['ext.myExtension'] = [
3922 * 'skipFunction' => 'myext-polyfill-needed.js',
3923 * ];
3924 * @endcode
3926 * ### styles
3928 * Styles to always include in the module.
3930 * %File path string or list of file path strings. The included file can be automatically
3931 * wrapped in a @media query by specifying the file path as the key in an object, with
3932 * the value specifying the media query.
3934 * See $wgResourceModuleSkinStyles below for additional examples.
3936 * @par Example:
3937 * @code
3938 * $wgResourceModules['example'] = [
3939 * 'styles' => [
3940 * 'foo.css',
3941 * 'bar.css',
3942 * ],
3943 * ];
3944 * $wgResourceModules['example.media'] = [
3945 * 'styles' => [
3946 * 'foo.css' => [ 'media' => 'print' ],
3947 * ];
3948 * $wgResourceModules['example.mixed'] = [
3949 * 'styles' => [
3950 * 'foo.css',
3951 * 'bar.css' => [ 'media' => 'print' ],
3952 * ],
3953 * ];
3954 * @endcode
3956 * ### targets
3958 * %ResourceLoader target the module can run on.
3960 * String or array of targets.
3962 * @par Example:
3963 * @code
3964 * $wgResourceModules['ext.myExtension'] = [
3965 * 'targets' => [ 'desktop', 'mobile' ],
3966 * ];
3967 * @endcode
3969 * ### templates
3971 * Templates to be loaded for client-side usage.
3973 * Object or array of templates.
3975 * @par Example:
3976 * @code
3977 * $wgResourceModules['ext.myExtension'] = [
3978 * 'templates' => [
3979 * 'templates/template.html',
3980 * 'templates/template2.html',
3981 * ],
3982 * ];
3983 * @endcode
3985 $wgResourceModules = [];
3988 * Add extra skin-specific styles to a resource module.
3990 * These are automatically added by ResourceLoader to the 'skinStyles' list of
3991 * the existing module. The 'styles' list cannot be modified or disabled.
3993 * For example, below a module "bar" is defined and skin Foo provides additional
3994 * styles for it:
3996 * @par Example:
3997 * @code
3998 * $wgResourceModules['bar'] = [
3999 * 'scripts' => 'resources/bar/bar.js',
4000 * 'styles' => 'resources/bar/main.css',
4001 * ];
4003 * $wgResourceModuleSkinStyles['foo'] = [
4004 * 'bar' => 'skins/Foo/bar.css',
4005 * ];
4006 * @endcode
4008 * This is effectively equivalent to:
4010 * @par Equivalent:
4011 * @code
4012 * $wgResourceModules['bar'] = [
4013 * 'scripts' => 'resources/bar/bar.js',
4014 * 'styles' => 'resources/bar/main.css',
4015 * 'skinStyles' => [
4016 * 'foo' => skins/Foo/bar.css',
4017 * ],
4018 * ];
4019 * @endcode
4021 * If the module already defines its own entry in `skinStyles` for a given skin, then
4022 * $wgResourceModuleSkinStyles is ignored.
4024 * If a module defines a `skinStyles['default']` the skin may want to extend that instead
4025 * of replacing it. This can be done using the `+` prefix.
4027 * @par Example:
4028 * @code
4029 * $wgResourceModules['bar'] = [
4030 * 'scripts' => 'resources/bar/bar.js',
4031 * 'styles' => 'resources/bar/basic.css',
4032 * 'skinStyles' => [
4033 * 'default' => 'resources/bar/additional.css',
4034 * ],
4035 * ];
4036 * // Note the '+' character:
4037 * $wgResourceModuleSkinStyles['foo'] = [
4038 * '+bar' => 'skins/Foo/bar.css',
4039 * ];
4040 * @endcode
4042 * This is effectively equivalent to:
4044 * @par Equivalent:
4045 * @code
4046 * $wgResourceModules['bar'] = [
4047 * 'scripts' => 'resources/bar/bar.js',
4048 * 'styles' => 'resources/bar/basic.css',
4049 * 'skinStyles' => [
4050 * 'default' => 'resources/bar/additional.css',
4051 * 'foo' => [
4052 * 'resources/bar/additional.css',
4053 * 'skins/Foo/bar.css',
4054 * ],
4055 * ],
4056 * ];
4057 * @endcode
4059 * In other words, as a module author, use the `styles` list for stylesheets that may not be
4060 * disabled by a skin. To provide default styles that may be extended or replaced,
4061 * use `skinStyles['default']`.
4063 * As with $wgResourceModules, always set the localBasePath and remoteBasePath
4064 * keys (or one of remoteExtPath/remoteSkinPath).
4066 * @par Example:
4067 * @code
4068 * $wgResourceModuleSkinStyles['foo'] = [
4069 * 'bar' => 'bar.css',
4070 * 'quux' => 'quux.css',
4071 * 'remoteSkinPath' => 'Foo',
4072 * 'localBasePath' => __DIR__,
4073 * ];
4074 * @endcode
4076 $wgResourceModuleSkinStyles = [];
4079 * Extensions should register foreign module sources here. 'local' is a
4080 * built-in source that is not in this array, but defined by
4081 * ResourceLoader::__construct() so that it cannot be unset.
4083 * @par Example:
4084 * @code
4085 * $wgResourceLoaderSources['foo'] = 'http://example.org/w/load.php';
4086 * @endcode
4088 $wgResourceLoaderSources = [];
4091 * The default 'remoteBasePath' value for instances of ResourceLoaderFileModule.
4092 * Defaults to $wgScriptPath.
4094 $wgResourceBasePath = null;
4097 * Maximum time in seconds to cache resources served by ResourceLoader.
4098 * Used to set last modified headers (max-age/s-maxage).
4100 * Following options to distinguish:
4101 * - versioned: Used for modules with a version, because changing version
4102 * numbers causes cache misses. This normally has a long expiry time.
4103 * - unversioned: Used for modules without a version to propagate changes
4104 * quickly to clients. Also used for modules with errors to recover quickly.
4105 * This normally has a short expiry time.
4107 * Expiry time for the options to distinguish:
4108 * - server: Squid/Varnish but also any other public proxy cache between the
4109 * client and MediaWiki.
4110 * - client: On the client side (e.g. in the browser cache).
4112 $wgResourceLoaderMaxage = [
4113 'versioned' => 30 * 24 * 60 * 60, // 30 days
4114 'unversioned' => 5 * 60, // 5 minutes
4118 * Use the main stash instead of the module_deps table for indirect dependency tracking
4120 * @since 1.35
4121 * @warning EXPERIMENTAL
4123 $wgResourceLoaderUseObjectCacheForDeps = false;
4126 * The default debug mode (on/off) for of ResourceLoader requests.
4128 * This will still be overridden when the debug URL parameter is used.
4130 $wgResourceLoaderDebug = false;
4133 * Whether to ensure the mediawiki.legacy library is loaded before other modules.
4135 * @deprecated since 1.26: Always declare dependencies.
4137 $wgIncludeLegacyJavaScript = false;
4140 * Whether or not to assign configuration variables to the global window object.
4142 * If this is set to false, old code using deprecated variables will no longer
4143 * work.
4145 * @par Example of legacy code:
4146 * @code{,js}
4147 * if ( window.wgRestrictionEdit ) { ... }
4148 * @endcode
4149 * or:
4150 * @code{,js}
4151 * if ( wgIsArticle ) { ... }
4152 * @endcode
4154 * Instead, one needs to use mw.config.
4155 * @par Example using mw.config global configuration:
4156 * @code{,js}
4157 * if ( mw.config.exists('wgRestrictionEdit') ) { ... }
4158 * @endcode
4159 * or:
4160 * @code{,js}
4161 * if ( mw.config.get('wgIsArticle') ) { ... }
4162 * @endcode
4164 $wgLegacyJavaScriptGlobals = false;
4167 * ResourceLoader will not generate URLs whose query string is more than
4168 * this many characters long, and will instead use multiple requests with
4169 * shorter query strings. Using multiple requests may degrade performance,
4170 * but may be needed based on the query string limit supported by your web
4171 * server and/or your user's web browsers.
4173 * Default: `2000`.
4175 * @see ResourceLoaderStartUpModule::getMaxQueryLength
4176 * @since 1.17
4177 * @var int
4179 $wgResourceLoaderMaxQueryLength = false;
4182 * If set to true, JavaScript modules loaded from wiki pages will be parsed
4183 * prior to minification to validate it.
4185 * Parse errors will result in a JS exception being thrown during module load,
4186 * which avoids breaking other modules loaded in the same request.
4188 $wgResourceLoaderValidateJS = true;
4191 * When enabled, execution of JavaScript modules is profiled client-side.
4193 * Instrumentation happens in mw.loader.profiler.
4194 * Use `mw.inspect('time')` from the browser console to display the data.
4196 * @since 1.32
4198 $wgResourceLoaderEnableJSProfiler = false;
4201 * Whether ResourceLoader should attempt to persist modules in localStorage on
4202 * browsers that support the Web Storage API.
4204 $wgResourceLoaderStorageEnabled = true;
4207 * Cache version for client-side ResourceLoader module storage. You can trigger
4208 * invalidation of the contents of the module store by incrementing this value.
4210 * @since 1.23
4212 $wgResourceLoaderStorageVersion = 1;
4215 * Whether to allow site-wide CSS (MediaWiki:Common.css and friends) on
4216 * restricted pages like Special:UserLogin or Special:Preferences where
4217 * JavaScript is disabled for security reasons. As it is possible to
4218 * execute JavaScript through CSS, setting this to true opens up a
4219 * potential security hole. Some sites may "skin" their wiki by using
4220 * site-wide CSS, causing restricted pages to look unstyled and different
4221 * from the rest of the site.
4223 * @since 1.25
4225 $wgAllowSiteCSSOnRestrictedPages = false;
4228 * Whether to use the development version of Vue.js. This should be disabled
4229 * for production installations. For development installations, enabling this
4230 * provides useful additional warnings and checks.
4232 * Even when this is disabled, using ResourceLoader's debug mode (?debug=true)
4233 * will cause the development version to be loaded.
4234 * @since 1.35
4236 $wgVueDevelopmentMode = false;
4238 /** @} */ # End of ResourceLoader settings }
4240 /*************************************************************************//**
4241 * @name Page title and interwiki link settings
4242 * @{
4246 * Name of the project namespace. If left set to false, $wgSitename will be
4247 * used instead.
4249 $wgMetaNamespace = false;
4252 * Name of the project talk namespace.
4254 * Normally you can ignore this and it will be something like
4255 * $wgMetaNamespace . "_talk". In some languages, you may want to set this
4256 * manually for grammatical reasons.
4258 $wgMetaNamespaceTalk = false;
4261 * Additional namespaces. If the namespaces defined in Language.php and
4262 * Namespace.php are insufficient, you can create new ones here, for example,
4263 * to import Help files in other languages. You can also override the namespace
4264 * names of existing namespaces. Extensions should use the CanonicalNamespaces
4265 * hook or extension.json.
4267 * @warning Once you delete a namespace, the pages in that namespace will
4268 * no longer be accessible. If you rename it, then you can access them through
4269 * the new namespace name.
4271 * Custom namespaces should start at 100 to avoid conflicting with standard
4272 * namespaces, and should always follow the even/odd main/talk pattern.
4274 * @par Example:
4275 * @code
4276 * $wgExtraNamespaces = [
4277 * 100 => "Hilfe",
4278 * 101 => "Hilfe_Diskussion",
4279 * 102 => "Aide",
4280 * 103 => "Discussion_Aide"
4281 * ];
4282 * @endcode
4284 * @todo Add a note about maintenance/namespaceDupes.php
4286 $wgExtraNamespaces = [];
4289 * Same as above, but for namespaces with gender distinction.
4290 * Note: the default form for the namespace should also be set
4291 * using $wgExtraNamespaces for the same index.
4292 * @since 1.18
4294 $wgExtraGenderNamespaces = [];
4297 * Define extra namespace aliases.
4299 * These are alternate names for the primary localised namespace names, which
4300 * are defined by $wgExtraNamespaces and the language file. If a page is
4301 * requested with such a prefix, the request will be redirected to the primary
4302 * name.
4304 * Set this to a map from namespace names to IDs.
4306 * @par Example:
4307 * @code
4308 * $wgNamespaceAliases = [
4309 * 'Wikipedian' => NS_USER,
4310 * 'Help' => 100,
4311 * ];
4312 * @endcode
4314 * @see Language::getNamespaceAliases for accessing the full list of aliases,
4315 * including those defined by other means.
4317 $wgNamespaceAliases = [];
4320 * Allowed title characters -- regex character class
4321 * Don't change this unless you know what you're doing
4323 * Problematic punctuation:
4324 * - []{}|# Are needed for link syntax, never enable these
4325 * - <> Causes problems with HTML escaping, don't use
4326 * - % Enabled by default, minor problems with path to query rewrite rules, see below
4327 * - + Enabled by default, but doesn't work with path to query rewrite rules,
4328 * corrupted by apache
4329 * - ? Enabled by default, but doesn't work with path to PATH_INFO rewrites
4331 * All three of these punctuation problems can be avoided by using an alias,
4332 * instead of a rewrite rule of either variety.
4334 * The problem with % is that when using a path to query rewrite rule, URLs are
4335 * double-unescaped: once by Apache's path conversion code, and again by PHP. So
4336 * %253F, for example, becomes "?". Our code does not double-escape to compensate
4337 * for this, indeed double escaping would break if the double-escaped title was
4338 * passed in the query string rather than the path. This is a minor security issue
4339 * because articles can be created such that they are hard to view or edit.
4341 * In some rare cases you may wish to remove + for compatibility with old links.
4343 $wgLegalTitleChars = " %!\"$&'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+";
4346 * Array for local interwiki values, for each of the interwiki prefixes that point to
4347 * the current wiki.
4349 * Note, recent changes feeds use only the first entry in this array. See $wgRCFeeds.
4351 $wgLocalInterwikis = [];
4354 * Expiry time for cache of interwiki table
4356 $wgInterwikiExpiry = 10800;
4359 * @name Interwiki caching settings.
4360 * @{
4364 * Interwiki cache, either as an associative array or a path to a constant
4365 * database (.cdb) file.
4367 * This data structure database is generated by the `dumpInterwiki` maintenance
4368 * script (which lives in the WikimediaMaintenance repository) and has key
4369 * formats such as the following:
4371 * - dbname:key - a simple key (e.g. enwiki:meta)
4372 * - _sitename:key - site-scope key (e.g. wiktionary:meta)
4373 * - __global:key - global-scope key (e.g. __global:meta)
4374 * - __sites:dbname - site mapping (e.g. __sites:enwiki)
4376 * Sites mapping just specifies site name, other keys provide "local url"
4377 * data layout.
4379 * @var bool|array|string
4381 $wgInterwikiCache = false;
4384 * Specify number of domains to check for messages.
4385 * - 1: Just wiki(db)-level
4386 * - 2: wiki and global levels
4387 * - 3: site levels
4389 $wgInterwikiScopes = 3;
4392 * Fallback site, if unable to resolve from cache
4394 $wgInterwikiFallbackSite = 'wiki';
4396 /** @} */ # end of Interwiki caching settings.
4399 * If local interwikis are set up which allow redirects,
4400 * set this regexp to restrict URLs which will be displayed
4401 * as 'redirected from' links.
4403 * @par Example:
4404 * It might look something like this:
4405 * @code
4406 * $wgRedirectSources = '!^https?://[a-z-]+\.wikipedia\.org/!';
4407 * @endcode
4409 * Leave at false to avoid displaying any incoming redirect markers.
4410 * This does not affect intra-wiki redirects, which don't change
4411 * the URL.
4413 $wgRedirectSources = false;
4416 * Set this to false to avoid forcing the first letter of links to capitals.
4418 * @warning may break links! This makes links COMPLETELY case-sensitive. Links
4419 * appearing with a capital at the beginning of a sentence will *not* go to the
4420 * same place as links in the middle of a sentence using a lowercase initial.
4422 $wgCapitalLinks = true;
4425 * @since 1.16 - This can now be set per-namespace. Some special namespaces (such as Special, see
4426 * NamespaceInfo::$alwaysCapitalizedNamespaces for the full list) must be true by default (and
4427 * setting them has no effect), due to various things that require them to be so. Also, since Talk
4428 * namespaces need to directly mirror their associated content namespaces, the values for those are
4429 * ignored in favor of the subject namespace's setting. Setting for NS_MEDIA is taken automatically
4430 * from NS_FILE.
4432 * @par Example:
4433 * @code
4434 * $wgCapitalLinkOverrides[ NS_FILE ] = false;
4435 * @endcode
4437 $wgCapitalLinkOverrides = [];
4440 * Which namespaces should support subpages?
4441 * See Language.php for a list of namespaces.
4443 $wgNamespacesWithSubpages = [
4444 NS_TALK => true,
4445 NS_USER => true,
4446 NS_USER_TALK => true,
4447 NS_PROJECT => true,
4448 NS_PROJECT_TALK => true,
4449 NS_FILE_TALK => true,
4450 NS_MEDIAWIKI => true,
4451 NS_MEDIAWIKI_TALK => true,
4452 NS_TEMPLATE => true,
4453 NS_TEMPLATE_TALK => true,
4454 NS_HELP => true,
4455 NS_HELP_TALK => true,
4456 NS_CATEGORY_TALK => true
4460 * Array holding default tracking category names.
4462 * Array contains the system messages for each tracking category.
4463 * Tracking categories allow pages with certain characteristics to be tracked.
4464 * It works by adding any such page to a category automatically.
4466 * A message with the suffix '-desc' should be added as a description message
4467 * to have extra information on Special:TrackingCategories.
4469 * @deprecated since 1.25 Extensions should now register tracking categories using
4470 * the new extension registration system.
4472 * @since 1.23
4474 $wgTrackingCategories = [];
4477 * Array of namespaces which can be deemed to contain valid "content", as far
4478 * as the site statistics are concerned. Useful if additional namespaces also
4479 * contain "content" which should be considered when generating a count of the
4480 * number of articles in the wiki.
4482 $wgContentNamespaces = [ NS_MAIN ];
4485 * Optional array of namespaces which should be blacklisted from Special:ShortPages
4486 * Only pages inside $wgContentNamespaces but not $wgShortPagesNamespaceBlacklist will
4487 * be shown on that page.
4488 * @since 1.30
4490 $wgShortPagesNamespaceBlacklist = [];
4493 * Array of namespaces, in addition to the talk namespaces, where signatures
4494 * (~~~~) are likely to be used. This determines whether to display the
4495 * Signature button on the edit toolbar, and may also be used by extensions.
4496 * For example, "traditional" style wikis, where content and discussion are
4497 * intermixed, could place NS_MAIN and NS_PROJECT namespaces in this array.
4499 $wgExtraSignatureNamespaces = [];
4502 * Max number of redirects to follow when resolving redirects.
4503 * 1 means only the first redirect is followed (default behavior).
4504 * 0 or less means no redirects are followed.
4506 $wgMaxRedirects = 1;
4509 * Array of invalid page redirect targets.
4510 * Attempting to create a redirect to any of the pages in this array
4511 * will make the redirect fail.
4512 * Userlogout is hard-coded, so it does not need to be listed here.
4513 * (T12569) Disallow Mypage and Mytalk as well.
4515 * As of now, this only checks special pages. Redirects to pages in
4516 * other namespaces cannot be invalidated by this variable.
4518 $wgInvalidRedirectTargets = [ 'Filepath', 'Mypage', 'Mytalk', 'Redirect' ];
4520 /** @} */ # End of title and interwiki settings }
4522 /************************************************************************//**
4523 * @name Parser settings
4524 * These settings configure the transformation from wikitext to HTML.
4525 * @{
4529 * Parser configuration. Associative array with the following members:
4531 * class The class name
4533 * The entire associative array will be passed through to the constructor as
4534 * the first parameter. Note that only Setup.php can use this variable --
4535 * the configuration will change at runtime via Parser member functions, so
4536 * the contents of this variable will be out-of-date. The variable can only be
4537 * changed during LocalSettings.php, in particular, it can't be changed during
4538 * an extension setup function.
4539 * @deprecated since 1.35. This has been effectively a constant for a long
4540 * time. Configuring the ParserFactory service is the modern way to tweak
4541 * the default parser.
4543 $wgParserConf = [
4544 'class' => Parser::class,
4548 * Maximum indent level of toc.
4550 $wgMaxTocLevel = 999;
4553 * A complexity limit on template expansion: the maximum number of nodes visited
4554 * by PPFrame::expand()
4556 $wgMaxPPNodeCount = 1000000;
4559 * Maximum recursion depth for templates within templates.
4560 * The current parser adds two levels to the PHP call stack for each template,
4561 * and xdebug limits the call stack to 100 by default. So this should hopefully
4562 * stop the parser before it hits the xdebug limit.
4564 $wgMaxTemplateDepth = 40;
4567 * @see $wgMaxTemplateDepth
4569 $wgMaxPPExpandDepth = 40;
4572 * URL schemes that should be recognized as valid by wfParseUrl().
4574 * WARNING: Do not add 'file:' to this or internal file links will be broken.
4575 * Instead, if you want to support file links, add 'file://'. The same applies
4576 * to any other protocols with the same name as a namespace. See task T46011 for
4577 * more information.
4579 * @see wfParseUrl
4581 $wgUrlProtocols = [
4582 'bitcoin:', 'ftp://', 'ftps://', 'geo:', 'git://', 'gopher://', 'http://',
4583 'https://', 'irc://', 'ircs://', 'magnet:', 'mailto:', 'mms://', 'news:',
4584 'nntp://', 'redis://', 'sftp://', 'sip:', 'sips:', 'sms:', 'ssh://',
4585 'svn://', 'tel:', 'telnet://', 'urn:', 'worldwind://', 'xmpp:', '//'
4589 * If true, removes (by substituting) templates in signatures.
4591 $wgCleanSignatures = true;
4594 * Whether to allow inline image pointing to other websites
4596 $wgAllowExternalImages = false;
4599 * If the above is false, you can specify an exception here. Image URLs
4600 * that start with this string are then rendered, while all others are not.
4601 * You can use this to set up a trusted, simple repository of images.
4602 * You may also specify an array of strings to allow multiple sites
4604 * @par Examples:
4605 * @code
4606 * $wgAllowExternalImagesFrom = 'http://127.0.0.1/';
4607 * $wgAllowExternalImagesFrom = [ 'http://127.0.0.1/', 'http://example.com' ];
4608 * @endcode
4610 $wgAllowExternalImagesFrom = '';
4613 * If $wgAllowExternalImages is false, you can allow an on-wiki
4614 * allow list of regular expression fragments to match the image URL
4615 * against. If the image matches one of the regular expression fragments,
4616 * the image will be displayed.
4618 * Set this to true to enable the on-wiki allow list (MediaWiki:External image whitelist)
4619 * Or false to disable it
4621 * @since 1.14
4623 $wgEnableImageWhitelist = false;
4626 * A different approach to the above: simply allow the "<img>" tag to be used.
4627 * This allows you to specify alt text and other attributes, copy-paste HTML to
4628 * your wiki more easily, etc. However, allowing external images in any manner
4629 * will allow anyone with editing rights to snoop on your visitors' IP
4630 * addresses and so forth, if they wanted to, by inserting links to images on
4631 * sites they control.
4632 * @deprecated since 1.35; register an extension tag named <img> instead.
4634 $wgAllowImageTag = false;
4637 * Configuration for HTML postprocessing tool. Set this to a configuration
4638 * array to enable an external tool. By default, we now use the RemexHtml
4639 * library; historically, other postprocessors were used.
4641 * Setting this to null will use default settings.
4643 * Keys include:
4644 * - treeMutationTrace: a boolean to turn on Remex tracing
4645 * - serializerTrace: a boolean to turn on Remex tracing
4646 * - mungerTrace: a boolean to turn on Remex tracing
4647 * - pwrap: whether <p> wrapping should be done (default true)
4649 * See includes/tidy/RemexDriver.php for detail on configuration.
4651 * Overriding the default configuration is strongly discouraged in
4652 * production.
4654 $wgTidyConfig = [];
4657 * Allow raw, unchecked HTML in "<html>...</html>" sections.
4658 * THIS IS VERY DANGEROUS on a publicly editable site, so USE $wgGroupPermissions
4659 * TO RESTRICT EDITING to only those that you trust
4661 $wgRawHtml = false;
4664 * Set a default target for external links, e.g. _blank to pop up a new window.
4666 * This will also set the "noreferrer" and "noopener" link rel to prevent the
4667 * attack described at https://mathiasbynens.github.io/rel-noopener/ .
4668 * Some older browsers may not support these link attributes, hence
4669 * setting $wgExternalLinkTarget to _blank may represent a security risk
4670 * to some of your users.
4672 $wgExternalLinkTarget = false;
4675 * If true, external URL links in wiki text will be given the
4676 * rel="nofollow" attribute as a hint to search engines that
4677 * they should not be followed for ranking purposes as they
4678 * are user-supplied and thus subject to spamming.
4680 $wgNoFollowLinks = true;
4683 * Namespaces in which $wgNoFollowLinks doesn't apply.
4684 * See Language.php for a list of namespaces.
4686 $wgNoFollowNsExceptions = [];
4689 * If this is set to an array of domains, external links to these domain names
4690 * (or any subdomains) will not be set to rel="nofollow" regardless of the
4691 * value of $wgNoFollowLinks. For instance:
4693 * $wgNoFollowDomainExceptions = [ 'en.wikipedia.org', 'wiktionary.org', 'mediawiki.org' ];
4695 * This would add rel="nofollow" to links to de.wikipedia.org, but not
4696 * en.wikipedia.org, wiktionary.org, en.wiktionary.org, us.en.wikipedia.org,
4697 * etc.
4699 * Defaults to mediawiki.org for the links included in the software by default.
4701 $wgNoFollowDomainExceptions = [ 'mediawiki.org' ];
4704 * Allow DISPLAYTITLE to change title display
4706 $wgAllowDisplayTitle = true;
4709 * For consistency, restrict DISPLAYTITLE to text that normalizes to the same
4710 * canonical DB key. Also disallow some inline CSS rules like display: none;
4711 * which can cause the text to be hidden or unselectable.
4713 $wgRestrictDisplayTitle = true;
4716 * Maximum number of calls per parse to expensive parser functions such as
4717 * PAGESINCATEGORY.
4719 $wgExpensiveParserFunctionLimit = 100;
4722 * Preprocessor caching threshold
4723 * Setting it to 'false' will disable the preprocessor cache.
4725 $wgPreprocessorCacheThreshold = 1000;
4728 * Enable interwiki transcluding. Only when iw_trans=1 in the interwiki table.
4730 $wgEnableScaryTranscluding = false;
4733 * Expiry time for transcluded templates cached in object cache.
4734 * Only used $wgEnableInterwikiTranscluding is set to true.
4736 $wgTranscludeCacheExpiry = 3600;
4739 * Enable the magic links feature of automatically turning ISBN xxx,
4740 * PMID xxx, RFC xxx into links
4742 * @since 1.28
4744 $wgEnableMagicLinks = [
4745 'ISBN' => false,
4746 'PMID' => false,
4747 'RFC' => false
4750 /** @} */ # end of parser settings }
4752 /************************************************************************//**
4753 * @name Statistics
4754 * @{
4758 * Method used to determine if a page in a content namespace should be counted
4759 * as a valid article.
4761 * Redirect pages will never be counted as valid articles.
4763 * This variable can have the following values:
4764 * - 'any': all pages as considered as valid articles
4765 * - 'link': the page must contain a [[wiki link]] to be considered valid
4767 * See also See https://www.mediawiki.org/wiki/Manual:Article_count
4769 * Retroactively changing this variable will not affect the existing count,
4770 * to update it, you will need to run the maintenance/updateArticleCount.php
4771 * script.
4773 $wgArticleCountMethod = 'link';
4776 * How many days user must be idle before he is considered inactive. Will affect
4777 * the number shown on Special:Statistics, Special:ActiveUsers, and the
4778 * {{NUMBEROFACTIVEUSERS}} magic word in wikitext.
4779 * You might want to leave this as the default value, to provide comparable
4780 * numbers between different wikis.
4782 $wgActiveUserDays = 30;
4784 /** @} */ # End of statistics }
4786 /************************************************************************//**
4787 * @name User accounts, authentication
4788 * @{
4792 * Central ID lookup providers
4793 * Key is the provider ID, value is a specification for ObjectFactory
4794 * @since 1.27
4796 $wgCentralIdLookupProviders = [
4797 'local' => [ 'class' => LocalIdLookup::class ],
4801 * Central ID lookup provider to use by default
4802 * @var string
4804 $wgCentralIdLookupProvider = 'local';
4807 * Password policy for the wiki.
4808 * Structured as
4810 * 'policies' => [ <group> => [ <policy> => <settings>, ... ], ... ],
4811 * 'checks' => [ <policy> => <callback>, ... ],
4813 * where <group> is a user group, <policy> is a password policy name
4814 * (arbitrary string) defined in the 'checks' part, <callback> is the
4815 * PHP callable implementing the policy check, <settings> is an array
4816 * of options with the following keys:
4817 * - value: (number, boolean or null) the value to pass to the callback
4818 * - forceChange: (bool, default false) if the password is invalid, do
4819 * not let the user log in without changing the password
4820 * - suggestChangeOnLogin: (bool, default false) if true and the password is
4821 * invalid, suggest a password change if logging in. If all the failing policies
4822 * that apply to the user have this set to false, the password change
4823 * screen will not be shown. 'forceChange' takes precedence over
4824 * 'suggestChangeOnLogin' if they are both present.
4825 * As a shorthand for [ 'value' => <value> ], simply <value> can be written.
4826 * When multiple password policies are defined for a user, the settings
4827 * arrays are merged, and for fields which are set in both arrays, the
4828 * larger value (as understood by PHP's 'max' method) is taken.
4830 * A user's effective policy is the superset of all policy statements
4831 * from the policies for the groups where the user is a member. If more
4832 * than one group policy include the same policy statement, the value is
4833 * the max() of the values. Note true > false. The 'default' policy group
4834 * is required, and serves as the minimum policy for all users.
4836 * Callbacks receive three arguments: the policy value, the User object
4837 * and the password; and must return a StatusValue. A non-good status
4838 * means the password will not be accepted for new accounts, and existing
4839 * accounts will be prompted for password change or barred from logging in
4840 * (depending on whether the status is a fatal or merely error/warning).
4842 * The checks supported by core are:
4843 * - MinimalPasswordLength - Minimum length a user can set.
4844 * - MinimumPasswordLengthToLogin - Passwords shorter than this will
4845 * not be allowed to login, or offered a chance to reset their password
4846 * as part of the login workflow, regardless if it is correct.
4847 * - MaximalPasswordLength - maximum length password a user is allowed
4848 * to attempt. Prevents DoS attacks with pbkdf2.
4849 * - PasswordCannotMatchUsername - Password cannot match the username.
4850 * - PasswordCannotBeSubstringInUsername - Password cannot be a substring
4851 * (contained within) the username.
4852 * - PasswordCannotMatchBlacklist - Username/password combination cannot
4853 * match a list of default passwords used by MediaWiki in the past.
4854 * Deprecated since 1.35, use PasswordCannotMatchDefaults instead.
4855 * - PasswordCannotMatchDefaults - Username/password combination cannot
4856 * match a list of default passwords used by MediaWiki in the past.
4857 * - PasswordNotInLargeBlacklist - Password not in best practices list of
4858 * 100,000 commonly used passwords. Due to the size of the list this
4859 * is a probabilistic test.
4860 * Deprecated since 1.35, use PasswordNotInCommonList instead.
4861 * - PasswordNotInCommonList - Password not in best practices list of
4862 * 100,000 commonly used passwords. Due to the size of the list this
4863 * is a probabilistic test.
4865 * If you add custom checks, for Special:PasswordPolicies to display them correctly,
4866 * every check should have a corresponding passwordpolicies-policy-<check> message,
4867 * and every settings field other than 'value' should have a corresponding
4868 * passwordpolicies-policyflag-<flag> message (<check> and <flag> are in lowercase).
4869 * The check message receives the policy value as a parameter, the flag message
4870 * receives the flag value (or values if it's an array).
4872 * @since 1.26
4873 * @see PasswordPolicyChecks
4874 * @see User::checkPasswordValidity()
4876 $wgPasswordPolicy = [
4877 'policies' => [
4878 'bureaucrat' => [
4879 'MinimalPasswordLength' => 10,
4880 'MinimumPasswordLengthToLogin' => 1,
4882 'sysop' => [
4883 'MinimalPasswordLength' => 10,
4884 'MinimumPasswordLengthToLogin' => 1,
4886 'interface-admin' => [
4887 'MinimalPasswordLength' => 10,
4888 'MinimumPasswordLengthToLogin' => 1,
4890 'bot' => [
4891 'MinimalPasswordLength' => 10,
4892 'MinimumPasswordLengthToLogin' => 1,
4894 'default' => [
4895 'MinimalPasswordLength' => [ 'value' => 1, 'suggestChangeOnLogin' => true ],
4896 'PasswordCannotMatchUsername' => [ 'value' => true, 'suggestChangeOnLogin' => true ],
4897 'PasswordCannotBeSubstringInUsername' => [
4898 'value' => true,
4899 'suggestChangeOnLogin' => true
4901 'PasswordCannotMatchDefaults' => [ 'value' => true, 'suggestChangeOnLogin' => true ],
4902 'MaximalPasswordLength' => [ 'value' => 4096, 'suggestChangeOnLogin' => true ],
4903 'PasswordNotInCommonList' => [ 'value' => true, 'suggestChangeOnLogin' => true ],
4906 'checks' => [
4907 'MinimalPasswordLength' => 'PasswordPolicyChecks::checkMinimalPasswordLength',
4908 'MinimumPasswordLengthToLogin' => 'PasswordPolicyChecks::checkMinimumPasswordLengthToLogin',
4909 'PasswordCannotMatchUsername' => 'PasswordPolicyChecks::checkPasswordCannotMatchUsername',
4910 'PasswordCannotBeSubstringInUsername' =>
4911 'PasswordPolicyChecks::checkPasswordCannotBeSubstringInUsername',
4912 'PasswordCannotMatchBlacklist' => 'PasswordPolicyChecks::checkPasswordCannotMatchDefaults',
4913 'PasswordCannotMatchDefaults' => 'PasswordPolicyChecks::checkPasswordCannotMatchDefaults',
4914 'MaximalPasswordLength' => 'PasswordPolicyChecks::checkMaximalPasswordLength',
4915 'PasswordNotInLargeBlacklist' => 'PasswordPolicyChecks::checkPasswordNotInCommonList',
4916 'PasswordNotInCommonList' => 'PasswordPolicyChecks::checkPasswordNotInCommonList',
4921 * Configure AuthManager
4923 * All providers are constructed using ObjectFactory, see that for the general
4924 * structure. The array may also contain a key "sort" used to order providers:
4925 * providers are stably sorted by this value, which should be an integer
4926 * (default is 0).
4928 * Elements are:
4929 * - preauth: Array (keys ignored) of specifications for PreAuthenticationProviders
4930 * - primaryauth: Array (keys ignored) of specifications for PrimaryAuthenticationProviders
4931 * - secondaryauth: Array (keys ignored) of specifications for SecondaryAuthenticationProviders
4933 * @since 1.27
4934 * @note If this is null or empty, the value from $wgAuthManagerAutoConfig is
4935 * used instead. Local customization should generally set this variable from
4936 * scratch to the desired configuration. Extensions that want to
4937 * auto-configure themselves should use $wgAuthManagerAutoConfig instead.
4939 $wgAuthManagerConfig = null;
4942 * @see $wgAuthManagerConfig
4943 * @since 1.27
4945 $wgAuthManagerAutoConfig = [
4946 'preauth' => [
4947 MediaWiki\Auth\ThrottlePreAuthenticationProvider::class => [
4948 'class' => MediaWiki\Auth\ThrottlePreAuthenticationProvider::class,
4949 'sort' => 0,
4952 'primaryauth' => [
4953 // TemporaryPasswordPrimaryAuthenticationProvider should come before
4954 // any other PasswordAuthenticationRequest-based
4955 // PrimaryAuthenticationProvider (or at least any that might return
4956 // FAIL rather than ABSTAIN for a wrong password), or password reset
4957 // won't work right. Do not remove this (or change the key) or
4958 // auto-configuration of other such providers in extensions will
4959 // probably auto-insert themselves in the wrong place.
4960 MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider::class => [
4961 'class' => MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider::class,
4962 'args' => [ [
4963 // Fall through to LocalPasswordPrimaryAuthenticationProvider
4964 'authoritative' => false,
4965 ] ],
4966 'sort' => 0,
4968 MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider::class => [
4969 'class' => MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider::class,
4970 'args' => [ [
4971 // Last one should be authoritative, or else the user will get
4972 // a less-than-helpful error message (something like "supplied
4973 // authentication info not supported" rather than "wrong
4974 // password") if it too fails.
4975 'authoritative' => true,
4976 ] ],
4977 'sort' => 100,
4980 'secondaryauth' => [
4981 MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProvider::class => [
4982 'class' => MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProvider::class,
4983 'sort' => 0,
4985 MediaWiki\Auth\ResetPasswordSecondaryAuthenticationProvider::class => [
4986 'class' => MediaWiki\Auth\ResetPasswordSecondaryAuthenticationProvider::class,
4987 'sort' => 100,
4989 // Linking during login is experimental, enable at your own risk - T134952
4990 // MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProvider::class => [
4991 // 'class' => MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProvider::class,
4992 // 'sort' => 100,
4993 // ],
4994 MediaWiki\Auth\EmailNotificationSecondaryAuthenticationProvider::class => [
4995 'class' => MediaWiki\Auth\EmailNotificationSecondaryAuthenticationProvider::class,
4996 'sort' => 200,
5002 * Time frame for re-authentication.
5004 * With only password-based authentication, you'd just ask the user to re-enter
5005 * their password to verify certain operations like changing the password or
5006 * changing the account's email address. But under AuthManager, the user might
5007 * not have a password (you might even have to redirect the browser to a
5008 * third-party service or something complex like that), you might want to have
5009 * both factors of a two-factor authentication, and so on. So, the options are:
5010 * - Incorporate the whole multi-step authentication flow within everything
5011 * that needs to do this.
5012 * - Consider it good if they used Special:UserLogin during this session within
5013 * the last X seconds.
5014 * - Come up with a third option.
5016 * MediaWiki currently takes the second option. This setting configures the
5017 * "X seconds".
5019 * This allows for configuring different time frames for different
5020 * "operations". The operations used in MediaWiki core include:
5021 * - LinkAccounts
5022 * - UnlinkAccount
5023 * - ChangeCredentials
5024 * - RemoveCredentials
5025 * - ChangeEmail
5027 * Additional operations may be used by extensions, either explicitly by
5028 * calling AuthManager::securitySensitiveOperationStatus(),
5029 * ApiAuthManagerHelper::securitySensitiveOperation() or
5030 * SpecialPage::checkLoginSecurityLevel(), or implicitly by overriding
5031 * SpecialPage::getLoginSecurityLevel() or by subclassing
5032 * AuthManagerSpecialPage.
5034 * The key 'default' is used if a requested operation isn't defined in the array.
5036 * @since 1.27
5037 * @var int[] operation => time in seconds. A 'default' key must always be provided.
5039 $wgReauthenticateTime = [
5040 'default' => 300,
5044 * Whether to allow security-sensitive operations when re-authentication is not possible.
5046 * If AuthManager::canAuthenticateNow() is false (e.g. the current
5047 * SessionProvider is not able to change users, such as when OAuth is in use),
5048 * AuthManager::securitySensitiveOperationStatus() cannot sensibly return
5049 * SEC_REAUTH. Setting an operation true here will have it return SEC_OK in
5050 * that case, while setting it false will have it return SEC_FAIL.
5052 * The key 'default' is used if a requested operation isn't defined in the array.
5054 * @since 1.27
5055 * @see $wgReauthenticateTime
5056 * @var bool[] operation => boolean. A 'default' key must always be provided.
5058 $wgAllowSecuritySensitiveOperationIfCannotReauthenticate = [
5059 'default' => true,
5063 * List of AuthenticationRequest class names which are not changeable through
5064 * Special:ChangeCredentials and the changeauthenticationdata API.
5065 * This is only enforced on the client level; AuthManager itself (e.g.
5066 * AuthManager::allowsAuthenticationDataChange calls) is not affected.
5067 * Class names are checked for exact match (not for subclasses).
5068 * @since 1.27
5069 * @var string[]
5071 $wgChangeCredentialsBlacklist = [
5072 \MediaWiki\Auth\TemporaryPasswordAuthenticationRequest::class
5076 * List of AuthenticationRequest class names which are not removable through
5077 * Special:RemoveCredentials and the removeauthenticationdata API.
5078 * This is only enforced on the client level; AuthManager itself (e.g.
5079 * AuthManager::allowsAuthenticationDataChange calls) is not affected.
5080 * Class names are checked for exact match (not for subclasses).
5081 * @since 1.27
5082 * @var string[]
5084 $wgRemoveCredentialsBlacklist = [
5085 \MediaWiki\Auth\PasswordAuthenticationRequest::class,
5089 * Specifies the minimal length of a user password. If set to 0, empty pass-
5090 * words are allowed.
5091 * @deprecated since 1.26, use $wgPasswordPolicy's MinimalPasswordLength.
5093 $wgMinimalPasswordLength = false;
5096 * Specifies the maximal length of a user password (T64685).
5098 * It is not recommended to make this greater than the default, as it can
5099 * allow DoS attacks by users setting really long passwords. In addition,
5100 * this should not be lowered too much, as it enforces weak passwords.
5102 * @warning Unlike other password settings, user with passwords greater than
5103 * the maximum will not be able to log in.
5104 * @deprecated since 1.26, use $wgPasswordPolicy's MaximalPasswordLength.
5106 $wgMaximalPasswordLength = false;
5109 * Specifies if users should be sent to a password-reset form on login, if their
5110 * password doesn't meet the requirements of User::isValidPassword().
5111 * @since 1.23
5113 $wgInvalidPasswordReset = true;
5116 * Default password type to use when hashing user passwords.
5118 * Must be set to a type defined in $wgPasswordConfig, or a type that
5119 * is registered by default in PasswordFactory.php.
5121 * @since 1.24
5123 $wgPasswordDefault = 'pbkdf2';
5126 * Configuration for built-in password types. Maps the password type
5127 * to an array of options. The 'class' option is the Password class to
5128 * use. All other options are class-dependent.
5130 * An advanced example:
5131 * @code
5132 * $wgPasswordConfig['bcrypt-peppered'] = [
5133 * 'class' => EncryptedPassword::class,
5134 * 'underlying' => 'bcrypt',
5135 * 'secrets' => [
5136 * hash( 'sha256', 'secret', true ),
5137 * ],
5138 * 'cipher' => 'aes-256-cbc',
5139 * ];
5140 * @endcode
5142 * @since 1.24
5144 $wgPasswordConfig = [
5145 'A' => [
5146 'class' => MWOldPassword::class,
5148 'B' => [
5149 'class' => MWSaltedPassword::class,
5151 'pbkdf2-legacyA' => [
5152 'class' => LayeredParameterizedPassword::class,
5153 'types' => [
5154 'A',
5155 'pbkdf2',
5158 'pbkdf2-legacyB' => [
5159 'class' => LayeredParameterizedPassword::class,
5160 'types' => [
5161 'B',
5162 'pbkdf2',
5165 'bcrypt' => [
5166 'class' => BcryptPassword::class,
5167 'cost' => 9,
5169 'pbkdf2' => [
5170 'class' => Pbkdf2Password::class,
5171 'algo' => 'sha512',
5172 'cost' => '30000',
5173 'length' => '64',
5175 'argon2' => [
5176 'class' => Argon2Password::class,
5178 // Algorithm used:
5179 // * 'argon2i' is optimized against side-channel attacks (PHP 7.2+)
5180 // * 'argon2id' is optimized against both side-channel and GPU cracking (PHP 7.3+)
5181 // * 'auto' to use best available algorithm. If you're using more than one server, be
5182 // careful when you're mixing PHP versions because newer PHP might generate hashes that
5183 // older versions might would not understand.
5184 'algo' => 'auto',
5186 // The parameters below are the same as options accepted by password_hash().
5187 // Set them to override that function's defaults.
5189 // 'memory_cost' => PASSWORD_ARGON2_DEFAULT_MEMORY_COST,
5190 // 'time_cost' => PASSWORD_ARGON2_DEFAULT_TIME_COST,
5191 // 'threads' => PASSWORD_ARGON2_DEFAULT_THREADS,
5196 * Whether to allow password resets ("enter some identifying data, and we'll send an email
5197 * with a temporary password you can use to get back into the account") identified by
5198 * various bits of data. Setting all of these to false (or the whole variable to false)
5199 * has the effect of disabling password resets entirely
5201 $wgPasswordResetRoutes = [
5202 'username' => true,
5203 'email' => true,
5207 * Maximum number of Unicode characters in signature
5209 $wgMaxSigChars = 255;
5212 * Behavior of signature validation. Allowed values are:
5213 * - 'warning' - invalid signatures cause a warning to be displayed on the preferences page, but
5214 * they are still used when signing comments; new invalid signatures can still be saved as normal
5215 * - 'new' - existing invalid signatures behave as above; new invalid signatures can't be saved
5216 * - 'disallow' - existing invalid signatures are no longer used when signing comments; new invalid
5217 * signatures can't be saved
5219 * @since 1.35
5221 $wgSignatureValidation = 'warning';
5224 * List of lint error codes which don't cause signature validation to fail.
5226 * @see https://www.mediawiki.org/wiki/Help:Lint_errors
5227 * @since 1.35
5229 $wgSignatureAllowedLintErrors = [ 'obsolete-tag' ];
5232 * Maximum number of bytes in username. You want to run the maintenance
5233 * script ./maintenance/checkUsernames.php once you have changed this value.
5235 $wgMaxNameChars = 255;
5238 * Array of usernames which may not be registered or logged in from
5239 * Maintenance scripts can still use these
5241 $wgReservedUsernames = [
5242 'MediaWiki default', // Default 'Main Page' and MediaWiki: message pages
5243 'Conversion script', // Used for the old Wikipedia software upgrade
5244 'Maintenance script', // Maintenance scripts which perform editing, image import script
5245 'Template namespace initialisation script', // Used in 1.2->1.3 upgrade
5246 'ScriptImporter', // Default user name used by maintenance/importSiteScripts.php
5247 'Unknown user', // Used in WikiImporter and RevisionStore for revisions with no author
5248 'msg:double-redirect-fixer', // Automatic double redirect fix
5249 'msg:usermessage-editor', // Default user for leaving user messages
5250 'msg:proxyblocker', // For $wgProxyList and Special:Blockme (removed in 1.22)
5251 'msg:sorbs', // For $wgEnableDnsBlacklist etc.
5252 'msg:spambot_username', // Used by cleanupSpam.php
5253 'msg:autochange-username', // Used by anon category RC entries (parser functions, Lua & purges)
5257 * Settings added to this array will override the default globals for the user
5258 * preferences used by anonymous visitors and newly created accounts.
5259 * For instance, to disable editing on double clicks:
5260 * $wgDefaultUserOptions ['editondblclick'] = 0;
5262 $wgDefaultUserOptions = [
5263 'ccmeonemails' => 0,
5264 'date' => 'default',
5265 'diffonly' => 0,
5266 'disablemail' => 0,
5267 'editfont' => 'monospace',
5268 'editondblclick' => 0,
5269 'editsectiononrightclick' => 0,
5270 'email-allow-new-users' => 1,
5271 'enotifminoredits' => 0,
5272 'enotifrevealaddr' => 0,
5273 'enotifusertalkpages' => 1,
5274 'enotifwatchlistpages' => 1,
5275 'extendwatchlist' => 1,
5276 'fancysig' => 0,
5277 'forceeditsummary' => 0,
5278 'gender' => 'unknown',
5279 'hideminor' => 0,
5280 'hidepatrolled' => 0,
5281 'hidecategorization' => 1,
5282 'imagesize' => 2,
5283 'minordefault' => 0,
5284 'newpageshidepatrolled' => 0,
5285 'nickname' => '',
5286 'pst-cssjs' => 1,
5287 'norollbackdiff' => 0,
5288 'numberheadings' => 0,
5289 'previewonfirst' => 0,
5290 'previewontop' => 1,
5291 'rcdays' => 7,
5292 'rcenhancedfilters-disable' => 0,
5293 'rclimit' => 50,
5294 'search-match-redirect' => true,
5295 'showhiddencats' => 0,
5296 'shownumberswatching' => 1,
5297 'showrollbackconfirmation' => 0,
5298 'skin' => false,
5299 'stubthreshold' => 0,
5300 'thumbsize' => 5,
5301 'underline' => 2,
5302 'uselivepreview' => 0,
5303 'usenewrc' => 1,
5304 'watchcreations' => 1,
5305 'watchdefault' => 1,
5306 'watchdeletion' => 0,
5307 'watchuploads' => 1,
5308 'watchlistdays' => 7.0,
5309 'watchlisthideanons' => 0,
5310 'watchlisthidebots' => 0,
5311 'watchlisthideliu' => 0,
5312 'watchlisthideminor' => 0,
5313 'watchlisthideown' => 0,
5314 'watchlisthidepatrolled' => 0,
5315 'watchlisthidecategorization' => 1,
5316 'watchlistreloadautomatically' => 0,
5317 'watchlistunwatchlinks' => 0,
5318 'watchmoves' => 0,
5319 'watchrollback' => 0,
5320 'wlenhancedfilters-disable' => 0,
5321 'wllimit' => 250,
5322 'useeditwarning' => 1,
5323 'prefershttps' => 1,
5324 'requireemail' => 0,
5328 * An array of preferences to not show for the user
5330 $wgHiddenPrefs = [];
5333 * Characters to prevent during new account creations.
5334 * This is used in a regular expression character class during
5335 * registration (regex metacharacters like / are escaped).
5337 $wgInvalidUsernameCharacters = '@:';
5340 * Character used as a delimiter when testing for interwiki userrights
5341 * (In Special:UserRights, it is possible to modify users on different
5342 * databases if the delimiter is used, e.g. "Someuser@enwiki").
5344 * It is recommended that you have this delimiter in
5345 * $wgInvalidUsernameCharacters above, or you will not be able to
5346 * modify the user rights of those users via Special:UserRights
5348 $wgUserrightsInterwikiDelimiter = '@';
5351 * This is to let user authenticate using https when they come from http.
5352 * Based on an idea by George Herbert on wikitech-l:
5353 * https://lists.wikimedia.org/pipermail/wikitech-l/2010-October/050039.html
5354 * @since 1.17
5356 $wgSecureLogin = false;
5359 * Versioning for authentication tokens.
5361 * If non-null, this is combined with the user's secret (the user_token field
5362 * in the DB) to generate the token cookie. Changing this will invalidate all
5363 * active sessions (i.e. it will log everyone out).
5365 * @since 1.27
5366 * @var string|null
5368 $wgAuthenticationTokenVersion = null;
5371 * MediaWiki\Session\SessionProvider configuration.
5373 * Value is an array of ObjectFactory specifications for the SessionProviders
5374 * to be used. Keys in the array are ignored. Order is not significant.
5376 * @since 1.27
5378 $wgSessionProviders = [
5379 MediaWiki\Session\CookieSessionProvider::class => [
5380 'class' => MediaWiki\Session\CookieSessionProvider::class,
5381 'args' => [ [
5382 'priority' => 30,
5383 'callUserSetCookiesHook' => true,
5384 ] ],
5386 MediaWiki\Session\BotPasswordSessionProvider::class => [
5387 'class' => MediaWiki\Session\BotPasswordSessionProvider::class,
5388 'args' => [ [
5389 'priority' => 75,
5390 ] ],
5395 * Temporary feature flag that controls whether users will see a checkbox allowing them to
5396 * require providing email during password resets.
5398 * @deprecated This feature is under development, don't assume this flag's existence or function
5399 * outside of MediaWiki.
5401 $wgAllowRequiringEmailForResets = false;
5403 /** @} */ # end user accounts }
5405 /************************************************************************//**
5406 * @name User rights, access control and monitoring
5407 * @{
5411 * Number of seconds before autoblock entries expire. Default 86400 = 1 day.
5413 $wgAutoblockExpiry = 86400;
5416 * Set this to true to allow blocked users to edit their own user talk page.
5418 * This only applies to sitewide blocks. Partial blocks always allow users to
5419 * edit their own user talk page unless otherwise specified in the block
5420 * restrictions.
5422 $wgBlockAllowsUTEdit = true;
5425 * Limits on the possible sizes of range blocks.
5427 * CIDR notation is hard to understand, it's easy to mistakenly assume that a
5428 * /1 is a small range and a /31 is a large range. For IPv4, setting a limit of
5429 * half the number of bits avoids such errors, and allows entire ISPs to be
5430 * blocked using a small number of range blocks.
5432 * For IPv6, RFC 3177 recommends that a /48 be allocated to every residential
5433 * customer, so range blocks larger than /64 (half the number of bits) will
5434 * plainly be required. RFC 4692 implies that a very large ISP may be
5435 * allocated a /19 if a generous HD-Ratio of 0.8 is used, so we will use that
5436 * as our limit. As of 2012, blocking the whole world would require a /4 range.
5438 $wgBlockCIDRLimit = [
5439 'IPv4' => 16, # Blocks larger than a /16 (64k addresses) will not be allowed
5440 'IPv6' => 19,
5444 * If true, blocked users will not be allowed to login. When using this with
5445 * a public wiki, the effect of logging out blocked users may actually be
5446 * avers: unless the user's address is also blocked (e.g. auto-block),
5447 * logging the user out will again allow reading and editing, just as for
5448 * anonymous visitors.
5450 $wgBlockDisablesLogin = false;
5453 * Pages anonymous user may see, set as an array of pages titles.
5455 * @par Example:
5456 * @code
5457 * $wgWhitelistRead = array ( "Main Page", "Wikipedia:Help");
5458 * @endcode
5460 * Special:Userlogin and Special:ChangePassword are always allowed.
5462 * @note This will only work if $wgGroupPermissions['*']['read'] is false --
5463 * see below. Otherwise, ALL pages are accessible, regardless of this setting.
5465 * @note Also that this will only protect _pages in the wiki_. Uploaded files
5466 * will remain readable. You can use img_auth.php to protect uploaded files,
5467 * see https://www.mediawiki.org/wiki/Manual:Image_Authorization
5469 * @note Extensions should not modify this, but use the TitleReadWhitelist
5470 * hook instead.
5472 $wgWhitelistRead = false;
5475 * Pages anonymous user may see, set as an array of regular expressions.
5477 * This function will match the regexp against the title name, which
5478 * is without underscore.
5480 * @par Example:
5481 * To whitelist [[Main Page]]:
5482 * @code
5483 * $wgWhitelistReadRegexp = [ "/Main Page/" ];
5484 * @endcode
5486 * @note Unless ^ and/or $ is specified, a regular expression might match
5487 * pages not intended to be allowed. The above example will also
5488 * allow a page named 'Security Main Page'.
5490 * @par Example:
5491 * To allow reading any page starting with 'User' regardless of the case:
5492 * @code
5493 * $wgWhitelistReadRegexp = [ "@^UsEr.*@i" ];
5494 * @endcode
5495 * Will allow both [[User is banned]] and [[User:JohnDoe]]
5497 * @note This will only work if $wgGroupPermissions['*']['read'] is false --
5498 * see below. Otherwise, ALL pages are accessible, regardless of this setting.
5500 $wgWhitelistReadRegexp = false;
5503 * Should editors be required to have a validated e-mail
5504 * address before being allowed to edit?
5506 $wgEmailConfirmToEdit = false;
5509 * Should MediaWiki attempt to protect user's privacy when doing redirects?
5510 * Keep this true if access counts to articles are made public.
5512 $wgHideIdentifiableRedirects = true;
5515 * Permission keys given to users in each group.
5517 * This is an array where the keys are all groups and each value is an
5518 * array of the format (right => boolean).
5520 * The second format is used to support per-namespace permissions.
5521 * Note that this feature does not fully work for all permission types.
5523 * All users are implicitly in the '*' group including anonymous visitors;
5524 * logged-in users are all implicitly in the 'user' group. These will be
5525 * combined with the permissions of all groups that a given user is listed
5526 * in in the user_groups table.
5528 * Note: Don't set $wgGroupPermissions = []; unless you know what you're
5529 * doing! This will wipe all permissions, and may mean that your users are
5530 * unable to perform certain essential tasks or access new functionality
5531 * when new permissions are introduced and default grants established.
5533 * Functionality to make pages inaccessible has not been extensively tested
5534 * for security. Use at your own risk!
5536 * This replaces $wgWhitelistAccount and $wgWhitelistEdit
5538 $wgGroupPermissions = [];
5540 /** @cond file_level_code */
5541 // Implicit group for all visitors
5542 $wgGroupPermissions['*']['createaccount'] = true;
5543 $wgGroupPermissions['*']['read'] = true;
5544 $wgGroupPermissions['*']['edit'] = true;
5545 $wgGroupPermissions['*']['createpage'] = true;
5546 $wgGroupPermissions['*']['createtalk'] = true;
5547 $wgGroupPermissions['*']['writeapi'] = true;
5548 $wgGroupPermissions['*']['viewmywatchlist'] = true;
5549 $wgGroupPermissions['*']['editmywatchlist'] = true;
5550 $wgGroupPermissions['*']['viewmyprivateinfo'] = true;
5551 $wgGroupPermissions['*']['editmyprivateinfo'] = true;
5552 $wgGroupPermissions['*']['editmyoptions'] = true;
5553 # $wgGroupPermissions['*']['patrolmarks'] = false; // let anons see what was patrolled
5555 // Implicit group for all logged-in accounts
5556 $wgGroupPermissions['user']['move'] = true;
5557 $wgGroupPermissions['user']['move-subpages'] = true;
5558 $wgGroupPermissions['user']['move-rootuserpages'] = true; // can move root userpages
5559 $wgGroupPermissions['user']['move-categorypages'] = true;
5560 $wgGroupPermissions['user']['movefile'] = true;
5561 $wgGroupPermissions['user']['read'] = true;
5562 $wgGroupPermissions['user']['edit'] = true;
5563 $wgGroupPermissions['user']['createpage'] = true;
5564 $wgGroupPermissions['user']['createtalk'] = true;
5565 $wgGroupPermissions['user']['writeapi'] = true;
5566 $wgGroupPermissions['user']['upload'] = true;
5567 $wgGroupPermissions['user']['reupload'] = true;
5568 $wgGroupPermissions['user']['reupload-shared'] = true;
5569 $wgGroupPermissions['user']['minoredit'] = true;
5570 $wgGroupPermissions['user']['editmyusercss'] = true;
5571 $wgGroupPermissions['user']['editmyuserjson'] = true;
5572 $wgGroupPermissions['user']['editmyuserjs'] = true;
5573 $wgGroupPermissions['user']['editmyuserjsredirect'] = true;
5574 $wgGroupPermissions['user']['purge'] = true;
5575 $wgGroupPermissions['user']['sendemail'] = true;
5576 $wgGroupPermissions['user']['applychangetags'] = true;
5577 $wgGroupPermissions['user']['changetags'] = true;
5578 $wgGroupPermissions['user']['editcontentmodel'] = true;
5580 // Implicit group for accounts that pass $wgAutoConfirmAge
5581 $wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true;
5582 $wgGroupPermissions['autoconfirmed']['editsemiprotected'] = true;
5584 // Users with bot privilege can have their edits hidden
5585 // from various log pages by default
5586 $wgGroupPermissions['bot']['bot'] = true;
5587 $wgGroupPermissions['bot']['autoconfirmed'] = true;
5588 $wgGroupPermissions['bot']['editsemiprotected'] = true;
5589 $wgGroupPermissions['bot']['nominornewtalk'] = true;
5590 $wgGroupPermissions['bot']['autopatrol'] = true;
5591 $wgGroupPermissions['bot']['suppressredirect'] = true;
5592 $wgGroupPermissions['bot']['apihighlimits'] = true;
5593 $wgGroupPermissions['bot']['writeapi'] = true;
5595 // Most extra permission abilities go to this group
5596 $wgGroupPermissions['sysop']['block'] = true;
5597 $wgGroupPermissions['sysop']['createaccount'] = true;
5598 $wgGroupPermissions['sysop']['delete'] = true;
5599 // can be separately configured for pages with > $wgDeleteRevisionsLimit revs
5600 $wgGroupPermissions['sysop']['bigdelete'] = true;
5601 // can view deleted history entries, but not see or restore the text
5602 $wgGroupPermissions['sysop']['deletedhistory'] = true;
5603 // can view deleted revision text
5604 $wgGroupPermissions['sysop']['deletedtext'] = true;
5605 $wgGroupPermissions['sysop']['undelete'] = true;
5606 $wgGroupPermissions['sysop']['editinterface'] = true;
5607 $wgGroupPermissions['sysop']['editsitejson'] = true;
5608 $wgGroupPermissions['sysop']['edituserjson'] = true;
5609 $wgGroupPermissions['sysop']['import'] = true;
5610 $wgGroupPermissions['sysop']['importupload'] = true;
5611 $wgGroupPermissions['sysop']['move'] = true;
5612 $wgGroupPermissions['sysop']['move-subpages'] = true;
5613 $wgGroupPermissions['sysop']['move-rootuserpages'] = true;
5614 $wgGroupPermissions['sysop']['move-categorypages'] = true;
5615 $wgGroupPermissions['sysop']['patrol'] = true;
5616 $wgGroupPermissions['sysop']['autopatrol'] = true;
5617 $wgGroupPermissions['sysop']['protect'] = true;
5618 $wgGroupPermissions['sysop']['editprotected'] = true;
5619 $wgGroupPermissions['sysop']['rollback'] = true;
5620 $wgGroupPermissions['sysop']['upload'] = true;
5621 $wgGroupPermissions['sysop']['reupload'] = true;
5622 $wgGroupPermissions['sysop']['reupload-shared'] = true;
5623 $wgGroupPermissions['sysop']['unwatchedpages'] = true;
5624 $wgGroupPermissions['sysop']['autoconfirmed'] = true;
5625 $wgGroupPermissions['sysop']['editsemiprotected'] = true;
5626 $wgGroupPermissions['sysop']['ipblock-exempt'] = true;
5627 $wgGroupPermissions['sysop']['blockemail'] = true;
5628 $wgGroupPermissions['sysop']['markbotedits'] = true;
5629 $wgGroupPermissions['sysop']['apihighlimits'] = true;
5630 $wgGroupPermissions['sysop']['browsearchive'] = true;
5631 $wgGroupPermissions['sysop']['noratelimit'] = true;
5632 $wgGroupPermissions['sysop']['movefile'] = true;
5633 $wgGroupPermissions['sysop']['unblockself'] = true;
5634 $wgGroupPermissions['sysop']['suppressredirect'] = true;
5635 # $wgGroupPermissions['sysop']['pagelang'] = true;
5636 # $wgGroupPermissions['sysop']['upload_by_url'] = true;
5637 $wgGroupPermissions['sysop']['mergehistory'] = true;
5638 $wgGroupPermissions['sysop']['managechangetags'] = true;
5639 $wgGroupPermissions['sysop']['deletechangetags'] = true;
5641 $wgGroupPermissions['interface-admin']['editinterface'] = true;
5642 $wgGroupPermissions['interface-admin']['editsitecss'] = true;
5643 $wgGroupPermissions['interface-admin']['editsitejson'] = true;
5644 $wgGroupPermissions['interface-admin']['editsitejs'] = true;
5645 $wgGroupPermissions['interface-admin']['editusercss'] = true;
5646 $wgGroupPermissions['interface-admin']['edituserjson'] = true;
5647 $wgGroupPermissions['interface-admin']['edituserjs'] = true;
5649 // Permission to change users' group assignments
5650 $wgGroupPermissions['bureaucrat']['userrights'] = true;
5651 $wgGroupPermissions['bureaucrat']['noratelimit'] = true;
5652 // Permission to change users' groups assignments across wikis
5653 # $wgGroupPermissions['bureaucrat']['userrights-interwiki'] = true;
5654 // Permission to export pages including linked pages regardless of $wgExportMaxLinkDepth
5655 # $wgGroupPermissions['bureaucrat']['override-export-depth'] = true;
5657 # $wgGroupPermissions['sysop']['deletelogentry'] = true;
5658 # $wgGroupPermissions['sysop']['deleterevision'] = true;
5659 // To hide usernames from users and Sysops
5660 $wgGroupPermissions['suppress']['hideuser'] = true;
5661 // To hide revisions/log items from users and Sysops
5662 $wgGroupPermissions['suppress']['suppressrevision'] = true;
5663 // To view revisions/log items hidden from users and Sysops
5664 $wgGroupPermissions['suppress']['viewsuppressed'] = true;
5665 // For private suppression log access
5666 $wgGroupPermissions['suppress']['suppressionlog'] = true;
5667 // Basic rights for revision delete
5668 $wgGroupPermissions['suppress']['deleterevision'] = true;
5669 $wgGroupPermissions['suppress']['deletelogentry'] = true;
5672 * The developer group is deprecated, but can be activated if need be
5673 * to use the 'lockdb' and 'unlockdb' special pages. Those require
5674 * that a lock file be defined and creatable/removable by the web
5675 * server.
5677 # $wgGroupPermissions['developer']['siteadmin'] = true;
5679 /** @endcond */
5682 * Permission keys revoked from users in each group.
5684 * This acts the same way as $wgGroupPermissions above, except that
5685 * if the user is in a group here, the permission will be removed from them.
5687 * Improperly setting this could mean that your users will be unable to perform
5688 * certain essential tasks, so use at your own risk!
5690 $wgRevokePermissions = [];
5693 * Implicit groups, aren't shown on Special:Listusers or somewhere else
5695 $wgImplicitGroups = [ '*', 'user', 'autoconfirmed' ];
5698 * A map of group names that the user is in, to group names that those users
5699 * are allowed to add or revoke.
5701 * Setting the list of groups to add or revoke to true is equivalent to "any
5702 * group".
5704 * @par Example:
5705 * To allow sysops to add themselves to the "bot" group:
5706 * @code
5707 * $wgGroupsAddToSelf = [ 'sysop' => [ 'bot' ] ];
5708 * @endcode
5710 * @par Example:
5711 * Implicit groups may be used for the source group, for instance:
5712 * @code
5713 * $wgGroupsRemoveFromSelf = [ '*' => true ];
5714 * @endcode
5715 * This allows users in the '*' group (i.e. any user) to remove themselves from
5716 * any group that they happen to be in.
5718 $wgGroupsAddToSelf = [];
5721 * @see $wgGroupsAddToSelf
5723 $wgGroupsRemoveFromSelf = [];
5726 * Set of available actions that can be restricted via action=protect
5727 * You probably shouldn't change this.
5728 * Translated through restriction-* messages.
5729 * Title::getRestrictionTypes() will remove restrictions that are not
5730 * applicable to a specific title (create and upload)
5732 $wgRestrictionTypes = [ 'create', 'edit', 'move', 'upload' ];
5735 * Rights which can be required for each protection level (via action=protect)
5737 * You can add a new protection level that requires a specific
5738 * permission by manipulating this array. The ordering of elements
5739 * dictates the order on the protection form's lists.
5741 * - '' will be ignored (i.e. unprotected)
5742 * - 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility
5743 * - 'sysop' is quietly rewritten to 'editprotected' for backwards compatibility
5745 $wgRestrictionLevels = [ '', 'autoconfirmed', 'sysop' ];
5748 * Restriction levels that can be used with cascading protection
5750 * A page can only be protected with cascading protection if the
5751 * requested restriction level is included in this array.
5753 * 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility.
5754 * 'sysop' is quietly rewritten to 'editprotected' for backwards compatibility.
5756 $wgCascadingRestrictionLevels = [ 'sysop' ];
5759 * Restriction levels that should be considered "semiprotected"
5761 * Certain places in the interface recognize a dichotomy between "protected"
5762 * and "semiprotected", without further distinguishing the specific levels. In
5763 * general, if anyone can be eligible to edit a protection level merely by
5764 * reaching some condition in $wgAutopromote, it should probably be considered
5765 * "semiprotected".
5767 * 'autoconfirmed' is quietly rewritten to 'editsemiprotected' for backwards compatibility.
5768 * 'sysop' is not changed, since it really shouldn't be here.
5770 $wgSemiprotectedRestrictionLevels = [ 'autoconfirmed' ];
5773 * Set the minimum permissions required to edit pages in each
5774 * namespace. If you list more than one permission, a user must
5775 * have all of them to edit pages in that namespace.
5777 * @note NS_MEDIAWIKI is implicitly restricted to 'editinterface'.
5779 $wgNamespaceProtection = [];
5782 * Pages in namespaces in this array can not be used as templates.
5784 * Elements MUST be numeric namespace ids, you can safely use the MediaWiki
5785 * namespaces constants (NS_USER, NS_MAIN...).
5787 * Among other things, this may be useful to enforce read-restrictions
5788 * which may otherwise be bypassed by using the template mechanism.
5790 $wgNonincludableNamespaces = [];
5793 * Number of seconds an account is required to age before it's given the
5794 * implicit 'autoconfirm' group membership. This can be used to limit
5795 * privileges of new accounts.
5797 * Accounts created by earlier versions of the software may not have a
5798 * recorded creation date, and will always be considered to pass the age test.
5800 * When left at 0, all registered accounts will pass.
5802 * @par Example:
5803 * Set automatic confirmation to 10 minutes (which is 600 seconds):
5804 * @code
5805 * $wgAutoConfirmAge = 600; // ten minutes
5806 * @endcode
5807 * Set age to one day:
5808 * @code
5809 * $wgAutoConfirmAge = 3600*24; // one day
5810 * @endcode
5812 $wgAutoConfirmAge = 0;
5815 * Number of edits an account requires before it is autoconfirmed.
5816 * Passing both this AND the time requirement is needed. Example:
5818 * @par Example:
5819 * @code
5820 * $wgAutoConfirmCount = 50;
5821 * @endcode
5823 $wgAutoConfirmCount = 0;
5826 * Array containing the conditions of automatic promotion of a user to specific groups.
5828 * The basic syntax for `$wgAutopromote` is:
5830 * $wgAutopromote = [
5831 * 'groupname' => cond,
5832 * 'group2' => cond2,
5833 * ];
5835 * A `cond` may be:
5836 * - a single condition without arguments:
5837 * Note that Autopromote wraps a single non-array value into an array
5838 * e.g. `APCOND_EMAILCONFIRMED` OR
5839 * [ `APCOND_EMAILCONFIRMED` ]
5840 * - a single condition with arguments:
5841 * e.g. `[ APCOND_EDITCOUNT, 100 ]`
5842 * - a set of conditions:
5843 * e.g. `[ 'operand', cond1, cond2, ... ]`
5845 * When constructing a set of conditions, the following conditions are available:
5846 * - `&` (**AND**):
5847 * promote if user matches **ALL** conditions
5848 * - `|` (**OR**):
5849 * promote if user matches **ANY** condition
5850 * - `^` (**XOR**):
5851 * promote if user matches **ONLY ONE OF THE CONDITIONS**
5852 * - `!` (**NOT**):
5853 * promote if user matces **NO** condition
5854 * - [ APCOND_EMAILCONFIRMED ]:
5855 * true if user has a confirmed e-mail
5856 * - [ APCOND_EDITCOUNT, number of edits ]:
5857 * true if user has the at least the number of edits as the passed parameter
5858 * - [ APCOND_AGE, seconds since registration ]:
5859 * true if the length of time since the user created his/her account
5860 * is at least the same length of time as the passed parameter
5861 * - [ APCOND_AGE_FROM_EDIT, seconds since first edit ]:
5862 * true if the length of time since the user made his/her first edit
5863 * is at least the same length of time as the passed parameter
5864 * - [ APCOND_INGROUPS, group1, group2, ... ]:
5865 * true if the user is a member of each of the passed groups
5866 * - [ APCOND_ISIP, ip ]:
5867 * true if the user has the passed IP address
5868 * - [ APCOND_IPINRANGE, range ]:
5869 * true if the user has an IP address in the range of the passed parameter
5870 * - [ APCOND_BLOCKED ]:
5871 * true if the user is sitewide blocked
5872 * - [ APCOND_ISBOT ]:
5873 * true if the user is a bot
5874 * - similar constructs can be defined by extensions
5876 * The sets of conditions are evaluated recursively, so you can use nested sets of conditions
5877 * linked by operands.
5879 * Note that if $wgEmailAuthentication is disabled, APCOND_EMAILCONFIRMED will be true for any
5880 * user who has provided an e-mail address.
5882 $wgAutopromote = [
5883 'autoconfirmed' => [ '&',
5884 [ APCOND_EDITCOUNT, &$wgAutoConfirmCount ],
5885 [ APCOND_AGE, &$wgAutoConfirmAge ],
5890 * Automatically add a usergroup to any user who matches certain conditions.
5892 * Does not add the user to the group again if it has been removed.
5893 * Also, does not remove the group if the user no longer meets the criteria.
5895 * The format is:
5896 * @code
5897 * [ event => criteria, ... ]
5898 * @endcode
5899 * Where event is either:
5900 * - 'onEdit' (when user edits)
5902 * Criteria has the same format as $wgAutopromote
5904 * @see $wgAutopromote
5905 * @since 1.18
5907 $wgAutopromoteOnce = [
5908 'onEdit' => [],
5912 * Put user rights log entries for autopromotion in recent changes?
5913 * @since 1.18
5915 $wgAutopromoteOnceLogInRC = true;
5918 * $wgAddGroups and $wgRemoveGroups can be used to give finer control over who
5919 * can assign which groups at Special:Userrights.
5921 * @par Example:
5922 * Bureaucrats can add any group:
5923 * @code
5924 * $wgAddGroups['bureaucrat'] = true;
5925 * @endcode
5926 * Bureaucrats can only remove bots and sysops:
5927 * @code
5928 * $wgRemoveGroups['bureaucrat'] = [ 'bot', 'sysop' ];
5929 * @endcode
5930 * Sysops can make bots:
5931 * @code
5932 * $wgAddGroups['sysop'] = [ 'bot' ];
5933 * @endcode
5934 * Sysops can disable other sysops in an emergency, and disable bots:
5935 * @code
5936 * $wgRemoveGroups['sysop'] = [ 'sysop', 'bot' ];
5937 * @endcode
5939 $wgAddGroups = [];
5942 * @see $wgAddGroups
5944 $wgRemoveGroups = [];
5947 * A list of available rights, in addition to the ones defined by the core.
5948 * For extensions only.
5950 $wgAvailableRights = [];
5953 * Optional to restrict deletion of pages with higher revision counts
5954 * to users with the 'bigdelete' permission. (Default given to sysops.)
5956 $wgDeleteRevisionsLimit = 0;
5959 * Page deletions with > this number of revisions will use the job queue.
5960 * Revisions will be archived in batches of (at most) this size, one batch per job.
5962 $wgDeleteRevisionsBatchSize = 1000;
5965 * The maximum number of edits a user can have and
5966 * can still be hidden by users with the hideuser permission.
5967 * This is limited for performance reason.
5968 * Set to false to disable the limit.
5969 * @since 1.23
5971 $wgHideUserContribLimit = 1000;
5974 * Number of accounts each IP address may create per specified period(s).
5976 * @par Example:
5977 * @code
5978 * $wgAccountCreationThrottle = [
5979 * // no more than 100 per month
5981 * 'count' => 100,
5982 * 'seconds' => 30*86400,
5983 * ],
5984 * // no more than 10 per day
5986 * 'count' => 10,
5987 * 'seconds' => 86400,
5988 * ],
5989 * ];
5990 * @endcode
5992 * @warning Requires $wgMainCacheType to be enabled
5994 $wgAccountCreationThrottle = [ [
5995 'count' => 0,
5996 'seconds' => 86400,
5997 ] ];
6000 * Edits matching these regular expressions in body text
6001 * will be recognised as spam and rejected automatically.
6003 * There's no administrator override on-wiki, so be careful what you set. :)
6004 * May be an array of regexes or a single string for backwards compatibility.
6006 * @see https://en.wikipedia.org/wiki/Regular_expression
6008 * @note Each regex needs a beginning/end delimiter, eg: # or /
6010 $wgSpamRegex = [];
6013 * Same as the above except for edit summaries
6015 $wgSummarySpamRegex = [];
6018 * Whether to use DNS blacklists in $wgDnsBlacklistUrls to check for open
6019 * proxies
6020 * @since 1.16
6022 $wgEnableDnsBlacklist = false;
6025 * List of DNS blacklists to use, if $wgEnableDnsBlacklist is true.
6027 * This is an array of either a URL or an array with the URL and a key (should
6028 * the blacklist require a key).
6030 * @par Example:
6031 * @code
6032 * $wgDnsBlacklistUrls = [
6033 * // String containing URL
6034 * 'http.dnsbl.sorbs.net.',
6035 * // Array with URL and key, for services that require a key
6036 * [ 'dnsbl.httpbl.net.', 'mykey' ],
6037 * // Array with just the URL. While this works, it is recommended that you
6038 * // just use a string as shown above
6039 * [ 'opm.tornevall.org.' ]
6040 * ];
6041 * @endcode
6043 * @note You should end the domain name with a . to avoid searching your
6044 * eventual domain search suffixes.
6045 * @since 1.16
6047 $wgDnsBlacklistUrls = [ 'http.dnsbl.sorbs.net.' ];
6050 * Proxy whitelist, list of addresses that are assumed to be non-proxy despite
6051 * what the other methods might say.
6053 $wgProxyWhitelist = [];
6056 * IP ranges that should be considered soft-blocked (anon-only, account
6057 * creation allowed). The intent is to use this to prevent anonymous edits from
6058 * shared resources such as Wikimedia Labs.
6059 * @since 1.29
6060 * @var string[]
6062 $wgSoftBlockRanges = [];
6065 * Whether to look at the X-Forwarded-For header's list of (potentially spoofed)
6066 * IPs and apply IP blocks to them. This allows for IP blocks to work with correctly-configured
6067 * (transparent) proxies without needing to block the proxies themselves.
6069 $wgApplyIpBlocksToXff = false;
6072 * Simple rate limiter options to brake edit floods.
6074 * Maximum number actions allowed in the given number of seconds; after that
6075 * the violating client receives HTTP 500 error pages until the period
6076 * elapses.
6078 * @par Example:
6079 * Limits per configured per action and then type of users.
6080 * @code
6081 * $wgRateLimits = [
6082 * 'edit' => [
6083 * 'anon' => [ x, y ], // any and all anonymous edits (aggregate)
6084 * 'user' => [ x, y ], // each logged-in user
6085 * 'global-user' => [ x, y ], // per username, across all sites (assumes names are global)
6086 * 'newbie' => [ x, y ], // each new autoconfirmed accounts; overrides 'user'
6087 * 'ip' => [ x, y ], // each anon and recent account, across all sites
6088 * 'subnet' => [ x, y ], // ... within a /24 subnet in IPv4 or /64 in IPv6
6089 * 'ip-all' => [ x, y ], // per ip, across all sites
6090 * 'subnet-all' => [ x, y ], // ... within a /24 subnet in IPv4 or /64 in IPv6
6091 * 'groupName' => [ x, y ], // by group membership
6093 * ];
6094 * @endcode
6096 * @par Normally, the 'noratelimit' right allows a user to bypass any rate
6097 * limit checks. This can be disabled on a per-action basis by setting the
6098 * special '&can-bypass' key to false in that action's configuration.
6099 * @code
6100 * $wgRateLimits = [
6101 * 'some-action' => [
6102 * '&can-bypass' => false,
6103 * 'user' => [ x, y ],
6104 * ];
6105 * @endcode
6107 * @warning Requires that $wgMainCacheType is set to something persistent
6109 $wgRateLimits = [
6110 // Page edits
6111 'edit' => [
6112 'ip' => [ 8, 60 ],
6113 'newbie' => [ 8, 60 ],
6114 'user' => [ 90, 60 ],
6116 // Page moves
6117 'move' => [
6118 'newbie' => [ 2, 120 ],
6119 'user' => [ 8, 60 ],
6121 // File uploads
6122 'upload' => [
6123 'ip' => [ 8, 60 ],
6124 'newbie' => [ 8, 60 ],
6126 // Page rollbacks
6127 'rollback' => [
6128 'user' => [ 10, 60 ],
6129 'newbie' => [ 5, 120 ]
6131 // Triggering password resets emails
6132 'mailpassword' => [
6133 'ip' => [ 5, 3600 ],
6135 // Emailing other users using MediaWiki
6136 'emailuser' => [
6137 'ip' => [ 5, 86400 ],
6138 'newbie' => [ 5, 86400 ],
6139 'user' => [ 20, 86400 ],
6141 'changeemail' => [
6142 'ip-all' => [ 10, 3600 ],
6143 'user' => [ 4, 86400 ]
6145 // since 1.33 - rate limit email confirmations
6146 'confirmemail' => [
6147 'ip-all' => [ 10, 3600 ],
6148 'user' => [ 4, 86400 ]
6150 // Purging pages
6151 'purge' => [
6152 'ip' => [ 30, 60 ],
6153 'user' => [ 30, 60 ],
6155 // Purges of link tables
6156 'linkpurge' => [
6157 'ip' => [ 30, 60 ],
6158 'user' => [ 30, 60 ],
6160 // Files rendered via thumb.php or thumb_handler.php
6161 'renderfile' => [
6162 'ip' => [ 700, 30 ],
6163 'user' => [ 700, 30 ],
6165 // Same as above but for non-standard thumbnails
6166 'renderfile-nonstandard' => [
6167 'ip' => [ 70, 30 ],
6168 'user' => [ 70, 30 ],
6170 // Stashing edits into cache before save
6171 'stashedit' => [
6172 'ip' => [ 30, 60 ],
6173 'newbie' => [ 30, 60 ],
6175 // Adding or removing change tags
6176 'changetag' => [
6177 'ip' => [ 8, 60 ],
6178 'newbie' => [ 8, 60 ],
6180 // Changing the content model of a page
6181 'editcontentmodel' => [
6182 'newbie' => [ 2, 120 ],
6183 'user' => [ 8, 60 ],
6188 * Array of IPs / CIDR ranges which should be excluded from rate limits.
6189 * This may be useful for allowing NAT gateways for conferences, etc.
6191 $wgRateLimitsExcludedIPs = [];
6194 * Log IP addresses in the recentchanges table; can be accessed only by
6195 * extensions (e.g. CheckUser) or a DB admin
6196 * Used for retroactive autoblocks
6198 $wgPutIPinRC = true;
6201 * Integer defining default number of entries to show on
6202 * special pages which are query-pages such as Special:Whatlinkshere.
6204 $wgQueryPageDefaultLimit = 50;
6207 * Limit password attempts to X attempts per Y seconds per IP per account.
6209 * Value is an array of arrays. Each sub-array must have a key for count
6210 * (ie count of how many attempts before throttle) and a key for seconds.
6211 * If the key 'allIPs' (case sensitive) is present, then the limit is
6212 * just per account instead of per IP per account.
6214 * @since 1.27 allIps support and multiple limits added in 1.27. Prior
6215 * to 1.27 this only supported having a single throttle.
6216 * @warning Requires $wgMainCacheType to be enabled
6218 $wgPasswordAttemptThrottle = [
6219 // Short term limit
6220 [ 'count' => 5, 'seconds' => 300 ],
6221 // Long term limit. We need to balance the risk
6222 // of somebody using this as a DoS attack to lock someone
6223 // out of their account, and someone doing a brute force attack.
6224 [ 'count' => 150, 'seconds' => 60 * 60 * 48 ],
6228 * @var array Map of (grant => right => boolean)
6229 * Users authorize consumers (like Apps) to act on their behalf but only with
6230 * a subset of the user's normal account rights (signed off on by the user).
6231 * The possible rights to grant to a consumer are bundled into groups called
6232 * "grants". Each grant defines some rights it lets consumers inherit from the
6233 * account they may act on behalf of. Note that a user granting a right does
6234 * nothing if that user does not actually have that right to begin with.
6235 * @since 1.27
6237 $wgGrantPermissions = [];
6239 // @TODO: clean up grants
6240 // @TODO: auto-include read/editsemiprotected rights?
6242 $wgGrantPermissions['basic']['autocreateaccount'] = true;
6243 $wgGrantPermissions['basic']['autoconfirmed'] = true;
6244 $wgGrantPermissions['basic']['autopatrol'] = true;
6245 $wgGrantPermissions['basic']['editsemiprotected'] = true;
6246 $wgGrantPermissions['basic']['ipblock-exempt'] = true;
6247 $wgGrantPermissions['basic']['nominornewtalk'] = true;
6248 $wgGrantPermissions['basic']['patrolmarks'] = true;
6249 $wgGrantPermissions['basic']['purge'] = true;
6250 $wgGrantPermissions['basic']['read'] = true;
6251 $wgGrantPermissions['basic']['writeapi'] = true;
6253 $wgGrantPermissions['highvolume']['bot'] = true;
6254 $wgGrantPermissions['highvolume']['apihighlimits'] = true;
6255 $wgGrantPermissions['highvolume']['noratelimit'] = true;
6256 $wgGrantPermissions['highvolume']['markbotedits'] = true;
6258 $wgGrantPermissions['editpage']['edit'] = true;
6259 $wgGrantPermissions['editpage']['minoredit'] = true;
6260 $wgGrantPermissions['editpage']['applychangetags'] = true;
6261 $wgGrantPermissions['editpage']['changetags'] = true;
6263 $wgGrantPermissions['editprotected'] = $wgGrantPermissions['editpage'];
6264 $wgGrantPermissions['editprotected']['editprotected'] = true;
6266 // FIXME: Rename editmycssjs to editmyconfig
6267 $wgGrantPermissions['editmycssjs'] = $wgGrantPermissions['editpage'];
6268 $wgGrantPermissions['editmycssjs']['editmyusercss'] = true;
6269 $wgGrantPermissions['editmycssjs']['editmyuserjson'] = true;
6270 $wgGrantPermissions['editmycssjs']['editmyuserjs'] = true;
6272 $wgGrantPermissions['editmyoptions']['editmyoptions'] = true;
6273 $wgGrantPermissions['editmyoptions']['editmyuserjson'] = true;
6275 $wgGrantPermissions['editinterface'] = $wgGrantPermissions['editpage'];
6276 $wgGrantPermissions['editinterface']['editinterface'] = true;
6277 $wgGrantPermissions['editinterface']['edituserjson'] = true;
6278 $wgGrantPermissions['editinterface']['editsitejson'] = true;
6280 $wgGrantPermissions['editsiteconfig'] = $wgGrantPermissions['editinterface'];
6281 $wgGrantPermissions['editsiteconfig']['editusercss'] = true;
6282 $wgGrantPermissions['editsiteconfig']['edituserjs'] = true;
6283 $wgGrantPermissions['editsiteconfig']['editsitecss'] = true;
6284 $wgGrantPermissions['editsiteconfig']['editsitejs'] = true;
6286 $wgGrantPermissions['createeditmovepage'] = $wgGrantPermissions['editpage'];
6287 $wgGrantPermissions['createeditmovepage']['createpage'] = true;
6288 $wgGrantPermissions['createeditmovepage']['createtalk'] = true;
6289 $wgGrantPermissions['createeditmovepage']['move'] = true;
6290 $wgGrantPermissions['createeditmovepage']['move-rootuserpages'] = true;
6291 $wgGrantPermissions['createeditmovepage']['move-subpages'] = true;
6292 $wgGrantPermissions['createeditmovepage']['move-categorypages'] = true;
6293 $wgGrantPermissions['createeditmovepage']['suppressredirect'] = true;
6295 $wgGrantPermissions['uploadfile']['upload'] = true;
6296 $wgGrantPermissions['uploadfile']['reupload-own'] = true;
6298 $wgGrantPermissions['uploadeditmovefile'] = $wgGrantPermissions['uploadfile'];
6299 $wgGrantPermissions['uploadeditmovefile']['reupload'] = true;
6300 $wgGrantPermissions['uploadeditmovefile']['reupload-shared'] = true;
6301 $wgGrantPermissions['uploadeditmovefile']['upload_by_url'] = true;
6302 $wgGrantPermissions['uploadeditmovefile']['movefile'] = true;
6303 $wgGrantPermissions['uploadeditmovefile']['suppressredirect'] = true;
6305 $wgGrantPermissions['patrol']['patrol'] = true;
6307 $wgGrantPermissions['rollback']['rollback'] = true;
6309 $wgGrantPermissions['blockusers']['block'] = true;
6310 $wgGrantPermissions['blockusers']['blockemail'] = true;
6312 $wgGrantPermissions['viewdeleted']['browsearchive'] = true;
6313 $wgGrantPermissions['viewdeleted']['deletedhistory'] = true;
6314 $wgGrantPermissions['viewdeleted']['deletedtext'] = true;
6316 $wgGrantPermissions['viewrestrictedlogs']['suppressionlog'] = true;
6318 $wgGrantPermissions['delete'] = $wgGrantPermissions['editpage'] +
6319 $wgGrantPermissions['viewdeleted'];
6320 $wgGrantPermissions['delete']['delete'] = true;
6321 $wgGrantPermissions['delete']['bigdelete'] = true;
6322 $wgGrantPermissions['delete']['deletelogentry'] = true;
6323 $wgGrantPermissions['delete']['deleterevision'] = true;
6324 $wgGrantPermissions['delete']['undelete'] = true;
6326 $wgGrantPermissions['oversight']['suppressrevision'] = true;
6328 $wgGrantPermissions['protect'] = $wgGrantPermissions['editprotected'];
6329 $wgGrantPermissions['protect']['protect'] = true;
6331 $wgGrantPermissions['viewmywatchlist']['viewmywatchlist'] = true;
6333 $wgGrantPermissions['editmywatchlist']['editmywatchlist'] = true;
6335 $wgGrantPermissions['sendemail']['sendemail'] = true;
6337 $wgGrantPermissions['createaccount']['createaccount'] = true;
6339 $wgGrantPermissions['privateinfo']['viewmyprivateinfo'] = true;
6341 $wgGrantPermissions['mergehistory']['mergehistory'] = true;
6344 * @var array Map of grants to their UI grouping
6345 * @since 1.27
6347 $wgGrantPermissionGroups = [
6348 // Hidden grants are implicitly present
6349 'basic' => 'hidden',
6351 'editpage' => 'page-interaction',
6352 'createeditmovepage' => 'page-interaction',
6353 'editprotected' => 'page-interaction',
6354 'patrol' => 'page-interaction',
6356 'uploadfile' => 'file-interaction',
6357 'uploadeditmovefile' => 'file-interaction',
6359 'sendemail' => 'email',
6361 'viewmywatchlist' => 'watchlist-interaction',
6362 'editviewmywatchlist' => 'watchlist-interaction',
6364 'editmycssjs' => 'customization',
6365 'editmyoptions' => 'customization',
6367 'editinterface' => 'administration',
6368 'editsiteconfig' => 'administration',
6369 'rollback' => 'administration',
6370 'blockusers' => 'administration',
6371 'delete' => 'administration',
6372 'viewdeleted' => 'administration',
6373 'viewrestrictedlogs' => 'administration',
6374 'protect' => 'administration',
6375 'oversight' => 'administration',
6376 'createaccount' => 'administration',
6377 'mergehistory' => 'administration',
6379 'highvolume' => 'high-volume',
6381 'privateinfo' => 'private-information',
6385 * @var bool Whether to enable bot passwords
6386 * @since 1.27
6388 $wgEnableBotPasswords = true;
6391 * Cluster for the bot_passwords table
6392 * @var string|bool If false, the normal cluster will be used
6393 * @since 1.27
6395 $wgBotPasswordsCluster = false;
6398 * Database name for the bot_passwords table
6400 * To use a database with a table prefix, set this variable to
6401 * "{$database}-{$prefix}".
6402 * @var string|bool If false, the normal database will be used
6403 * @since 1.27
6405 $wgBotPasswordsDatabase = false;
6407 /** @} */ # end of user rights settings
6409 /************************************************************************//**
6410 * @name Proxy scanner settings
6411 * @{
6415 * This should always be customised in LocalSettings.php
6417 $wgSecretKey = false;
6420 * Big list of banned IP addresses.
6422 * This can have the following formats:
6423 * - An array of addresses
6424 * - A string, in which case this is the path to a file
6425 * containing the list of IP addresses, one per line
6427 $wgProxyList = [];
6429 /** @} */ # end of proxy scanner settings
6431 /************************************************************************//**
6432 * @name Cookie settings
6433 * @{
6437 * Default cookie lifetime, in seconds. Setting to 0 makes all cookies session-only.
6439 $wgCookieExpiration = 30 * 86400;
6442 * Default login cookie lifetime, in seconds. Setting
6443 * $wgExtendLoginCookieExpiration to null will use $wgCookieExpiration to
6444 * calculate the cookie lifetime. As with $wgCookieExpiration, 0 will make
6445 * login cookies session-only.
6447 $wgExtendedLoginCookieExpiration = 180 * 86400;
6450 * Set to set an explicit domain on the login cookies eg, "justthis.domain.org"
6451 * or ".any.subdomain.net"
6453 $wgCookieDomain = '';
6456 * Set this variable if you want to restrict cookies to a certain path within
6457 * the domain specified by $wgCookieDomain.
6459 $wgCookiePath = '/';
6462 * Whether the "secure" flag should be set on the cookie. This can be:
6463 * - true: Set secure flag
6464 * - false: Don't set secure flag
6465 * - "detect": Set the secure flag if $wgServer is set to an HTTPS URL,
6466 * or if $wgForceHTTPS is true.
6468 * If $wgForceHTTPS is true, session cookies will be secure regardless of this
6469 * setting. However, other cookies will still be affected.
6471 $wgCookieSecure = 'detect';
6474 * By default, MediaWiki checks if the client supports cookies during the
6475 * login process, so that it can display an informative error message if
6476 * cookies are disabled. Set this to true if you want to disable this cookie
6477 * check.
6479 $wgDisableCookieCheck = false;
6482 * Cookies generated by MediaWiki have names starting with this prefix. Set it
6483 * to a string to use a custom prefix. Setting it to false causes the database
6484 * name to be used as a prefix.
6486 $wgCookiePrefix = false;
6489 * Set authentication cookies to HttpOnly to prevent access by JavaScript,
6490 * in browsers that support this feature. This can mitigates some classes of
6491 * XSS attack.
6493 $wgCookieHttpOnly = true;
6496 * The SameSite cookie attribute used for login cookies. This can be "Lax",
6497 * "Strict", "None" or empty/null to omit the attribute.
6499 * This only applies to login cookies, since the correct value for other
6500 * cookies depends on what kind of cookie it is.
6502 * @since 1.35
6503 * @var string|null
6505 $wgCookieSameSite = null;
6508 * If true, when a cross-site cookie with SameSite=None is sent, a legacy
6509 * cookie with an "ss0" prefix will also be sent, without SameSite=None. This
6510 * is a workaround for broken behaviour in Chrome 51-66 and similar browsers.
6512 * @since 1.35
6513 * @var bool
6515 $wgUseSameSiteLegacyCookies = false;
6518 * A list of cookies that vary the cache (for use by extensions)
6520 $wgCacheVaryCookies = [];
6523 * Override to customise the session name
6525 $wgSessionName = false;
6528 * Whether to set a cookie when a user is autoblocked. Doing so means that a blocked user, even
6529 * after logging out and moving to a new IP address, will still be blocked. This cookie will contain
6530 * an authentication code if $wgSecretKey is set, or otherwise will just be the block ID (in
6531 * which case there is a possibility of an attacker discovering the names of revdeleted users, so
6532 * it is best to use this in conjunction with $wgSecretKey being set).
6534 $wgCookieSetOnAutoblock = true;
6537 * Whether to set a cookie when a logged-out user is blocked. Doing so means that a blocked user,
6538 * even after moving to a new IP address, will still be blocked. This cookie will contain an
6539 * authentication code if $wgSecretKey is set, or otherwise will just be the block ID (in which
6540 * case there is a possibility of an attacker discovering the names of revdeleted users, so it
6541 * is best to use this in conjunction with $wgSecretKey being set).
6543 $wgCookieSetOnIpBlock = true;
6545 /** @} */ # end of cookie settings }
6547 /************************************************************************//**
6548 * @name Profiling, testing and debugging
6550 * See $wgProfiler for how to enable profiling.
6552 * @{
6556 * Filename for debug logging. See https://www.mediawiki.org/wiki/How_to_debug
6557 * The debug log file should be not be publicly accessible if it is used, as it
6558 * may contain private data.
6560 $wgDebugLogFile = '';
6563 * Prefix for debug log lines
6565 $wgDebugLogPrefix = '';
6568 * If true, instead of redirecting, show a page with a link to the redirect
6569 * destination. This allows for the inspection of PHP error messages, and easy
6570 * resubmission of form data. For developer use only.
6572 $wgDebugRedirects = false;
6575 * If true, log debugging data from action=raw and load.php.
6576 * This is normally false to avoid overlapping debug entries due to gen=css
6577 * and gen=js requests.
6579 $wgDebugRawPage = false;
6582 * Send debug data to an HTML comment in the output.
6584 * This may occasionally be useful when supporting a non-technical end-user.
6585 * It's more secure than exposing the debug log file to the web, since the
6586 * output only contains private data for the current user. But it's not ideal
6587 * for development use since data is lost on fatal errors and redirects.
6589 $wgDebugComments = false;
6592 * Write SQL queries to the debug log.
6594 * This setting is only used $wgLBFactoryConf['class'] is set to
6595 * '\Wikimedia\Rdbms\LBFactorySimple'; otherwise the DBO_DEBUG flag must be set in
6596 * the 'flags' option of the database connection to achieve the same functionality.
6598 $wgDebugDumpSql = false;
6601 * Performance expectations for DB usage
6603 * @since 1.26
6605 $wgTrxProfilerLimits = [
6606 // HTTP GET/HEAD requests.
6607 // Master queries should not happen on GET requests
6608 'GET' => [
6609 'masterConns' => 0,
6610 'writes' => 0,
6611 'readQueryTime' => 5,
6612 'readQueryRows' => 10000
6614 // HTTP POST requests.
6615 // Master reads and writes will happen for a subset of these.
6616 'POST' => [
6617 'readQueryTime' => 5,
6618 'writeQueryTime' => 1,
6619 'readQueryRows' => 100000,
6620 'maxAffected' => 1000
6622 'POST-nonwrite' => [
6623 'writes' => 0,
6624 'readQueryTime' => 5,
6625 'readQueryRows' => 10000
6627 // Deferred updates that run after HTTP response is sent for GET requests
6628 'PostSend-GET' => [
6629 'readQueryTime' => 5,
6630 'writeQueryTime' => 1,
6631 'readQueryRows' => 10000,
6632 'maxAffected' => 1000,
6633 // Log master queries under the post-send entry point as they are discouraged
6634 'masterConns' => 0,
6635 'writes' => 0,
6637 // Deferred updates that run after HTTP response is sent for POST requests
6638 'PostSend-POST' => [
6639 'readQueryTime' => 5,
6640 'writeQueryTime' => 1,
6641 'readQueryRows' => 100000,
6642 'maxAffected' => 1000
6644 // Background job runner
6645 'JobRunner' => [
6646 'readQueryTime' => 30,
6647 'writeQueryTime' => 5,
6648 'readQueryRows' => 100000,
6649 'maxAffected' => 500 // ballpark of $wgUpdateRowsPerQuery
6651 // Command-line scripts
6652 'Maintenance' => [
6653 'writeQueryTime' => 5,
6654 'maxAffected' => 1000
6659 * Map of string log group names to log destinations.
6661 * If set, wfDebugLog() output for that group will go to that file instead
6662 * of the regular $wgDebugLogFile. Useful for enabling selective logging
6663 * in production.
6665 * Log destinations may be one of the following:
6666 * - false to completely remove from the output, including from $wgDebugLogFile.
6667 * - string values specifying a filename or URI.
6668 * - associative array with keys:
6669 * - 'destination' desired filename or URI.
6670 * - 'sample' an integer value, specifying a sampling factor (optional)
6671 * - 'level' A \Psr\Log\LogLevel constant, indicating the minimum level
6672 * to log (optional, since 1.25)
6674 * @par Example:
6675 * @code
6676 * $wgDebugLogGroups['redis'] = '/var/log/mediawiki/redis.log';
6677 * @endcode
6679 * @par Advanced example:
6680 * @code
6681 * $wgDebugLogGroups['memcached'] = [
6682 * 'destination' => '/var/log/mediawiki/memcached.log',
6683 * 'sample' => 1000, // log 1 message out of every 1,000.
6684 * 'level' => \Psr\Log\LogLevel::WARNING
6685 * ];
6686 * @endcode
6688 $wgDebugLogGroups = [];
6691 * Default service provider for creating Psr\Log\LoggerInterface instances.
6693 * The value should be an array suitable for use with
6694 * ObjectFactory::getObjectFromSpec(). The created object is expected to
6695 * implement the MediaWiki\Logger\Spi interface. See ObjectFactory for additional
6696 * details.
6698 * Alternately the MediaWiki\Logger\LoggerFactory::registerProvider method can
6699 * be called to inject an MediaWiki\Logger\Spi instance into the LoggerFactory
6700 * and bypass the use of this configuration variable entirely.
6702 * @par To completely disable logging:
6703 * @code
6704 * $wgMWLoggerDefaultSpi = [ 'class' => \MediaWiki\Logger\NullSpi::class ];
6705 * @endcode
6707 * @since 1.25
6708 * @var array $wgMWLoggerDefaultSpi
6709 * @see MwLogger
6711 $wgMWLoggerDefaultSpi = [
6712 'class' => \MediaWiki\Logger\LegacySpi::class,
6716 * Display debug data at the bottom of the main content area.
6718 * Useful for developers and technical users trying to working on a closed wiki.
6720 $wgShowDebug = false;
6723 * Show the contents of $wgHooks in Special:Version
6725 $wgSpecialVersionShowHooks = false;
6728 * Whether to show "we're sorry, but there has been a database error" pages.
6729 * Displaying errors aids in debugging, but may display information useful
6730 * to an attacker.
6732 * @deprecated and nonfunctional since 1.32: set $wgShowExceptionDetails and/or
6733 * $wgShowHostnames instead.
6735 $wgShowSQLErrors = false;
6738 * If set to true, uncaught exceptions will print the exception message and a
6739 * complete stack trace to output. This should only be used for debugging, as it
6740 * may reveal private information in function parameters due to PHP's backtrace
6741 * formatting. If set to false, only the exception's class will be shown.
6743 $wgShowExceptionDetails = false;
6746 * If true, show a backtrace for database errors
6748 * @note This setting only applies when connection errors and query errors are
6749 * reported in the normal manner. $wgShowExceptionDetails applies in other cases,
6750 * including those in which an uncaught exception is thrown from within the
6751 * exception handler.
6753 * @deprecated and nonfunctional since 1.32: set $wgShowExceptionDetails instead.
6755 $wgShowDBErrorBacktrace = false;
6758 * If true, send the exception backtrace to the error log
6760 $wgLogExceptionBacktrace = true;
6763 * If true, the MediaWiki error handler passes errors/warnings to the default error handler
6764 * after logging them. The setting is ignored when the track_errors php.ini flag is true.
6766 $wgPropagateErrors = true;
6769 * Expose backend server host names through the API and various HTML comments
6771 $wgShowHostnames = false;
6774 * Override server hostname detection with a hardcoded value.
6775 * Should be a string, default false.
6776 * @since 1.20
6778 $wgOverrideHostname = false;
6781 * If set to true MediaWiki will throw notices for some possible error
6782 * conditions and for deprecated functions.
6784 $wgDevelopmentWarnings = false;
6787 * Release limitation to wfDeprecated warnings, if set to a release number
6788 * development warnings will not be generated for deprecations added in releases
6789 * after the limit.
6791 $wgDeprecationReleaseLimit = false;
6794 * Profiler configuration.
6796 * To use a profiler, set $wgProfiler in LocalSetings.php.
6798 * Options:
6800 * - 'class' (`string`): The Profiler subclass to use.
6801 * Default: ProfilerStub.
6802 * - 'sampling' (`int`): Only enable the profiler on one in this many requests.
6803 * For requests that are not in the sampling,
6804 * the 'class' option will be replaced with ProfilerStub.
6805 * Default: `1`.
6806 * - 'threshold' (`float`): Only process the recorded data if the total ellapsed
6807 * time for a request is more than this number of seconds.
6808 * Default: `0.0`.
6809 * - 'output' (`string|string[]`): ProfilerOutput subclass or subclasess to use.
6810 * Default: `[]`.
6812 * The output classes available in MediaWiki core are:
6813 * ProfilerOutputText, ProfilerOutputStats, and ProfilerOutputDump.
6815 * - ProfilerOutputText: outputs profiling data in the web page body as
6816 * a comment. You can make the profiling data in HTML render visibly
6817 * instead by setting the 'visible' configuration flag.
6819 * - ProfilerOutputStats: outputs profiling data as StatsD metrics.
6820 * It expects that $wgStatsdServer is set to the host (or host:port)
6821 * of a statsd server.
6823 * - ProfilerOutputDump: outputs dump files that are compatible
6824 * with the XHProf gui. It expects that `$wgProfiler['outputDir']`
6825 * is set as well.
6827 * Examples:
6829 * @code
6830 * $wgProfiler['class'] = ProfilerXhprof::class;
6831 * $wgProfiler['output'] = ProfilerOutputText::class;
6832 * @endcode
6834 * @code
6835 * $wgProfiler['class'] = ProfilerXhprof:class;
6836 * $wgProfiler['output'] = [ ProfilerOutputText::class ];
6837 * $wgProfiler['sampling'] = 50; // one every 50 requests
6838 * @endcode
6840 * For performance, the profiler is always disabled for CLI scripts as they
6841 * could be long running and the data would accumulate. Use the '--profiler'
6842 * parameter of maintenance scripts to override this.
6844 * @since 1.17.0
6846 $wgProfiler = [];
6849 * Destination of statsd metrics.
6851 * A host or host:port of a statsd server. Port defaults to 8125.
6853 * If not set, statsd metrics will not be collected.
6855 * @see wfLogProfilingData
6856 * @since 1.25
6858 $wgStatsdServer = false;
6861 * Prefix for metric names sent to $wgStatsdServer.
6863 * @see MediaWikiServices::getInstance()->getStatsdDataFactory
6864 * @see BufferingStatsdDataFactory
6865 * @since 1.25
6867 $wgStatsdMetricPrefix = 'MediaWiki';
6870 * Sampling rate for statsd metrics as an associative array of patterns and rates.
6871 * Patterns are Unix shell patterns (e.g. 'MediaWiki.api.*').
6872 * Rates are sampling probabilities (e.g. 0.1 means 1 in 10 events are sampled).
6873 * @since 1.28
6875 $wgStatsdSamplingRates = [
6876 'wanobjectcache:*' => 0.001
6880 * InfoAction retrieves a list of transclusion links (both to and from).
6881 * This number puts a limit on that query in the case of highly transcluded
6882 * templates.
6884 $wgPageInfoTransclusionLimit = 50;
6887 * Parser test suite files to be run by parserTests.php when no specific
6888 * filename is passed to it.
6890 * Extensions using extension.json will have any *.txt file in a
6891 * tests/parser/ directory automatically run.
6893 * Core tests can be added to ParserTestRunner::$coreTestFiles.
6895 * Use full paths.
6897 * @deprecated since 1.30
6899 $wgParserTestFiles = [];
6902 * Allow running of javascript test suites via [[Special:JavaScriptTest]] (such as QUnit).
6904 $wgEnableJavaScriptTest = false;
6907 * Overwrite the caching key prefix with custom value.
6908 * @since 1.19
6910 $wgCachePrefix = false;
6913 * Display the new debugging toolbar. This also enables profiling on database
6914 * queries and other useful output.
6915 * Will be ignored if $wgUseFileCache or $wgUseCdn is enabled.
6917 * @since 1.19
6919 $wgDebugToolbar = false;
6921 /** @} */ # end of profiling, testing and debugging }
6923 /************************************************************************//**
6924 * @name Search
6925 * @{
6929 * Set this to true to disable the full text search feature.
6931 $wgDisableTextSearch = false;
6934 * Set to true to have nicer highlighted text in search results,
6935 * by default off due to execution overhead
6937 $wgAdvancedSearchHighlighting = false;
6940 * Regexp to match word boundaries, defaults for non-CJK languages
6941 * should be empty for CJK since the words are not separate
6943 $wgSearchHighlightBoundaries = '[\p{Z}\p{P}\p{C}]';
6946 * Template for OpenSearch suggestions, defaults to API action=opensearch
6948 * Sites with heavy load would typically have these point to a custom
6949 * PHP wrapper to avoid firing up mediawiki for every keystroke
6951 * Placeholders: {searchTerms}
6953 * @deprecated since 1.25 Use $wgOpenSearchTemplates['application/x-suggestions+json'] instead
6955 $wgOpenSearchTemplate = false;
6958 * Templates for OpenSearch suggestions, defaults to API action=opensearch
6960 * Sites with heavy load would typically have these point to a custom
6961 * PHP wrapper to avoid firing up mediawiki for every keystroke
6963 * Placeholders: {searchTerms}
6965 $wgOpenSearchTemplates = [
6966 'application/x-suggestions+json' => false,
6967 'application/x-suggestions+xml' => false,
6971 * This was previously a used to force empty responses from ApiOpenSearch
6972 * with the 'suggest' parameter set.
6974 * @deprecated since 1.35 No longer used
6976 $wgEnableOpenSearchSuggest = true;
6979 * Integer defining default number of entries to show on
6980 * OpenSearch call.
6982 $wgOpenSearchDefaultLimit = 10;
6985 * Minimum length of extract in <Description>. Actual extracts will last until the end of sentence.
6987 $wgOpenSearchDescriptionLength = 100;
6990 * Expiry time for search suggestion responses
6992 $wgSearchSuggestCacheExpiry = 1200;
6995 * If you've disabled search semi-permanently, this also disables updates to the
6996 * table. If you ever re-enable, be sure to rebuild the search table.
6998 $wgDisableSearchUpdate = false;
7001 * List of namespaces which are searched by default.
7003 * @par Example:
7004 * @code
7005 * $wgNamespacesToBeSearchedDefault[NS_MAIN] = true;
7006 * $wgNamespacesToBeSearchedDefault[NS_PROJECT] = true;
7007 * @endcode
7009 $wgNamespacesToBeSearchedDefault = [
7010 NS_MAIN => true,
7014 * Disable the internal MySQL-based search, to allow it to be
7015 * implemented by an extension instead.
7017 $wgDisableInternalSearch = false;
7020 * Set this to a URL to forward search requests to some external location.
7021 * If the URL includes '$1', this will be replaced with the URL-encoded
7022 * search term.
7024 * @par Example:
7025 * To forward to Google you'd have something like:
7026 * @code
7027 * $wgSearchForwardUrl =
7028 * 'https://www.google.com/search?q=$1' .
7029 * '&domains=https://example.com' .
7030 * '&sitesearch=https://example.com' .
7031 * '&ie=utf-8&oe=utf-8';
7032 * @endcode
7034 $wgSearchForwardUrl = null;
7037 * Array of namespaces to generate a Google sitemap for when the
7038 * maintenance/generateSitemap.php script is run, or false if one is to be
7039 * generated for all namespaces.
7041 $wgSitemapNamespaces = false;
7044 * Custom namespace priorities for sitemaps. Setting this will allow you to
7045 * set custom priorities to namespaces when sitemaps are generated using the
7046 * maintenance/generateSitemap.php script.
7048 * This should be a map of namespace IDs to priority
7049 * @par Example:
7050 * @code
7051 * $wgSitemapNamespacesPriorities = [
7052 * NS_USER => '0.9',
7053 * NS_HELP => '0.0',
7054 * ];
7055 * @endcode
7057 $wgSitemapNamespacesPriorities = false;
7060 * If true, searches for IP addresses will be redirected to that IP's
7061 * contributions page. E.g. searching for "1.2.3.4" will redirect to
7062 * [[Special:Contributions/1.2.3.4]]
7064 $wgEnableSearchContributorsByIP = true;
7066 /** @} */ # end of search settings
7068 /************************************************************************//**
7069 * @name Edit user interface
7070 * @{
7074 * Path to the GNU diff3 utility. If the file doesn't exist, edit conflicts will
7075 * fall back to the old behavior (no merging).
7077 $wgDiff3 = '/usr/bin/diff3';
7080 * Path to the GNU diff utility.
7082 $wgDiff = '/usr/bin/diff';
7085 * Which namespaces have special treatment where they should be preview-on-open
7086 * Internally only Category: pages apply, but using this extensions (e.g. Semantic MediaWiki)
7087 * can specify namespaces of pages they have special treatment for
7089 $wgPreviewOnOpenNamespaces = [
7090 NS_CATEGORY => true
7094 * Enable the UniversalEditButton for browsers that support it
7095 * (currently only Firefox with an extension)
7096 * See http://universaleditbutton.org for more background information
7098 $wgUniversalEditButton = true;
7101 * If user doesn't specify any edit summary when making a an edit, MediaWiki
7102 * will try to automatically create one. This feature can be disabled by set-
7103 * ting this variable false.
7105 $wgUseAutomaticEditSummaries = true;
7107 /** @} */ # end edit UI }
7109 /************************************************************************//**
7110 * @name Maintenance
7111 * See also $wgSiteNotice
7112 * @{
7116 * @cond file_level_code
7117 * Set $wgCommandLineMode if it's not set already, to avoid notices
7119 if ( !isset( $wgCommandLineMode ) ) {
7120 $wgCommandLineMode = false;
7122 /** @endcond */
7125 * For colorized maintenance script output, is your terminal background dark ?
7127 $wgCommandLineDarkBg = false;
7130 * Set this to a string to put the wiki into read-only mode. The text will be
7131 * used as an explanation to users.
7133 * This prevents most write operations via the web interface. Cache updates may
7134 * still be possible. To prevent database writes completely, use the read_only
7135 * option in MySQL.
7137 $wgReadOnly = null;
7140 * Set this to true to put the wiki watchlists into read-only mode.
7141 * @var bool
7142 * @since 1.31
7144 $wgReadOnlyWatchedItemStore = false;
7147 * If this lock file exists (size > 0), the wiki will be forced into read-only mode.
7148 * Its contents will be shown to users as part of the read-only warning
7149 * message.
7151 * Will default to "{$wgUploadDirectory}/lock_yBgMBwiR" in Setup.php
7153 $wgReadOnlyFile = false;
7156 * When you run the web-based upgrade utility, it will tell you what to set
7157 * this to in order to authorize the upgrade process. It will subsequently be
7158 * used as a password, to authorize further upgrades.
7160 * For security, do not set this to a guessable string. Use the value supplied
7161 * by the install/upgrade process. To cause the upgrader to generate a new key,
7162 * delete the old key from LocalSettings.php.
7164 $wgUpgradeKey = false;
7167 * Fully specified path to git binary
7169 $wgGitBin = '/usr/bin/git';
7172 * Map GIT repository URLs to viewer URLs to provide links in Special:Version
7174 * Key is a pattern passed to preg_match() and preg_replace(),
7175 * without the delimiters (which are #) and must match the whole URL.
7176 * The value is the replacement for the key (it can contain $1, etc.)
7177 * %h will be replaced by the short SHA-1 (7 first chars) and %H by the
7178 * full SHA-1 of the HEAD revision.
7179 * %r will be replaced with a URL-encoded version of $1.
7180 * %R will be replaced with $1 and no URL-encoding
7182 * @since 1.20
7184 $wgGitRepositoryViewers = [
7185 'https://(?:[a-z0-9_]+@)?gerrit.wikimedia.org/r/(?:p/)?(.*)' =>
7186 'https://gerrit.wikimedia.org/g/%R/+/%H',
7187 'ssh://(?:[a-z0-9_]+@)?gerrit.wikimedia.org:29418/(.*)' =>
7188 'https://gerrit.wikimedia.org/g/%R/+/%H',
7191 /** @} */ # End of maintenance }
7193 /************************************************************************//**
7194 * @name Recent changes, new pages, watchlist and history
7195 * @{
7199 * Recentchanges items are periodically purged; entries older than this many
7200 * seconds will go.
7201 * Default: 90 days = about three months
7203 $wgRCMaxAge = 90 * 24 * 3600;
7206 * Page watchers inactive for more than this many seconds are considered inactive.
7207 * Used mainly by action=info. Default: 180 days = about six months.
7208 * @since 1.26
7210 $wgWatchersMaxAge = 180 * 24 * 3600;
7213 * If active watchers (per above) are this number or less, do not disclose it.
7214 * Left to 1, prevents unprivileged users from knowing for sure that there are 0.
7215 * Set to -1 if you want to always complement watchers count with this info.
7216 * @since 1.26
7218 $wgUnwatchedPageSecret = 1;
7221 * Filter $wgRCLinkDays by $wgRCMaxAge to avoid showing links for numbers
7222 * higher than what will be stored. Note that this is disabled by default
7223 * because we sometimes do have RC data which is beyond the limit for some
7224 * reason, and some users may use the high numbers to display that data which
7225 * is still there.
7227 $wgRCFilterByAge = false;
7230 * List of Limits options to list in the Special:Recentchanges and
7231 * Special:Recentchangeslinked pages.
7233 $wgRCLinkLimits = [ 50, 100, 250, 500 ];
7236 * List of Days options to list in the Special:Recentchanges and
7237 * Special:Recentchangeslinked pages.
7239 * @see ChangesListSpecialPage::getLinkDays
7241 $wgRCLinkDays = [ 1, 3, 7, 14, 30 ];
7244 * Configuration for feeds to which notifications about recent changes will be sent.
7246 * The following feed classes are available by default:
7247 * - 'UDPRCFeedEngine' - sends recent changes over UDP to the specified server.
7248 * - 'RedisPubSubFeedEngine' - send recent changes to Redis.
7250 * Only 'class' or 'uri' is required. If 'uri' is set instead of 'class', then
7251 * RecentChange::getEngine() is used to determine the class. All options are
7252 * passed to the constructor.
7254 * Common options:
7255 * - 'class' -- The class to use for this feed (must implement RCFeed).
7256 * - 'omit_bots' -- Exclude bot edits from the feed. (default: false)
7257 * - 'omit_anon' -- Exclude anonymous edits from the feed. (default: false)
7258 * - 'omit_user' -- Exclude edits by registered users from the feed. (default: false)
7259 * - 'omit_minor' -- Exclude minor edits from the feed. (default: false)
7260 * - 'omit_patrolled' -- Exclude patrolled edits from the feed. (default: false)
7262 * FormattedRCFeed-specific options:
7263 * - 'uri' -- [required] The address to which the messages are sent.
7264 * The uri scheme of this string will be looked up in $wgRCEngines
7265 * to determine which FormattedRCFeed class to use.
7266 * - 'formatter' -- [required] The class (implementing RCFeedFormatter) which will
7267 * produce the text to send. This can also be an object of the class.
7268 * Formatters available by default: JSONRCFeedFormatter, XMLRCFeedFormatter,
7269 * IRCColourfulRCFeedFormatter.
7271 * IRCColourfulRCFeedFormatter-specific options:
7272 * - 'add_interwiki_prefix' -- whether the titles should be prefixed with
7273 * the first entry in the $wgLocalInterwikis array
7275 * JSONRCFeedFormatter-specific options:
7276 * - 'channel' -- if set, the 'channel' parameter is also set in JSON values.
7278 * @par Examples:
7279 * @code
7280 * $wgRCFeeds['example'] = [
7281 * 'uri' => 'udp://localhost:1336',
7282 * 'formatter' => 'JSONRCFeedFormatter',
7283 * 'add_interwiki_prefix' => false,
7284 * 'omit_bots' => true,
7285 * ];
7286 * @endcode
7287 * @code
7288 * $wgRCFeeds['example'] = [
7289 * 'uri' => 'udp://localhost:1338',
7290 * 'formatter' => 'IRCColourfulRCFeedFormatter',
7291 * 'add_interwiki_prefix' => false,
7292 * 'omit_bots' => true,
7293 * ];
7294 * @endcode
7295 * @code
7296 * $wgRCFeeds['example'] = [
7297 * 'class' => ExampleRCFeed::class,
7298 * ];
7299 * @endcode
7301 * @since 1.22
7303 $wgRCFeeds = [];
7306 * Used by RecentChange::getEngine to find the correct engine for a given URI scheme.
7307 * Keys are scheme names, values are names of FormattedRCFeed sub classes.
7308 * @since 1.22
7310 $wgRCEngines = [
7311 'redis' => RedisPubSubFeedEngine::class,
7312 'udp' => UDPRCFeedEngine::class,
7316 * Treat category membership changes as a RecentChange.
7317 * Changes are mentioned in RC for page actions as follows:
7318 * - creation: pages created with categories are mentioned
7319 * - edit: category additions/removals to existing pages are mentioned
7320 * - move: nothing is mentioned (unless templates used depend on the title)
7321 * - deletion: nothing is mentioned
7322 * - undeletion: nothing is mentioned
7324 * @since 1.27
7326 $wgRCWatchCategoryMembership = false;
7329 * Use RC Patrolling to check for vandalism (from recent changes and watchlists)
7330 * New pages and new files are included.
7332 * @note If you disable all patrolling features, you probably also want to
7333 * remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on
7334 * Special:Log.
7336 $wgUseRCPatrol = true;
7339 * Polling rate, in seconds, used by the 'live update' and 'view newest' features
7340 * of the RCFilters app on SpecialRecentChanges and Special:Watchlist.
7341 * 0 to disable completely.
7343 $wgStructuredChangeFiltersLiveUpdatePollingRate = 3;
7346 * Use new page patrolling to check new pages on Special:Newpages
7348 * @note If you disable all patrolling features, you probably also want to
7349 * remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on
7350 * Special:Log.
7352 $wgUseNPPatrol = true;
7355 * Use file patrolling to check new files on Special:Newfiles
7357 * @note If you disable all patrolling features, you probably also want to
7358 * remove 'patrol' from $wgFilterLogTypes so a show/hide link isn't shown on
7359 * Special:Log.
7361 * @since 1.27
7363 $wgUseFilePatrol = true;
7366 * Provide syndication feeds (RSS, Atom) for, e.g., Recentchanges, Newpages
7368 $wgFeed = true;
7371 * Set maximum number of results to return in syndication feeds (RSS, Atom) for
7372 * eg Recentchanges, Newpages.
7374 $wgFeedLimit = 50;
7377 * _Minimum_ timeout for cached Recentchanges feed, in seconds.
7378 * A cached version will continue to be served out even if changes
7379 * are made, until this many seconds runs out since the last render.
7381 * If set to 0, feed caching is disabled. Use this for debugging only;
7382 * feed generation can be pretty slow with diffs.
7384 $wgFeedCacheTimeout = 60;
7387 * When generating Recentchanges RSS/Atom feed, diffs will not be generated for
7388 * pages larger than this size.
7390 $wgFeedDiffCutoff = 32768;
7393 * Override the site's default RSS/ATOM feed for recentchanges that appears on
7394 * every page. Some sites might have a different feed they'd like to promote
7395 * instead of the RC feed (maybe like a "Recent New Articles" or "Breaking news" one).
7396 * Should be a format as key (either 'rss' or 'atom') and an URL to the feed
7397 * as value.
7398 * @par Example:
7399 * Configure the 'atom' feed to https://example.com/somefeed.xml
7400 * @code
7401 * $wgSiteFeed['atom'] = "https://example.com/somefeed.xml";
7402 * @endcode
7404 $wgOverrideSiteFeed = [];
7407 * Available feeds objects.
7408 * Should probably only be defined when a page is syndicated ie when
7409 * $wgOut->isSyndicated() is true.
7411 $wgFeedClasses = [
7412 'rss' => RSSFeed::class,
7413 'atom' => AtomFeed::class,
7417 * Which feed types should we provide by default? This can include 'rss',
7418 * 'atom', neither, or both.
7420 $wgAdvertisedFeedTypes = [ 'atom' ];
7423 * Show watching users in recent changes, watchlist and page history views
7425 $wgRCShowWatchingUsers = false; # UPO
7428 * Show the amount of changed characters in recent changes
7430 $wgRCShowChangedSize = true;
7433 * If the difference between the character counts of the text
7434 * before and after the edit is below that value, the value will be
7435 * highlighted on the RC page.
7437 $wgRCChangedSizeThreshold = 500;
7440 * Show "Updated (since my last visit)" marker in RC view, watchlist and history
7441 * view for watched pages with new changes
7443 $wgShowUpdatedMarker = true;
7446 * Disable links to talk pages of anonymous users (IPs) in listings on special
7447 * pages like page history, Special:Recentchanges, etc.
7449 $wgDisableAnonTalk = false;
7452 * Allow filtering by change tag in recentchanges, history, etc
7453 * Has no effect if no tags are defined in valid_tag.
7455 $wgUseTagFilter = true;
7458 * List of core tags to enable. Available tags are:
7459 * - 'mw-contentmodelchange': Edit changes content model of a page
7460 * - 'mw-new-redirect': Edit makes new redirect page (new page or by changing content page)
7461 * - 'mw-removed-redirect': Edit changes an existing redirect into a non-redirect
7462 * - 'mw-changed-redirect-target': Edit changes redirect target
7463 * - 'mw-blank': Edit completely blanks the page
7464 * - 'mw-replace': Edit removes more than 90% of the content
7465 * - 'mw-rollback': Edit is a rollback, made through the rollback link or rollback API
7466 * - 'mw-undo': Edit made through an undo link
7467 * - 'mw-manual-revert': Edit that restored the page to an exact previous state
7468 * - 'mw-reverted': Edit that was later reverted by another edit
7470 * @var array
7471 * @since 1.31
7472 * @since 1.36 Added 'mw-manual-revert' and 'mw-reverted'
7474 $wgSoftwareTags = [
7475 'mw-contentmodelchange' => true,
7476 'mw-new-redirect' => true,
7477 'mw-removed-redirect' => true,
7478 'mw-changed-redirect-target' => true,
7479 'mw-blank' => true,
7480 'mw-replace' => true,
7481 'mw-rollback' => true,
7482 'mw-undo' => true,
7483 'mw-manual-revert' => true,
7484 'mw-reverted' => true,
7488 * If set to an integer, pages that are watched by this many users or more
7489 * will not require the unwatchedpages permission to view the number of
7490 * watchers.
7492 * @since 1.21
7494 $wgUnwatchedPageThreshold = false;
7497 * Flags (letter symbols) shown in recent changes and watchlist to indicate
7498 * certain types of edits.
7500 * To register a new one:
7501 * @code
7502 * $wgRecentChangesFlags['flag'] => [
7503 * // message for the letter displayed next to rows on changes lists
7504 * 'letter' => 'letter-msg',
7505 * // message for the tooltip of the letter
7506 * 'title' => 'tooltip-msg',
7507 * // optional (defaults to 'tooltip-msg'), message to use in the legend box
7508 * 'legend' => 'legend-msg',
7509 * // optional (defaults to 'flag'), CSS class to put on changes lists rows
7510 * 'class' => 'css-class',
7511 * // optional (defaults to 'any'), how top-level flag is determined. 'any'
7512 * // will set the top-level flag if any line contains the flag, 'all' will
7513 * // only be set if all lines contain the flag.
7514 * 'grouping' => 'any',
7515 * ];
7516 * @endcode
7518 * @since 1.22
7520 $wgRecentChangesFlags = [
7521 'newpage' => [
7522 'letter' => 'newpageletter',
7523 'title' => 'recentchanges-label-newpage',
7524 'legend' => 'recentchanges-legend-newpage',
7525 'grouping' => 'any',
7527 'minor' => [
7528 'letter' => 'minoreditletter',
7529 'title' => 'recentchanges-label-minor',
7530 'legend' => 'recentchanges-legend-minor',
7531 'class' => 'minoredit',
7532 'grouping' => 'all',
7534 'bot' => [
7535 'letter' => 'boteditletter',
7536 'title' => 'recentchanges-label-bot',
7537 'legend' => 'recentchanges-legend-bot',
7538 'class' => 'botedit',
7539 'grouping' => 'all',
7541 'unpatrolled' => [
7542 'letter' => 'unpatrolledletter',
7543 'title' => 'recentchanges-label-unpatrolled',
7544 'legend' => 'recentchanges-legend-unpatrolled',
7545 'grouping' => 'any',
7549 /** @} */ # end RC/watchlist }
7551 /************************************************************************//**
7552 * @name Copyright and credits settings
7553 * @{
7557 * Override for copyright metadata.
7559 * This is the name of the page containing information about the wiki's copyright status,
7560 * which will be added as a link in the footer if it is specified. It overrides
7561 * $wgRightsUrl if both are specified.
7563 $wgRightsPage = null;
7566 * Set this to specify an external URL containing details about the content license used on your
7567 * wiki.
7568 * If $wgRightsPage is set then this setting is ignored.
7570 $wgRightsUrl = null;
7573 * If either $wgRightsUrl or $wgRightsPage is specified then this variable gives the text for the
7574 * link. Otherwise, it will be treated as raw HTML.
7575 * If using $wgRightsUrl then this value must be specified. If using $wgRightsPage then the name
7576 * of the page will also be used as the link if this variable is not set.
7578 $wgRightsText = null;
7581 * Override for copyright metadata.
7583 $wgRightsIcon = null;
7586 * Set this to true if you want detailed copyright information forms on Upload.
7588 $wgUseCopyrightUpload = false;
7591 * Set this to the number of authors that you want to be credited below an
7592 * article text. Set it to zero to hide the attribution block, and a negative
7593 * number (like -1) to show all authors. Note that this will require 2-3 extra
7594 * database hits, which can have a not insignificant impact on performance for
7595 * large wikis.
7597 $wgMaxCredits = 0;
7600 * If there are more than $wgMaxCredits authors, show $wgMaxCredits of them.
7601 * Otherwise, link to a separate credits page.
7603 $wgShowCreditsIfMax = true;
7605 /** @} */ # end of copyright and credits settings }
7607 /************************************************************************//**
7608 * @name Import / Export
7609 * @{
7613 * List of interwiki prefixes for wikis we'll accept as sources for
7614 * Special:Import and API action=import. Since complete page history can be
7615 * imported, these should be 'trusted'.
7617 * This can either be a regular array, or an associative map specifying
7618 * subprojects on the interwiki map of the target wiki, or a mix of the two,
7619 * e.g.
7620 * @code
7621 * $wgImportSources = [
7622 * 'wikipedia' => [ 'cs', 'en', 'fr', 'zh' ],
7623 * 'wikispecies',
7624 * 'wikia' => [ 'animanga', 'brickipedia', 'desserts' ],
7625 * ];
7626 * @endcode
7628 * If you have a very complex import sources setup, you can lazy-load it using
7629 * the ImportSources hook.
7631 * If a user has the 'import' permission but not the 'importupload' permission,
7632 * they will only be able to run imports through this transwiki interface.
7634 $wgImportSources = [];
7637 * Optional default target namespace for interwiki imports.
7638 * Can use this to create an incoming "transwiki"-style queue.
7639 * Set to numeric key, not the name.
7641 * Users may override this in the Special:Import dialog.
7643 $wgImportTargetNamespace = null;
7646 * If set to false, disables the full-history option on Special:Export.
7647 * This is currently poorly optimized for long edit histories, so is
7648 * disabled on Wikimedia's sites.
7650 $wgExportAllowHistory = true;
7653 * If set nonzero, Special:Export requests for history of pages with
7654 * more revisions than this will be rejected. On some big sites things
7655 * could get bogged down by very very long pages.
7657 $wgExportMaxHistory = 0;
7660 * Return distinct author list (when not returning full history)
7662 $wgExportAllowListContributors = false;
7665 * If non-zero, Special:Export accepts a "pagelink-depth" parameter
7666 * up to this specified level, which will cause it to include all
7667 * pages linked to from the pages you specify. Since this number
7668 * can become *insanely large* and could easily break your wiki,
7669 * it's disabled by default for now.
7671 * @warning There's a HARD CODED limit of 5 levels of recursion to prevent a
7672 * crazy-big export from being done by someone setting the depth number too
7673 * high. In other words, last resort safety net.
7675 $wgExportMaxLinkDepth = 0;
7678 * Whether to allow the "export all pages in namespace" option
7680 $wgExportFromNamespaces = false;
7683 * Whether to allow exporting the entire wiki into a single file
7685 $wgExportAllowAll = false;
7688 * Maximum number of pages returned by the GetPagesFromCategory and
7689 * GetPagesFromNamespace functions.
7691 * @since 1.27
7693 $wgExportPagelistLimit = 5000;
7695 /** @} */ # end of import/export }
7697 /*************************************************************************//**
7698 * @name Extensions
7699 * @{
7703 * A list of callback functions which are called once MediaWiki is fully
7704 * initialised
7706 $wgExtensionFunctions = [];
7709 * Extension messages files.
7711 * Associative array mapping extension name to the filename where messages can be
7712 * found. The file should contain variable assignments. Any of the variables
7713 * present in languages/messages/MessagesEn.php may be defined, but $messages
7714 * is the most common.
7716 * Variables defined in extensions will override conflicting variables defined
7717 * in the core.
7719 * Since MediaWiki 1.23, use of this variable to define messages is discouraged; instead, store
7720 * messages in JSON format and use $wgMessagesDirs. For setting other variables than
7721 * $messages, $wgExtensionMessagesFiles should still be used. Use a DIFFERENT key because
7722 * any entry having a key that also exists in $wgMessagesDirs will be ignored.
7724 * Extensions using the JSON message format can preserve backward compatibility with
7725 * earlier versions of MediaWiki by using a compatibility shim, such as one generated
7726 * by the generateJsonI18n.php maintenance script, listing it under the SAME key
7727 * as for the $wgMessagesDirs entry.
7729 * @par Example:
7730 * @code
7731 * $wgExtensionMessagesFiles['ConfirmEdit'] = __DIR__.'/ConfirmEdit.i18n.php';
7732 * @endcode
7734 $wgExtensionMessagesFiles = [];
7737 * Extension messages directories.
7739 * Associative array mapping extension name to the path of the directory where message files can
7740 * be found. The message files are expected to be JSON files named for their language code, e.g.
7741 * en.json, de.json, etc. Extensions with messages in multiple places may specify an array of
7742 * message directories.
7744 * Message directories in core should be added to LocalisationCache::getMessagesDirs()
7746 * @par Simple example:
7747 * @code
7748 * $wgMessagesDirs['Example'] = __DIR__ . '/i18n';
7749 * @endcode
7751 * @par Complex example:
7752 * @code
7753 * $wgMessagesDirs['Example'] = [
7754 * __DIR__ . '/lib/ve/i18n',
7755 * __DIR__ . '/lib/ooui/i18n',
7756 * __DIR__ . '/i18n',
7758 * @endcode
7759 * @since 1.23
7761 $wgMessagesDirs = [];
7764 * Array of files with list(s) of extension entry points to be used in
7765 * maintenance/mergeMessageFileList.php
7766 * @since 1.22
7768 $wgExtensionEntryPointListFiles = [];
7771 * Parser output hooks.
7772 * This is an associative array where the key is an extension-defined tag
7773 * (typically the extension name), and the value is a PHP callback.
7774 * These will be called as an OutputPageParserOutput hook, if the relevant
7775 * tag has been registered with the parser output object.
7777 * Registration is done with $pout->addOutputHook( $tag, $data ).
7779 * The callback has the form:
7780 * @code
7781 * function outputHook( $outputPage, $parserOutput, $data ) { ... }
7782 * @endcode
7784 $wgParserOutputHooks = [];
7787 * Whether to include the NewPP limit report as a HTML comment
7789 $wgEnableParserLimitReporting = true;
7792 * List of valid skin names
7794 * The key should be the name in all lower case.
7796 * As of 1.35, the value should be a an array in the form of the ObjectFactory specification.
7798 * For example for 'foobarskin' where the PHP class is 'MediaWiki\Skins\FooBar\FooBarSkin' set:
7800 * @par skin.json Example:
7801 * @code
7802 * "ValidSkinNames": {
7803 * "foobarskin": {
7804 * "displayname": "FooBarSkin",
7805 * "class": "MediaWiki\\Skins\\FooBar\\FooBarSkin"
7808 * @endcode
7810 * Historically, the value was a properly cased name for the skin (and is still currently
7811 * supported). This value will be prefixed with "Skin" to create the class name of the
7812 * skin to load. Use Skin::getSkinNames() as an accessor if you wish to have access to the
7813 * full list.
7815 $wgValidSkinNames = [];
7818 * Special page list. This is an associative array mapping the (canonical) names of
7819 * special pages to either a class name to be instantiated, or a callback to use for
7820 * creating the special page object. In both cases, the result must be an instance of
7821 * SpecialPage.
7823 $wgSpecialPages = [];
7826 * Array mapping class names to filenames, for autoloading.
7828 $wgAutoloadClasses = $wgAutoloadClasses ?? [];
7831 * Switch controlling legacy case-insensitive classloading.
7832 * Do not disable if your wiki must support data created by PHP4, or by
7833 * MediaWiki 1.4 or earlier.
7835 * @deprecated since 1.35
7837 $wgAutoloadAttemptLowercase = false;
7840 * Add information about an installed extension, keyed by its type.
7842 * This is for use from LocalSettings.php and legacy PHP-entrypoint
7843 * extensions. In general, extensions should (only) declare this
7844 * information in their extension.json file.
7846 * The 'name', 'path' and 'author' keys are required.
7848 * @code
7849 * $wgExtensionCredits['other'][] = [
7850 * 'path' => __FILE__,
7851 * 'name' => 'Example extension',
7852 * 'namemsg' => 'exampleextension-name',
7853 * 'author' => [
7854 * 'Foo Barstein',
7855 * ],
7856 * 'version' => '0.0.1',
7857 * 'url' => 'https://example.org/example-extension/',
7858 * 'descriptionmsg' => 'exampleextension-desc',
7859 * 'license-name' => 'GPL-2.0-or-later',
7860 * ];
7861 * @endcode
7863 * The extensions are listed on Special:Version. This page also looks for a file
7864 * named COPYING or LICENSE (optional .txt extension) and provides a link to
7865 * view said file. When the 'license-name' key is specified, this file is
7866 * interpreted as wikitext.
7868 * - $type: One of 'specialpage', 'parserhook', 'variable', 'media', 'antispam',
7869 * 'skin', 'api', or 'other', or any additional types as specified through the
7870 * ExtensionTypes hook as used in SpecialVersion::getExtensionTypes().
7872 * - name: Name of extension as an inline string instead of localizable message.
7873 * Do not omit this even if 'namemsg' is provided, as it is used to override
7874 * the path Special:Version uses to find extension's license info, and is
7875 * required for backwards-compatibility with MediaWiki 1.23 and older.
7877 * - namemsg (since MW 1.24): A message key for a message containing the
7878 * extension's name, if the name is localizable. (For example, skin names
7879 * usually are.)
7881 * - author: A string or an array of strings. Authors can be linked using
7882 * the regular wikitext link syntax. To have an internationalized version of
7883 * "and others" show, add an element "...". This element can also be linked,
7884 * for instance "[https://example ...]".
7886 * - descriptionmsg: A message key or an an array with message key and parameters:
7887 * `'descriptionmsg' => 'exampleextension-desc',`
7889 * - description: Description of extension as an inline string instead of
7890 * localizable message (omit in favour of 'descriptionmsg').
7892 * - license-name: Short name of the license (used as label for the link), such
7893 * as "GPL-2.0-or-later" or "MIT" (https://spdx.org/licenses/ for a list of identifiers).
7895 * @see SpecialVersion::getCredits
7897 $wgExtensionCredits = [];
7900 * Global list of hooks.
7902 * The key is one of the events made available by MediaWiki, you can find
7903 * a description for most of them in docs/hooks.txt. The array is used
7904 * internally by Hook:run().
7906 * The value can be one of:
7908 * - A function name:
7909 * @code
7910 * $wgHooks['event_name'][] = $function;
7911 * @endcode
7912 * - A function with some data:
7913 * @code
7914 * $wgHooks['event_name'][] = [ $function, $data ];
7915 * @endcode
7916 * - A an object method:
7917 * @code
7918 * $wgHooks['event_name'][] = [ $object, 'method' ];
7919 * @endcode
7920 * - A closure:
7921 * @code
7922 * $wgHooks['event_name'][] = function ( $hookParam ) {
7923 * // Handler code goes here.
7924 * };
7925 * @endcode
7927 * @warning You should always append to an event array or you will end up
7928 * deleting a previous registered hook.
7930 * @warning Hook handlers should be registered at file scope. Registering
7931 * handlers after file scope can lead to unexpected results due to caching.
7933 $wgHooks = [];
7936 * List of service wiring files to be loaded by the default instance of MediaWikiServices.
7937 * Each file listed here is expected to return an associative array mapping service names
7938 * to instantiator functions. Extensions may add wiring files to define their own services.
7939 * However, this cannot be used to replace existing services - use the MediaWikiServices
7940 * hook for that.
7942 * @see MediaWikiServices
7943 * @see ServiceContainer::loadWiringFiles() for details on loading service instantiator functions.
7944 * @see docs/Injection.md for an overview of dependency injection in MediaWiki.
7946 $wgServiceWiringFiles = [
7947 __DIR__ . '/ServiceWiring.php'
7951 * Maps jobs to their handlers; extensions
7952 * can add to this to provide custom jobs.
7953 * A job handler should either be a class name to be instantiated,
7954 * or (since 1.30) a callback to use for creating the job object.
7955 * The callback takes (Title, array map of parameters) as arguments.
7957 $wgJobClasses = [
7958 'deletePage' => DeletePageJob::class,
7959 'refreshLinks' => RefreshLinksJob::class,
7960 'deleteLinks' => DeleteLinksJob::class,
7961 'htmlCacheUpdate' => HTMLCacheUpdateJob::class,
7962 'sendMail' => EmaillingJob::class,
7963 'enotifNotify' => EnotifNotifyJob::class,
7964 'fixDoubleRedirect' => DoubleRedirectJob::class,
7965 'AssembleUploadChunks' => AssembleUploadChunksJob::class,
7966 'PublishStashedFile' => PublishStashedFileJob::class,
7967 'ThumbnailRender' => ThumbnailRenderJob::class,
7968 'recentChangesUpdate' => RecentChangesUpdateJob::class,
7969 'refreshLinksPrioritized' => RefreshLinksJob::class,
7970 'refreshLinksDynamic' => RefreshLinksJob::class,
7971 'activityUpdateJob' => ActivityUpdateJob::class,
7972 'categoryMembershipChange' => CategoryMembershipChangeJob::class,
7973 'clearUserWatchlist' => ClearUserWatchlistJob::class,
7974 'watchlistExpiry' => WatchlistExpiryJob::class,
7975 'cdnPurge' => CdnPurgeJob::class,
7976 'userGroupExpiry' => UserGroupExpiryJob::class,
7977 'clearWatchlistNotifications' => ClearWatchlistNotificationsJob::class,
7978 'userOptionsUpdate' => UserOptionsUpdateJob::class,
7979 'revertedTagUpdate' => RevertedTagUpdateJob::class,
7980 'enqueue' => EnqueueJob::class, // local queue for multi-DC setups
7981 'null' => NullJob::class,
7982 'userEditCountInit' => UserEditCountInitJob::class,
7986 * Jobs that must be explicitly requested, i.e. aren't run by job runners unless
7987 * special flags are set. The values here are keys of $wgJobClasses.
7989 * These can be:
7990 * - Very long-running jobs.
7991 * - Jobs that you would never want to run as part of a page rendering request.
7992 * - Jobs that you want to run on specialized machines ( like transcoding, or a particular
7993 * machine on your cluster has 'outside' web access you could restrict uploadFromUrl )
7994 * These settings should be global to all wikis.
7996 $wgJobTypesExcludedFromDefaultQueue = [ 'AssembleUploadChunks', 'PublishStashedFile' ];
7999 * Map of job types to how many job "work items" should be run per second
8000 * on each job runner process. The meaning of "work items" varies per job,
8001 * but typically would be something like "pages to update". A single job
8002 * may have a variable number of work items, as is the case with batch jobs.
8003 * This is used by runJobs.php and not jobs run via $wgJobRunRate.
8004 * These settings should be global to all wikis.
8005 * @var float[]
8007 $wgJobBackoffThrottling = [];
8010 * Make job runners commit changes for replica DB-lag prone jobs one job at a time.
8011 * This is useful if there are many job workers that race on replica DB lag checks.
8012 * If set, jobs taking this many seconds of DB write time have serialized commits.
8014 * Note that affected jobs may have worse lock contention. Also, if they affect
8015 * several DBs at once they may have a smaller chance of being atomic due to the
8016 * possibility of connection loss while queueing up to commit. Affected jobs may
8017 * also fail due to the commit lock acquisition timeout.
8019 * @var float|bool
8020 * @since 1.26
8022 $wgJobSerialCommitThreshold = false;
8025 * Map of job types to configuration arrays.
8026 * This determines which queue class and storage system is used for each job type.
8027 * Job types that do not have explicit configuration will use the 'default' config.
8028 * These settings should be global to all wikis.
8030 $wgJobTypeConf = [
8031 'default' => [ 'class' => JobQueueDB::class, 'order' => 'random', 'claimTTL' => 3600 ],
8035 * Whether to include the number of jobs that are queued
8036 * for the API's maxlag parameter.
8037 * The total number of jobs will be divided by this to get an
8038 * estimated second of maxlag. Typically bots backoff at maxlag=5,
8039 * so setting this to the max number of jobs that should be in your
8040 * queue divided by 5 should have the effect of stopping bots once
8041 * that limit is hit.
8043 * @since 1.29
8045 $wgJobQueueIncludeInMaxLagFactor = false;
8048 * Additional functions to be performed with updateSpecialPages.
8049 * Expensive Querypages are already updated.
8051 $wgSpecialPageCacheUpdates = [
8052 'Statistics' => [ SiteStatsUpdate::class, 'cacheUpdate' ]
8056 * Page property link table invalidation lists. When a page property
8057 * changes, this may require other link tables to be updated (eg
8058 * adding __HIDDENCAT__ means the hiddencat tracking category will
8059 * have been added, so the categorylinks table needs to be rebuilt).
8060 * This array can be added to by extensions.
8062 $wgPagePropLinkInvalidations = [
8063 'hiddencat' => 'categorylinks',
8066 /** @} */ # End extensions }
8068 /*************************************************************************//**
8069 * @name Categories
8070 * @{
8074 * Use experimental, DMOZ-like category browser
8076 $wgUseCategoryBrowser = false;
8079 * On category pages, show thumbnail gallery for images belonging to that
8080 * category instead of listing them as articles.
8082 $wgCategoryMagicGallery = true;
8085 * Paging limit for categories
8087 $wgCategoryPagingLimit = 200;
8090 * Specify how category names should be sorted, when listed on a category page.
8091 * A sorting scheme is also known as a collation.
8093 * Available values are:
8095 * - uppercase: Converts the category name to upper case, and sorts by that.
8097 * - identity: Does no conversion. Sorts by binary value of the string.
8099 * - uca-default: Provides access to the Unicode Collation Algorithm with
8100 * the default element table. This is a compromise collation which sorts
8101 * all languages in a mediocre way. However, it is better than "uppercase".
8103 * To use the uca-default collation, you must have PHP's intl extension
8104 * installed. See https://www.php.net/manual/en/intl.setup.php . The details of the
8105 * resulting collation will depend on the version of ICU installed on the
8106 * server.
8108 * After you change this, you must run maintenance/updateCollation.php to fix
8109 * the sort keys in the database.
8111 * Extensions can define there own collations by subclassing Collation
8112 * and using the Collation::factory hook.
8114 $wgCategoryCollation = 'uppercase';
8116 /** @} */ # End categories }
8118 /*************************************************************************//**
8119 * @name Logging
8120 * @{
8124 * The logging system has two levels: an event type, which describes the
8125 * general category and can be viewed as a named subset of all logs; and
8126 * an action, which is a specific kind of event that can exist in that
8127 * log type.
8129 * Note that code should call LogPage::validTypes() to get a list of valid
8130 * log types instead of checking the global variable.
8132 $wgLogTypes = [
8134 'block',
8135 'protect',
8136 'rights',
8137 'delete',
8138 'upload',
8139 'move',
8140 'import',
8141 'patrol',
8142 'merge',
8143 'suppress',
8144 'tag',
8145 'managetags',
8146 'contentmodel',
8150 * This restricts log access to those who have a certain right
8151 * Users without this will not see it in the option menu and can not view it
8152 * Restricted logs are not added to recent changes
8153 * Logs should remain non-transcludable
8154 * Format: logtype => permissiontype
8156 $wgLogRestrictions = [
8157 'suppress' => 'suppressionlog'
8161 * Show/hide links on Special:Log will be shown for these log types.
8163 * This is associative array of log type => boolean "hide by default"
8165 * See $wgLogTypes for a list of available log types.
8167 * @par Example:
8168 * @code
8169 * $wgFilterLogTypes = [ 'move' => true, 'import' => false ];
8170 * @endcode
8172 * Will display show/hide links for the move and import logs. Move logs will be
8173 * hidden by default unless the link is clicked. Import logs will be shown by
8174 * default, and hidden when the link is clicked.
8176 * A message of the form logeventslist-[type]-log should be added, and will be
8177 * used for the link text.
8179 $wgFilterLogTypes = [
8180 'patrol' => true,
8181 'tag' => true,
8182 'newusers' => false,
8186 * Lists the message key string for each log type. The localized messages
8187 * will be listed in the user interface.
8189 * Extensions with custom log types may add to this array.
8191 * @since 1.19, if you follow the naming convention log-name-TYPE,
8192 * where TYPE is your log type, yoy don't need to use this array.
8194 $wgLogNames = [
8195 '' => 'all-logs-page',
8196 'block' => 'blocklogpage',
8197 'protect' => 'protectlogpage',
8198 'rights' => 'rightslog',
8199 'delete' => 'dellogpage',
8200 'upload' => 'uploadlogpage',
8201 'move' => 'movelogpage',
8202 'import' => 'importlogpage',
8203 'patrol' => 'patrol-log-page',
8204 'merge' => 'mergelog',
8205 'suppress' => 'suppressionlog',
8209 * Lists the message key string for descriptive text to be shown at the
8210 * top of each log type.
8212 * Extensions with custom log types may add to this array.
8214 * @since 1.19, if you follow the naming convention log-description-TYPE,
8215 * where TYPE is your log type, yoy don't need to use this array.
8217 $wgLogHeaders = [
8218 '' => 'alllogstext',
8219 'block' => 'blocklogtext',
8220 'delete' => 'dellogpagetext',
8221 'import' => 'importlogpagetext',
8222 'merge' => 'mergelogpagetext',
8223 'move' => 'movelogpagetext',
8224 'patrol' => 'patrol-log-header',
8225 'protect' => 'protectlogtext',
8226 'rights' => 'rightslogtext',
8227 'suppress' => 'suppressionlogtext',
8228 'upload' => 'uploadlogpagetext',
8232 * Lists the message key string for formatting individual events of each
8233 * type and action when listed in the logs.
8235 * Extensions with custom log types may add to this array.
8237 $wgLogActions = [];
8240 * The same as above, but here values are names of classes,
8241 * not messages.
8242 * @see LogPage::actionText
8243 * @see LogFormatter
8245 $wgLogActionsHandlers = [
8246 'block/block' => BlockLogFormatter::class,
8247 'block/reblock' => BlockLogFormatter::class,
8248 'block/unblock' => BlockLogFormatter::class,
8249 'contentmodel/change' => ContentModelLogFormatter::class,
8250 'contentmodel/new' => ContentModelLogFormatter::class,
8251 'delete/delete' => DeleteLogFormatter::class,
8252 'delete/delete_redir' => DeleteLogFormatter::class,
8253 'delete/event' => DeleteLogFormatter::class,
8254 'delete/restore' => DeleteLogFormatter::class,
8255 'delete/revision' => DeleteLogFormatter::class,
8256 'import/interwiki' => ImportLogFormatter::class,
8257 'import/upload' => ImportLogFormatter::class,
8258 'managetags/activate' => LogFormatter::class,
8259 'managetags/create' => LogFormatter::class,
8260 'managetags/deactivate' => LogFormatter::class,
8261 'managetags/delete' => LogFormatter::class,
8262 'merge/merge' => MergeLogFormatter::class,
8263 'move/move' => MoveLogFormatter::class,
8264 'move/move_redir' => MoveLogFormatter::class,
8265 'patrol/patrol' => PatrolLogFormatter::class,
8266 'patrol/autopatrol' => PatrolLogFormatter::class,
8267 'protect/modify' => ProtectLogFormatter::class,
8268 'protect/move_prot' => ProtectLogFormatter::class,
8269 'protect/protect' => ProtectLogFormatter::class,
8270 'protect/unprotect' => ProtectLogFormatter::class,
8271 'rights/autopromote' => RightsLogFormatter::class,
8272 'rights/rights' => RightsLogFormatter::class,
8273 'suppress/block' => BlockLogFormatter::class,
8274 'suppress/delete' => DeleteLogFormatter::class,
8275 'suppress/event' => DeleteLogFormatter::class,
8276 'suppress/reblock' => BlockLogFormatter::class,
8277 'suppress/revision' => DeleteLogFormatter::class,
8278 'tag/update' => TagLogFormatter::class,
8279 'upload/overwrite' => UploadLogFormatter::class,
8280 'upload/revert' => UploadLogFormatter::class,
8281 'upload/upload' => UploadLogFormatter::class,
8285 * List of log types that can be filtered by action types
8287 * To each action is associated the list of log_action
8288 * subtypes to search for, usually one, but not necessarily so
8289 * Extensions may append to this array
8290 * @since 1.27
8292 $wgActionFilteredLogs = [
8293 'block' => [
8294 'block' => [ 'block' ],
8295 'reblock' => [ 'reblock' ],
8296 'unblock' => [ 'unblock' ],
8298 'contentmodel' => [
8299 'change' => [ 'change' ],
8300 'new' => [ 'new' ],
8302 'delete' => [
8303 'delete' => [ 'delete' ],
8304 'delete_redir' => [ 'delete_redir' ],
8305 'restore' => [ 'restore' ],
8306 'event' => [ 'event' ],
8307 'revision' => [ 'revision' ],
8309 'import' => [
8310 'interwiki' => [ 'interwiki' ],
8311 'upload' => [ 'upload' ],
8313 'managetags' => [
8314 'create' => [ 'create' ],
8315 'delete' => [ 'delete' ],
8316 'activate' => [ 'activate' ],
8317 'deactivate' => [ 'deactivate' ],
8319 'move' => [
8320 'move' => [ 'move' ],
8321 'move_redir' => [ 'move_redir' ],
8323 'newusers' => [
8324 'create' => [ 'create', 'newusers' ],
8325 'create2' => [ 'create2' ],
8326 'autocreate' => [ 'autocreate' ],
8327 'byemail' => [ 'byemail' ],
8329 'protect' => [
8330 'protect' => [ 'protect' ],
8331 'modify' => [ 'modify' ],
8332 'unprotect' => [ 'unprotect' ],
8333 'move_prot' => [ 'move_prot' ],
8335 'rights' => [
8336 'rights' => [ 'rights' ],
8337 'autopromote' => [ 'autopromote' ],
8339 'suppress' => [
8340 'event' => [ 'event' ],
8341 'revision' => [ 'revision' ],
8342 'delete' => [ 'delete' ],
8343 'block' => [ 'block' ],
8344 'reblock' => [ 'reblock' ],
8346 'upload' => [
8347 'upload' => [ 'upload' ],
8348 'overwrite' => [ 'overwrite' ],
8349 'revert' => [ 'revert' ],
8354 * Maintain a log of newusers at Special:Log/newusers?
8356 $wgNewUserLog = true;
8359 * Maintain a log of page creations at Special:Log/create?
8360 * @since 1.32
8362 $wgPageCreationLog = true;
8364 /** @} */ # end logging }
8366 /*************************************************************************//**
8367 * @name Special pages (general and miscellaneous)
8368 * @{
8372 * Allow special page inclusions such as {{Special:Allpages}}
8374 $wgAllowSpecialInclusion = true;
8377 * Set this to an array of special page names to prevent
8378 * maintenance/updateSpecialPages.php from updating those pages.
8379 * Mapping each special page name to an run mode like 'periodical' if a cronjob is set up.
8381 $wgDisableQueryPageUpdate = false;
8384 * On Special:Unusedimages, consider images "used", if they are put
8385 * into a category. Default (false) is not to count those as used.
8387 $wgCountCategorizedImagesAsUsed = false;
8390 * Maximum number of links to a redirect page listed on
8391 * Special:Whatlinkshere/RedirectDestination
8393 $wgMaxRedirectLinksRetrieved = 500;
8395 /** @} */ # end special pages }
8397 /*************************************************************************//**
8398 * @name Actions
8399 * @{
8403 * Array of allowed values for the "title=foo&action=<action>" parameter. Syntax is:
8404 * 'foo' => 'ClassName' Load the specified class which subclasses Action
8405 * 'foo' => true Load the class FooAction which subclasses Action
8406 * If something is specified in the getActionOverrides()
8407 * of the relevant Page object it will be used
8408 * instead of the default class.
8409 * 'foo' => false The action is disabled; show an error message
8410 * Unsetting core actions will probably cause things to complain loudly.
8412 $wgActions = [
8413 'credits' => true,
8414 'delete' => true,
8415 'edit' => true,
8416 'editchangetags' => SpecialPageAction::class,
8417 'history' => true,
8418 'info' => true,
8419 'markpatrolled' => true,
8420 'mcrundo' => McrUndoAction::class,
8421 'mcrrestore' => McrRestoreAction::class,
8422 'protect' => true,
8423 'purge' => true,
8424 'raw' => true,
8425 'render' => true,
8426 'revert' => true,
8427 'revisiondelete' => SpecialPageAction::class,
8428 'rollback' => true,
8429 'submit' => true,
8430 'unprotect' => true,
8431 'unwatch' => true,
8432 'view' => true,
8433 'watch' => true,
8436 /** @} */ # end actions }
8438 /*************************************************************************//**
8439 * @name Robot (search engine crawler) policy
8440 * See also $wgNoFollowLinks.
8441 * @{
8445 * Default robot policy. The default policy is to encourage indexing and fol-
8446 * lowing of links. It may be overridden on a per-namespace and/or per-page
8447 * basis.
8449 $wgDefaultRobotPolicy = 'index,follow';
8452 * Robot policies per namespaces. The default policy is given above, the array
8453 * is made of namespace constants as defined in includes/Defines.php. You can-
8454 * not specify a different default policy for NS_SPECIAL: it is always noindex,
8455 * nofollow. This is because a number of special pages (e.g., ListPages) have
8456 * many permutations of options that display the same data under redundant
8457 * URLs, so search engine spiders risk getting lost in a maze of twisty special
8458 * pages, all alike, and never reaching your actual content.
8460 * @par Example:
8461 * @code
8462 * $wgNamespaceRobotPolicies = [ NS_TALK => 'noindex' ];
8463 * @endcode
8465 $wgNamespaceRobotPolicies = [];
8468 * Robot policies per article. These override the per-namespace robot policies.
8469 * Must be in the form of an array where the key part is a properly canonicalised
8470 * text form title and the value is a robot policy.
8472 * @par Example:
8473 * @code
8474 * $wgArticleRobotPolicies = [
8475 * 'Main Page' => 'noindex,follow',
8476 * 'User:Bob' => 'index,follow',
8477 * ];
8478 * @endcode
8480 * @par Example that DOES NOT WORK because the names are not canonical text
8481 * forms:
8482 * @code
8483 * $wgArticleRobotPolicies = [
8484 * # Underscore, not space!
8485 * 'Main_Page' => 'noindex,follow',
8486 * # "Project", not the actual project name!
8487 * 'Project:X' => 'index,follow',
8488 * # Needs to be "Abc", not "abc" (unless $wgCapitalLinks is false for that namespace)!
8489 * 'abc' => 'noindex,nofollow'
8490 * ];
8491 * @endcode
8493 $wgArticleRobotPolicies = [];
8496 * An array of namespace keys in which the __INDEX__/__NOINDEX__ magic words
8497 * will not function, so users can't decide whether pages in that namespace are
8498 * indexed by search engines. If set to null, default to $wgContentNamespaces.
8500 * @par Example:
8501 * @code
8502 * $wgExemptFromUserRobotsControl = [ NS_MAIN, NS_TALK, NS_PROJECT ];
8503 * @endcode
8505 $wgExemptFromUserRobotsControl = null;
8507 /** @} */ # End robot policy }
8509 /************************************************************************//**
8510 * @name AJAX, Action API and REST API
8511 * Note: The AJAX entry point which this section refers to is gradually being
8512 * replaced by the Action API entry point, api.php. They are essentially
8513 * equivalent. Both of them are used for dynamic client-side features, via XHR.
8514 * @{
8518 * WARNING: SECURITY THREAT - debug use only
8520 * Disables many security checks in the API for debugging purposes.
8521 * This flag should never be used on the production servers, as it introduces
8522 * a number of potential security holes. Even when enabled, the validation
8523 * will still be performed, but instead of failing, API will return a warning.
8524 * Also, there will always be a warning notifying that this flag is set.
8525 * At this point, the flag allows GET requests to go through for modules
8526 * requiring POST.
8528 * @since 1.21
8530 $wgDebugAPI = false;
8533 * API module extensions.
8535 * Associative array mapping module name to modules specs;
8536 * Each module spec is an associative array containing at least
8537 * the 'class' key for the module's class, and optionally a
8538 * 'factory' key for the factory function to use for the module.
8540 * That factory function will be called with two parameters,
8541 * the parent module (an instance of ApiBase, usually ApiMain)
8542 * and the name the module was registered under. The return
8543 * value must be an instance of the class given in the 'class'
8544 * field.
8546 * For backward compatibility, the module spec may also be a
8547 * simple string containing the module's class name. In that
8548 * case, the class' constructor will be called with the parent
8549 * module and module name as parameters, as described above.
8551 * Examples for registering API modules:
8553 * @code
8554 * $wgAPIModules['foo'] = 'ApiFoo';
8555 * $wgAPIModules['bar'] = [
8556 * 'class' => ApiBar::class,
8557 * 'factory' => function( $main, $name ) { ... }
8558 * ];
8559 * $wgAPIModules['xyzzy'] = [
8560 * 'class' => ApiXyzzy::class,
8561 * 'factory' => [ XyzzyFactory::class, 'newApiModule' ]
8562 * ];
8563 * @endcode
8565 * Extension modules may override the core modules.
8566 * See ApiMain::$Modules for a list of the core modules.
8568 $wgAPIModules = [];
8571 * API format module extensions.
8572 * Associative array mapping format module name to module specs (see $wgAPIModules).
8573 * Extension modules may override the core modules.
8575 * See ApiMain::$Formats for a list of the core format modules.
8577 $wgAPIFormatModules = [];
8580 * API Query meta module extensions.
8581 * Associative array mapping meta module name to module specs (see $wgAPIModules).
8582 * Extension modules may override the core modules.
8584 * See ApiQuery::$QueryMetaModules for a list of the core meta modules.
8586 $wgAPIMetaModules = [];
8589 * API Query prop module extensions.
8590 * Associative array mapping prop module name to module specs (see $wgAPIModules).
8591 * Extension modules may override the core modules.
8593 * See ApiQuery::$QueryPropModules for a list of the core prop modules.
8595 $wgAPIPropModules = [];
8598 * API Query list module extensions.
8599 * Associative array mapping list module name to module specs (see $wgAPIModules).
8600 * Extension modules may override the core modules.
8602 * See ApiQuery::$QueryListModules for a list of the core list modules.
8604 $wgAPIListModules = [];
8607 * Maximum amount of rows to scan in a DB query in the API
8608 * The default value is generally fine
8610 $wgAPIMaxDBRows = 5000;
8613 * The maximum size (in bytes) of an API result.
8614 * @warning Do not set this lower than $wgMaxArticleSize*1024
8616 $wgAPIMaxResultSize = 8388608;
8619 * The maximum number of uncached diffs that can be retrieved in one API
8620 * request. Set this to 0 to disable API diffs altogether
8622 $wgAPIMaxUncachedDiffs = 1;
8625 * Maximum amount of DB lag on a majority of DB replica DBs to tolerate
8626 * before forcing bots to retry any write requests via API errors.
8627 * This should be lower than the 'max lag' value in $wgLBFactoryConf.
8629 $wgAPIMaxLagThreshold = 7;
8632 * Log file or URL (TCP or UDP) to log API requests to, or false to disable
8633 * API request logging
8635 $wgAPIRequestLog = false;
8638 * Set the timeout for the API help text cache. If set to 0, caching disabled
8640 $wgAPICacheHelpTimeout = 60 * 60;
8643 * The ApiQueryQueryPages module should skip pages that are redundant to true
8644 * API queries.
8646 $wgAPIUselessQueryPages = [
8647 'MIMEsearch', // aiprop=mime
8648 'LinkSearch', // list=exturlusage
8649 'FileDuplicateSearch', // prop=duplicatefiles
8653 * Enable AJAX framework
8655 * @deprecated (officially) since MediaWiki 1.31 and ignored since 1.32
8657 $wgUseAjax = true;
8660 * List of Ajax-callable functions.
8661 * Extensions acting as Ajax callbacks must register here
8662 * @deprecated (officially) since 1.27; use the API instead
8664 $wgAjaxExportList = [];
8667 * Enable AJAX check for file overwrite, pre-upload
8669 $wgAjaxUploadDestCheck = true;
8672 * Enable previewing licences via AJAX.
8674 $wgAjaxLicensePreview = true;
8677 * Have clients send edits to be prepared when filling in edit summaries.
8678 * This gives the server a head start on the expensive parsing operation.
8680 $wgAjaxEditStash = true;
8683 * Settings for incoming cross-site AJAX requests:
8684 * Newer browsers support cross-site AJAX when the target resource allows requests
8685 * from the origin domain by the Access-Control-Allow-Origin header.
8686 * This is currently only used by the API (requests to api.php)
8687 * $wgCrossSiteAJAXdomains can be set using a wildcard syntax:
8689 * - '*' matches any number of characters
8690 * - '?' matches any 1 character
8692 * @par Example:
8693 * @code
8694 * $wgCrossSiteAJAXdomains = [
8695 * 'www.mediawiki.org',
8696 * '*.wikipedia.org',
8697 * '*.wikimedia.org',
8698 * '*.wiktionary.org',
8699 * ];
8700 * @endcode
8702 $wgCrossSiteAJAXdomains = [];
8705 * Domains that should not be allowed to make AJAX requests,
8706 * even if they match one of the domains allowed by $wgCrossSiteAJAXdomains
8707 * Uses the same syntax as $wgCrossSiteAJAXdomains
8709 $wgCrossSiteAJAXdomainExceptions = [];
8712 * List of allowed headers for cross-origin API requests.
8714 $wgAllowedCorsHeaders = [
8715 /* simple headers (see spec) */
8716 'Accept',
8717 'Accept-Language',
8718 'Content-Language',
8719 'Content-Type',
8720 /* non-authorable headers in XHR, which are however requested by some UAs */
8721 'Accept-Encoding',
8722 'DNT',
8723 'Origin',
8724 /* MediaWiki whitelist */
8725 'User-Agent',
8726 'Api-User-Agent',
8730 * Enable the experimental REST API.
8732 * @deprecated Since 1.35, defaults to true and is ignored by MediaWiki core itself.
8733 * No longer functions as a setting. Will be removed in 1.36.
8735 $wgEnableRestAPI = true;
8738 * Additional REST API Route files.
8740 * A common usage is to enable development/experimental endpoints only on test wikis.
8742 $wgRestAPIAdditionalRouteFiles = [];
8744 /** @} */ # End AJAX and API }
8746 /************************************************************************//**
8747 * @name Shell and process control
8748 * @{
8752 * Maximum amount of virtual memory available to shell processes under linux, in KB.
8754 $wgMaxShellMemory = 307200;
8757 * Maximum file size created by shell processes under linux, in KB
8758 * ImageMagick convert for example can be fairly hungry for scratch space
8760 $wgMaxShellFileSize = 102400;
8763 * Maximum CPU time in seconds for shell processes under Linux
8765 $wgMaxShellTime = 180;
8768 * Maximum wall clock time (i.e. real time, of the kind the clock on the wall
8769 * would measure) in seconds for shell processes under Linux
8771 $wgMaxShellWallClockTime = 180;
8774 * Under Linux: a cgroup directory used to constrain memory usage of shell
8775 * commands. The directory must be writable by the user which runs MediaWiki.
8777 * If specified, this is used instead of ulimit, which is inaccurate, and
8778 * causes malloc() to return NULL, which exposes bugs in C applications, making
8779 * them segfault or deadlock.
8781 * A wrapper script will create a cgroup for each shell command that runs, as
8782 * a subgroup of the specified cgroup. If the memory limit is exceeded, the
8783 * kernel will send a SIGKILL signal to a process in the subgroup.
8785 * @par Example:
8786 * @code
8787 * mkdir -p /sys/fs/cgroup/memory/mediawiki
8788 * mkdir -m 0777 /sys/fs/cgroup/memory/mediawiki/job
8789 * echo '$wgShellCgroup = "/sys/fs/cgroup/memory/mediawiki/job";' >> LocalSettings.php
8790 * @endcode
8792 * The reliability of cgroup cleanup can be improved by installing a
8793 * notify_on_release script in the root cgroup, see e.g.
8794 * https://gerrit.wikimedia.org/r/#/c/40784
8796 $wgShellCgroup = false;
8799 * Executable path of the PHP cli binary. Should be set up on install.
8801 $wgPhpCli = '/usr/bin/php';
8804 * Locale for LC_ALL, to provide a known environment for locale-sensitive operations
8806 * For Unix-like operating systems, this should be set to C.UTF-8 or an
8807 * equivalent to provide the most consistent behavior for locale-sensitive
8808 * C library operations across different-language wikis. If that locale is not
8809 * available, use another locale that has a UTF-8 character set.
8811 * This setting mainly affects the behavior of C library functions, including:
8812 * - String collation (order when sorting using locale-sensitive comparison)
8813 * - For example, whether "Å" and "A" are considered to be the same letter or
8814 * different letters and if different whether it comes after "A" or after
8815 * "Z", and whether sorting is case sensitive.
8816 * - String character set (how characters beyond basic ASCII are represented)
8817 * - We need this to be a UTF-8 character set to work around
8818 * https://bugs.php.net/bug.php?id=45132
8819 * - Language used for low-level error messages.
8820 * - Formatting of date/time and numeric values (e.g. '.' versus ',' as the
8821 * decimal separator)
8823 * MediaWiki provides its own methods and classes to perform many
8824 * locale-sensitive operations, which are designed to be able to vary locale
8825 * based on wiki language or user preference:
8826 * - MediaWiki's Collation class should generally be used instead of the C
8827 * library collation functions when locale-sensitive sorting is needed.
8828 * - MediaWiki's Message class should be used for localization of messages
8829 * displayed to the user.
8830 * - MediaWiki's Language class should be used for formatting numeric and
8831 * date/time values.
8833 * @note If multiple wikis are being served from the same process (e.g. the
8834 * same fastCGI or Apache server), this setting must be the same on all those
8835 * wikis.
8837 $wgShellLocale = 'C.UTF-8';
8840 * Method to use to restrict shell commands
8842 * Supported options:
8843 * - 'autodetect': Autodetect if any restriction methods are available
8844 * - 'firejail': Use firejail <https://firejail.wordpress.com/>
8845 * - false: Don't use any restrictions
8847 * @note If using firejail with MediaWiki running in a home directory different
8848 * from the webserver user, firejail 0.9.44+ is required.
8850 * @since 1.31
8851 * @var string|bool
8853 $wgShellRestrictionMethod = 'autodetect';
8855 /** @} */ # End shell }
8857 /************************************************************************//**
8858 * @name HTTP client
8859 * @{
8863 * Timeout for HTTP requests done internally, in seconds.
8865 * @since 1.5
8866 * @var float|int
8868 $wgHTTPTimeout = 25;
8871 * Timeout for connections done internally (in seconds).
8873 * Only supported if cURL is installed, ignored otherwise.
8875 * @since 1.22
8876 * @var float|int
8878 $wgHTTPConnectTimeout = 5.0;
8881 * The maximum HTTP request timeout in seconds. If any specified or configured
8882 * request timeout is larger than this, then this value will be used instead.
8884 * @since 1.35
8885 * @var float|int
8887 $wgHTTPMaxTimeout = INF;
8890 * The maximum HTTP connect timeout in seconds. If any specified or configured
8891 * connect timeout is larger than this, then this value will be used instead.
8893 * @since 1.35
8894 * @var float|int
8896 $wgHTTPMaxConnectTimeout = INF;
8899 * Timeout for HTTP requests done internally for transwiki imports, in seconds.
8900 * @since 1.29
8902 $wgHTTPImportTimeout = 25;
8905 * Timeout for Asynchronous (background) HTTP requests, in seconds.
8907 $wgAsyncHTTPTimeout = 25;
8910 * Proxy to use for CURL requests.
8912 $wgHTTPProxy = '';
8915 * Local virtual hosts.
8917 * This lists domains that are configured as virtual hosts on the same machine.
8919 * This affects the following:
8920 * - MWHttpRequest: If a request is to be made to a domain listed here, or any
8921 * subdomain thereof, then no proxy will be used.
8922 * Command-line scripts are not affected by this setting and will always use
8923 * the proxy if it is configured.
8925 * @since 1.25
8927 $wgLocalVirtualHosts = [];
8930 * Whether to respect/honour the request ID provided by the incoming request
8931 * via the `X-Request-Id` header. Set to `true` if the entity sitting in front
8932 * of Mediawiki sanitises external requests. Default: `false`.
8934 $wgAllowExternalReqID = false;
8936 /** @} */ # End HTTP client }
8938 /************************************************************************//**
8939 * @name Job queue
8940 * @{
8944 * Number of jobs to perform per request. May be less than one in which case
8945 * jobs are performed probabalistically. If this is zero, jobs will not be done
8946 * during ordinary apache requests. In this case, maintenance/runJobs.php should
8947 * be run periodically.
8949 $wgJobRunRate = 1;
8952 * When $wgJobRunRate > 0, try to run jobs asynchronously, spawning a new process
8953 * to handle the job execution, instead of blocking the request until the job
8954 * execution finishes.
8956 * @since 1.23
8958 $wgRunJobsAsync = false;
8961 * Number of rows to update per job
8963 $wgUpdateRowsPerJob = 300;
8966 * Number of rows to update per query
8968 $wgUpdateRowsPerQuery = 100;
8970 /** @} */ # End job queue }
8972 /************************************************************************//**
8973 * @name Miscellaneous
8974 * @{
8978 * Specify the difference engine to use.
8980 * Supported values:
8981 * - 'external': Use an external diff engine, which must be specified via $wgExternalDiffEngine
8982 * - 'wikidiff2': Use the wikidiff2 PHP extension
8983 * - 'php': PHP implementations included in MediaWiki
8985 * The default (null) is to use the first engine that's available.
8987 * @since 1.35
8988 * @var string|null
8990 $wgDiffEngine = null;
8993 * Name of the external diff engine to use.
8994 * @var string|false Path to an external diff executable
8996 $wgExternalDiffEngine = false;
8999 * Disable redirects to special pages and interwiki redirects, which use a 302
9000 * and have no "redirected from" link.
9002 * @note This is only for articles with #REDIRECT in them. URL's containing a
9003 * local interwiki prefix (or a non-canonical special page name) are still hard
9004 * redirected regardless of this setting.
9006 $wgDisableHardRedirects = false;
9009 * LinkHolderArray batch size
9010 * For debugging
9012 $wgLinkHolderBatchSize = 1000;
9015 * By default MediaWiki does not register links pointing to same server in
9016 * externallinks dataset, use this value to override:
9018 $wgRegisterInternalExternals = false;
9021 * Maximum number of pages to move at once when moving subpages with a page.
9023 $wgMaximumMovedPages = 100;
9026 * Fix double redirects after a page move.
9027 * Tends to conflict with page move vandalism, use only on a private wiki.
9029 $wgFixDoubleRedirects = false;
9032 * Allow redirection to another page when a user logs in.
9033 * To enable, set to a string like 'Main Page'
9035 $wgRedirectOnLogin = null;
9038 * Configuration for processing pool control, for use in high-traffic wikis.
9039 * An implementation is provided in the PoolCounter extension.
9041 * This configuration array maps pool types to an associative array. The only
9042 * defined key in the associative array is "class", which gives the class name.
9043 * The remaining elements are passed through to the class as constructor
9044 * parameters.
9046 * @par Example using local redis instance:
9047 * @code
9048 * $wgPoolCounterConf = [ 'ArticleView' => [
9049 * 'class' => PoolCounterRedis::class,
9050 * 'timeout' => 15, // wait timeout in seconds
9051 * 'workers' => 1, // maximum number of active threads in each pool
9052 * 'maxqueue' => 5, // maximum number of total threads in each pool
9053 * 'servers' => [ '127.0.0.1' ],
9054 * 'redisConfig' => []
9055 * ] ];
9056 * @endcode
9058 * @par Example using C daemon from https://www.mediawiki.org/wiki/Extension:PoolCounter:
9059 * @code
9060 * $wgPoolCounterConf = [ 'ArticleView' => [
9061 * 'class' => PoolCounter_Client::class,
9062 * 'timeout' => 15, // wait timeout in seconds
9063 * 'workers' => 5, // maximum number of active threads in each pool
9064 * 'maxqueue' => 50, // maximum number of total threads in each pool
9065 * ... any extension-specific options...
9066 * ] ];
9067 * @endcode
9069 $wgPoolCounterConf = null;
9072 * To disable file delete/restore temporarily
9074 $wgUploadMaintenance = false;
9077 * Associative array mapping namespace IDs to the name of the content model pages in that namespace
9078 * should have by default (use the CONTENT_MODEL_XXX constants). If no special content type is
9079 * defined for a given namespace, pages in that namespace will use the CONTENT_MODEL_WIKITEXT
9080 * (except for the special case of JS and CS pages).
9082 * @note To determine the default model for a new page's main slot, or any slot in general,
9083 * use SlotRoleHandler::getDefaultModel() together with SlotRoleRegistry::getRoleHandler().
9085 * @since 1.21
9087 $wgNamespaceContentModels = [];
9090 * How to react if a plain text version of a non-text Content object is requested using
9091 * ContentHandler::getContentText():
9093 * * 'ignore': return null
9094 * * 'fail': throw an MWException
9095 * * 'serialize': serialize to default format
9097 * @since 1.21
9099 $wgContentHandlerTextFallback = 'ignore';
9102 * Determines which types of text are parsed as wikitext. This does not imply that these kinds
9103 * of texts are also rendered as wikitext, it only means that links, magic words, etc will have
9104 * the effect on the database they would have on a wikitext page.
9106 * @todo On the long run, it would be nice to put categories etc into a separate structure,
9107 * or at least parse only the contents of comments in the scripts.
9109 * @since 1.21
9111 $wgTextModelsToParse = [
9112 CONTENT_MODEL_WIKITEXT, // Just for completeness, wikitext will always be parsed.
9113 CONTENT_MODEL_JAVASCRIPT, // Make categories etc work, people put them into comments.
9114 CONTENT_MODEL_CSS, // Make categories etc work, people put them into comments.
9118 * Register handlers for specific types of sites.
9120 * @since 1.21
9122 $wgSiteTypes = [
9123 'mediawiki' => MediaWikiSite::class,
9127 * Whether the page_props table has a pp_sortkey column. Set to false in case
9128 * the respective database schema change was not applied.
9129 * @since 1.23
9131 $wgPagePropsHaveSortkey = true;
9134 * Secret for session storage.
9135 * This should be set in LocalSettings.php, otherwise $wgSecretKey will
9136 * be used.
9137 * @since 1.27
9139 $wgSessionSecret = false;
9142 * If for some reason you can't install the PHP OpenSSL extension,
9143 * you can set this to true to make MediaWiki work again at the cost of storing
9144 * sensitive session data insecurely. But it would be much more secure to just
9145 * install the OpenSSL extension.
9146 * @since 1.27
9148 $wgSessionInsecureSecrets = false;
9151 * Secret for hmac-based key derivation function (fast,
9152 * cryptographically secure random numbers).
9153 * This should be set in LocalSettings.php, otherwise $wgSecretKey will
9154 * be used.
9155 * See also: $wgHKDFAlgorithm
9156 * @since 1.24
9158 $wgHKDFSecret = false;
9161 * Algorithm for hmac-based key derivation function (fast,
9162 * cryptographically secure random numbers).
9163 * See also: $wgHKDFSecret
9164 * @since 1.24
9166 $wgHKDFAlgorithm = 'sha256';
9169 * Enable page language feature
9170 * Allows setting page language in database
9171 * @var bool
9172 * @since 1.24
9174 $wgPageLanguageUseDB = false;
9177 * Global configuration variable for Virtual REST Services.
9179 * Use the 'path' key to define automatically mounted services. The value for this
9180 * key is a map of path prefixes to service configuration. The latter is an array of:
9181 * - class : the fully qualified class name
9182 * - options : map of arguments to the class constructor
9183 * Such services will be available to handle queries under their path from the VRS
9184 * singleton, e.g. MediaWikiServices::getInstance()->getVirtualRESTServiceClient();
9186 * Auto-mounting example for Parsoid:
9188 * $wgVirtualRestConfig['paths']['/parsoid/'] = [
9189 * 'class' => ParsoidVirtualRESTService::class,
9190 * 'options' => [
9191 * 'url' => 'http://localhost:8000',
9192 * 'prefix' => 'enwiki',
9193 * 'domain' => 'en.wikipedia.org'
9195 * ];
9197 * Parameters for different services can also be declared inside the 'modules' value,
9198 * which is to be treated as an associative array. The parameters in 'global' will be
9199 * merged with service-specific ones. The result will then be passed to
9200 * VirtualRESTService::__construct() in the module.
9202 * Example config for Parsoid:
9204 * $wgVirtualRestConfig['modules']['parsoid'] = [
9205 * 'url' => 'http://localhost:8000',
9206 * 'prefix' => 'enwiki',
9207 * 'domain' => 'en.wikipedia.org',
9208 * ];
9210 * @var array
9211 * @since 1.25
9213 $wgVirtualRestConfig = [
9214 'paths' => [],
9215 'modules' => [],
9216 'global' => [
9217 # Timeout in seconds
9218 'timeout' => 360,
9219 # 'domain' is set to $wgCanonicalServer in Setup.php
9220 'forwardCookies' => false,
9221 'HTTPProxy' => null
9226 * Controls whether zero-result search queries with suggestions should display results for
9227 * these suggestions.
9229 * @var bool
9230 * @since 1.26
9232 $wgSearchRunSuggestedQuery = true;
9235 * Max time (in seconds) a user-generated transaction can spend in writes.
9236 * If exceeded, the transaction is rolled back with an error instead of being committed.
9238 * @var int|bool Disabled if false
9239 * @since 1.27
9241 $wgMaxUserDBWriteDuration = false;
9244 * Max time (in seconds) a job-generated transaction can spend in writes.
9245 * If exceeded, the transaction is rolled back with an error instead of being committed.
9247 * @var int|bool Disabled if false
9248 * @since 1.30
9250 $wgMaxJobDBWriteDuration = false;
9253 * Controls Content-Security-Policy header [Experimental]
9255 * @see https://www.w3.org/TR/CSP2/
9256 * @since 1.32
9257 * @var bool|array true to send default version, false to not send.
9258 * If an array, can have parameters:
9259 * 'default-src' If true or array (of additional urls) will set a default-src
9260 * directive, which limits what places things can load from. If false or not
9261 * set, will send a default-src directive allowing all sources.
9262 * 'includeCORS' If true or not set, will include urls from
9263 * $wgCrossSiteAJAXdomains as an allowed load sources.
9264 * 'unsafeFallback' Add unsafe-inline as a script source, as a fallback for
9265 * browsers that do not understand nonce-sources [default on].
9266 * 'useNonces' Require nonces on all inline scripts. If disabled and 'unsafeFallback'
9267 * is on, then all inline scripts will be allowed [default true].
9268 * 'script-src' Array of additional places that are allowed to have JS be loaded from.
9269 * 'object-src' Array or string of where to load objects from. unset/true means 'none'.
9270 * False means omit. (Since 1.35)
9271 * 'report-uri' true to use MW api [default], false to disable, string for alternate uri
9272 * @warning May cause slowness on windows due to slow random number generator.
9274 $wgCSPHeader = false;
9277 * Controls Content-Security-Policy-Report-Only header
9279 * @since 1.32
9280 * @var bool|array Same as $wgCSPHeader
9282 $wgCSPReportOnlyHeader = false;
9285 * List of messages which might contain raw HTML.
9286 * Extensions should add their insecure raw HTML messages to extension.json.
9287 * The list is used for access control:
9288 * changing messages listed here will require editsitecss and editsitejs rights.
9290 * Message names must be given with underscores rather than spaces and with lowercase first letter.
9292 * @since 1.32
9293 * @var string[]
9295 $wgRawHtmlMessages = [
9296 'copyright',
9297 'history_copyright',
9298 'googlesearch',
9299 'feedback-terms',
9300 'feedback-termsofuse',
9304 * Mapping of event channels (or channel categories) to EventRelayer configuration.
9306 * By setting up a PubSub system (like Kafka) and enabling a corresponding EventRelayer class
9307 * that uses it, MediaWiki can broadcast events to all subscribers. Certain features like WAN
9308 * cache purging and CDN cache purging will emit events to this system. Appropriate listers can
9309 * subscribe to the channel and take actions based on the events. For example, a local daemon
9310 * can run on each CDN cache node and perform local purges based on the URL purge channel events.
9312 * Some extensions may want to use "channel categories" so that different channels can also share
9313 * the same custom relayer instance (e.g. when it's likely to be overriden). They can use
9314 * EventRelayerGroup::getRelayer() based on the category but call notify() on various different
9315 * actual channels. One reason for this would be that some system have very different performance
9316 * vs durability needs, so one system (e.g. Kafka) may not be suitable for all uses.
9318 * The 'default' key is for all channels (or channel categories) without an explicit entry here.
9320 * @since 1.27
9322 $wgEventRelayerConfig = [
9323 'default' => [
9324 'class' => EventRelayerNull::class,
9329 * Share data about this installation with MediaWiki developers
9331 * When set to true, MediaWiki will periodically ping https://www.mediawiki.org/ with basic
9332 * data about this MediaWiki instance. This data includes, for example, the type of system,
9333 * PHP version, and chosen database backend. The Wikimedia Foundation shares this data with
9334 * MediaWiki developers to help guide future development efforts.
9336 * For details about what data is sent, see: https://www.mediawiki.org/wiki/Manual:$wgPingback
9338 * @var bool
9339 * @since 1.28
9341 $wgPingback = false;
9344 * List of urls which appear often to be triggering CSP reports
9345 * but do not appear to be caused by actual content, but by client
9346 * software inserting scripts (i.e. Ad-Ware).
9347 * List based on results from Wikimedia logs.
9349 * @since 1.28
9351 $wgCSPFalsePositiveUrls = [
9352 'https://3hub.co' => true,
9353 'https://morepro.info' => true,
9354 'https://p.ato.mx' => true,
9355 'https://s.ato.mx' => true,
9356 'https://adserver.adtech.de' => true,
9357 'https://ums.adtechus.com' => true,
9358 'https://cas.criteo.com' => true,
9359 'https://cat.nl.eu.criteo.com' => true,
9360 'https://atpixel.alephd.com' => true,
9361 'https://rtb.metrigo.com' => true,
9362 'https://d5p.de17a.com' => true,
9363 'https://ad.lkqd.net/vpaid/vpaid.js' => true,
9364 'https://ad.lkqd.net/vpaid/vpaid.js?fusion=1.0' => true,
9365 'https://t.lkqd.net/t' => true,
9366 'chrome-extension' => true,
9370 * Shortest CIDR limits that can be checked in any individual range check
9371 * at Special:Contributions.
9373 * @var array
9374 * @since 1.30
9376 $wgRangeContributionsCIDRLimit = [
9377 'IPv4' => 16,
9378 'IPv6' => 32,
9382 * The following variables define 3 user experience levels:
9384 * - newcomer: has not yet reached the 'learner' level
9386 * - learner: has at least $wgLearnerEdits and has been
9387 * a member for $wgLearnerMemberSince days
9388 * but has not yet reached the 'experienced' level.
9390 * - experienced: has at least $wgExperiencedUserEdits edits and
9391 * has been a member for $wgExperiencedUserMemberSince days.
9393 $wgLearnerEdits = 10;
9394 $wgLearnerMemberSince = 4; # days
9395 $wgExperiencedUserEdits = 500;
9396 $wgExperiencedUserMemberSince = 30; # days
9399 * Mapping of interwiki index prefixes to descriptors that
9400 * can be used to change the display of interwiki search results.
9402 * Descriptors are appended to CSS classes of interwiki results
9403 * which using InterwikiSearchResultWidget.
9405 * Predefined descriptors include the following words:
9406 * definition, textbook, news, quotation, book, travel, course
9408 * @par Example:
9409 * @code
9410 * $wgInterwikiPrefixDisplayTypes = [
9411 * 'iwprefix' => 'definition'
9412 * ];
9413 * @endcode
9415 $wgInterwikiPrefixDisplayTypes = [];
9418 * RevisionStore table schema migration stage (content, slots, content_models & slot_roles tables).
9419 * Use the SCHEMA_COMPAT_XXX flags. Supported values:
9421 * - SCHEMA_COMPAT_OLD
9422 * - SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
9423 * - SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW
9424 * - SCHEMA_COMPAT_OLD
9426 * Note that reading the old and new schema at the same time is not supported.
9427 * Attempting to set both read bits in $wgMultiContentRevisionSchemaMigrationStage
9428 * will result in an InvalidArgumentException.
9430 * @see Task: https://phabricator.wikimedia.org/T174028
9431 * @see Commit: https://gerrit.wikimedia.org/r/#/c/378724/
9433 * @since 1.32
9434 * @deprecated Since 1.35, the only accepted value is is SCHEMA_COMPAT_NEW.
9435 * No longer functions as a setting. Will be removed in 1.36.
9436 * @var int An appropriate combination of SCHEMA_COMPAT_XXX flags.
9438 $wgMultiContentRevisionSchemaMigrationStage = SCHEMA_COMPAT_NEW;
9441 * The schema to use per default when generating XML dumps. This allows sites to control
9442 * explicitly when to make breaking changes to their export and dump format.
9444 $wgXmlDumpSchemaVersion = XML_DUMP_SCHEMA_VERSION_11;
9447 * Origin Trials tokens.
9449 * @since 1.33
9450 * @var array
9452 $wgOriginTrials = [];
9455 * Enable client-side Priority Hints.
9457 * @warning EXPERIMENTAL!
9459 * @since 1.33
9460 * @var bool
9462 $wgPriorityHints = false;
9465 * Ratio of requests that should get Priority Hints when the feature is enabled.
9467 * @warning EXPERIMENTAL!
9469 * @since 1.34
9470 * @var float
9472 $wgPriorityHintsRatio = 1.0;
9475 * Enable Element Timing.
9477 * @warning EXPERIMENTAL!
9479 * @since 1.33
9480 * @var bool
9482 $wgElementTiming = false;
9485 * Expiry of the endpoint definition for the Reporting API.
9487 * @warning EXPERIMENTAL!
9489 * @since 1.34
9490 * @var int
9492 $wgReportToExpiry = 86400;
9495 * List of endpoints for the Reporting API.
9497 * @warning EXPERIMENTAL!
9499 * @since 1.34
9500 * @var array
9502 $wgReportToEndpoints = [];
9505 * List of Feature Policy Reporting types to enable.
9506 * Each entry is turned into a Feature-Policy-Report-Only header.
9508 * @warning EXPERIMENTAL!
9510 * @since 1.34
9511 * @var array
9513 $wgFeaturePolicyReportOnly = [];
9516 * Options for Special:Search completion widget form created by SearchFormWidget class.
9517 * Settings that can be used:
9518 * - showDescriptions: true/false - whether to show opensearch description results
9519 * - performSearchOnClick: true/false - whether to perform search on click
9520 * See also TitleWidget.js UI widget.
9521 * @since 1.34
9522 * @var array
9524 $wgSpecialSearchFormOptions = [];
9527 * Set true to allow logged-in users to set a preference whether or not matches in
9528 * search results should force redirection to that page. If false, the preference is
9529 * not exposed and cannot be altered from site default. To change your site's default
9530 * preference, set via $wgDefaultUserOptions['search-match-redirect'].
9532 * @since 1.35
9533 * @var bool
9535 $wgSearchMatchRedirectPreference = false;
9538 * Toggles native image lazy loading, via the "loading" attribute.
9540 * @warning EXPERIMENTAL!
9542 * @since 1.34
9543 * @var array
9545 $wgNativeImageLazyLoading = false;
9548 * Option to whether serve the main page as the domain root
9550 * @warning EXPERIMENTAL!
9552 * @since 1.34
9553 * @var bool
9555 $wgMainPageIsDomainRoot = false;
9558 * Whether to enable the watchlist expiry feature.
9560 * DISCLAIMER: Enabling in production is discouraged for the time being.
9561 * A future MW 1.35 release will advertise this feature once it is stable.
9563 * @warning EXPERIMENTAL
9564 * @since 1.35
9565 * @var bool
9567 $wgWatchlistExpiry = false;
9570 * Chance of expired watchlist items being purged on any page edit.
9572 * Only has effect if $wgWatchlistExpiry is true.
9574 * If this is zero, expired watchlist items will not be removed
9575 * and the purgeExpiredWatchlistItems.php maintenance script should be run periodically.
9577 * @since 1.35
9578 * @var float
9580 $wgWatchlistPurgeRate = 0.1;
9583 * Relative maximum duration for watchlist expiries, as accepted by strtotime().
9584 * This relates to finite watchlist expiries only. Pages can be watched indefinitely
9585 * regardless of what this is set to.
9587 * This is used to ensure the watchlist_expiry table doesn't grow to be too big.
9589 * Only has effect if $wgWatchlistExpiry is true.
9591 * Set to null to allow expiries of any duration.
9593 * @since 1.35
9594 * @var string|null
9596 $wgWatchlistExpiryMaxDuration = '6 months';
9599 * Maximum number of revisions of a page that will be checked against every new edit
9600 * made to determine whether the edit was a manual revert.
9602 * Computational time required increases roughly linearly with this configuration
9603 * variable.
9605 * Larger values will let you detect very deep reverts, but at the same time can give
9606 * unexpected results (such as marking large amounts of edits as reverts) and may slow
9607 * down the wiki slightly when saving new edits.
9609 * Setting this to 0 will disable the manual revert detection feature entirely.
9611 * See this document for a discussion on this topic:
9612 * https://meta.wikimedia.org/wiki/Research:Revert
9614 * @since 1.36
9615 * @var int
9617 $wgManualRevertSearchRadius = 15;
9620 * Allow anonymous cross origin requests.
9622 * This should be disabled for intranet sites (sites behind a firewall).
9624 * @since 1.36
9625 * @var bool
9627 $wgAllowCrossOrigin = false;
9630 * Maximum depth (revision count) of reverts that will have their reverted edits marked
9631 * with the mw-reverted change tag. Reverts deeper than that will not have any edits
9632 * marked as reverted at all.
9634 * Large values can lead to lots of revisions being marked as "reverted", which may appear
9635 * confusing to users.
9637 * Setting this to 0 will disable the reverted tag entirely.
9639 * @since 1.36
9640 * @var int
9642 $wgRevertedTagMaxDepth = 15;
9645 * For really cool vim folding this needs to be at the end:
9646 * vim: foldmarker=@{,@} foldmethod=marker
9647 * @}