Documentation Index
Fetch the complete documentation index at: https://mintlify.com/wikioasis/mw-config/llms.txt
Use this file to discover all available pages before exploring further.
GlobalSettings.php is included near the end of the LocalSettings.php include chain, after ManageWikiSettings.php has already applied the per-wiki configuration extracted from the database. This ordering is intentional: by the time GlobalSettings.php runs, the $wi object is fully initialised, $cwPrivate and $cwClosed flags are set, and $wmgSharedDomainPathPrefix reflects whether the current request is coming through the shared CentralAuth domain. GlobalSettings can therefore make real decisions rather than just set static values.
Hooks Registered
Three hooks wired in GlobalSettings.php connect MediaWiki’s extension events toMirahezeFunctions methods:
| Hook | Handler | Purpose |
|---|---|---|
CreateWikiGenerateDatabaseLists | MirahezeFunctions::onGenerateDatabaseLists | Populates per-wiki databases.php cache with version (v), domain (d), and cluster (c) data |
ManageWikiCoreAddFormFields | MirahezeFunctions::onManageWikiCoreAddFormFields | Adds custom fields (primary domain, article path, version channel) to the ManageWiki core form |
ManageWikiCoreFormSubmission | MirahezeFunctions::onManageWikiCoreFormSubmission | Persists those fields on save, calling setWikiVersion from MultiVersion.php |
MultiVersion.php is also loaded here via require_once '/srv/mediawiki/config/MultiVersion.php', making the version-setting helper available.
Global Extensions
Four extensions are loaded unconditionally on every wiki, regardless of ManageWiki settings:CentralAuth & SUL3 Configuration
$wgCentralAuthStrict = true means users must have a global CentralAuth account to log in — local-only accounts cannot authenticate. The local password provider is set to loginOnly mode so it cannot be used to create new accounts.
The shared domain callback builds per-wiki SSO URLs from the accounts.wikioasis.org domain:
Shared Domain Overrides
When a request arrives ataccounts.wikioasis.org ($wmgSharedDomainPathPrefix is set), GlobalSettings applies additional overrides on top of those set in LocalSettings.php:
.wikioasis.org for cross-wiki SSO, WebAuthn passkey registration is enabled on the shared domain (it is disabled everywhere else via $wgWebAuthnNewCredsDisabled = true), and CheckUser client hints headers are collected for every request through the shared domain.
Conditional Extension Loading
Optional extensions are loaded at runtime based on whether they are active for the current wiki (as tracked by ManageWiki). This avoids loading unused PHP for extensions the wiki has not enabled.Bootstrap (Chameleon dependency)
Bootstrap (Chameleon dependency)
Chameleon and SnapWikiSkin are currently listed as disabled extensions in
LocalSettings.php due to incompatibility with MediaWiki 1.45.Elastica + CirrusSearch (Full-Text Search)
Elastica + CirrusSearch (Full-Text Search)
RelatedArticles is also active, $wgRelatedArticlesUseCirrusSearch is set to true to use the search index for related article suggestions rather than a database query.SocialProfile (Avatar / Award backend)
SocialProfile (Avatar / Award backend)
UserProfileV2 (R2 backend + CDN URL)
UserProfileV2 (R2 backend + CDN URL)
upv2avatars zone within the R2 bucket, served through cdn.wikioasis.org with the wiki’s database name as the path prefix.JsonConfig (Map & Tabular data)
JsonConfig (Map & Tabular data)
When JsonConfig is active, two content models are configured in the
Both models use
Data: namespace (namespace 486):| Model | Pattern | Remote Source |
|---|---|---|
Map.JsonConfig | /.\\.map$/ | https://commons.miraheze.org/w/api.php |
Tabular.JsonConfig | /.\\.tab$/ | https://commons.miraheze.org/w/api.php |
'isLocal' => false (data is not stored locally) and fetch from Miraheze Commons as the remote repository. The interwiki prefix is commons, matching wgJsonConfigInterwikiPrefix set in LocalSettings.php.Wikibase
Wikibase
Wikibase.php configuration file, which handles the more complex Wikibase-specific settings including federated properties, entity namespaces, and repo/client cross-wiki linking.OOJSPlus (Dialog & Upload dependency)
OOJSPlus (Dialog & Upload dependency)
PortableInfobox (Parsoid disabled)
PortableInfobox (Parsoid disabled)
false by default in LocalSettings.php anyway, but this block acts as an explicit guard.Discord Notifications
The wiki URL for Discord notification embeds is constructed from$wi->server and the wiki’s article path, stripping the $1 placeholder:
!$cwPrivate), the global Discord webhook URL is assigned:
$wmgGlobalDiscordWebhookUrl variable originates from PrivateSettings.php.
Closed Wiki Handling
When$cwClosed is true (set by CreateWiki), all write permissions are revoked from the * group:
comment permission is revoked as well. This ensures closed wikis are read-only even if a user somehow retains other local group memberships.
DataDump Configuration
The DataDump extension is configured with three dump types: XML, ZIP, and ManageWiki backup.XML Dump
XML Dump
| Setting | Value |
|---|---|
file_ending | .xml.gz |
generate.type | mwscript |
generate.script | $IP/maintenance/dumpBackup.php |
generate.options | --full --logs --uploads --output gzip:/tmp/${filename} |
$wgDataDumpDirectory | /var/www/dumps/ |
limit | 1 concurrent generation |
| Action | Required right |
|---|---|
| View dump | view-dump |
| Generate dump | generate-dump |
| Delete dump | delete-dump |
useBackendTempStore: true, meaning it is generated in /tmp first and then moved to the dump directory, avoiding partial-file exposure. A namespace selector is shown in the UI (htmlform.type: namespaceselect) to allow namespace-scoped dumps.ZIP Dump
ZIP Dump
The ZIP dump type packages the wiki’s image directory (private wikis use
/var/www/images/{$wgDBname}; public wikis use $IP/images/{$wgDBname}) into a ZIP archive stored in $wgDataDumpDirectory. The same view/generate/delete permission set applies.ManageWiki Backup
ManageWiki Backup
A JSON backup of the wiki’s ManageWiki configuration is generated via the
generateManageWikiBackup.php maintenance script from the MirahezeMagic extension. This backup captures extensions, settings, namespaces, and permissions in a restorable format.
require_once(notwfLoadExtension) because of how its entry point is structured. The file backend is set toAmazonS3so avatars and awards are stored in the R2 bucket under the globalavatarsandawardscontainers.