{
  "id": "mediawiki",
  "title": "MediaWiki",
  "lang": "en",
  "source_lang": "en",
  "summary": "MediaWiki is free, open-source wiki software that powers Wikipedia and supports collaborative publishing through revision histories, structured workflows, and an extensive extension ecosystem.",
  "category": "computer-science",
  "subcategory": "software",
  "type": "product",
  "aliases": [
    "MediaWiki software",
    "MediaWiki engine"
  ],
  "generated_at": "2026-11-03",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/mediawiki/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/mediawiki/",
      "json": "https://aiwiki.page/zh/mediawiki.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "MediaWiki is free and open-source software for creating and operating collaborative websites known as wikis. Originally developed for Wikipedia, it provides the underlying publishing system for Wikipedia and other Wikimedia projects, as well as independently operated encyclopedias, documentation sites, and organizational knowledge repositories. Its defining capabilities include browser-based editing, persistent revision histories, interlinked pages, reusable templates, discussion spaces, and configurable user permissions.\n\nWritten primarily in PHP, MediaWiki combines a web application, a database-backed content model, a text-processing system, and an extensible framework. Its development has been shaped by the requirements of large, multilingual, publicly editable websites: preserving contributions, presenting changes for review, resisting abuse, and serving heavily read content efficiently. The software is distinct from the organizations and communities that operate particular wikis. Installing MediaWiki does not reproduce Wikipedia’s editorial policies, content licenses, volunteer institutions, or production infrastructure."
    },
    {
      "heading": "Origins and development",
      "text": "Wikipedia initially used UseModWiki, a wiki engine written in Perl. As the encyclopedia grew during 2001, its requirements increasingly exceeded those of that installation. Magnus Manske developed a replacement using PHP and MySQL, commonly called the “Phase II” software. It entered service on the English Wikipedia on 25 January 2002. Its database-backed architecture supported a growing collection of articles and editing activity more effectively than the earlier system.\n\nLee Daniel Crocker subsequently rewrote substantial parts of the application to improve performance and scalability. This “Phase III” software was deployed in July 2002 and became the direct ancestor of MediaWiki. The transition was not merely a change of implementation language or storage format: it established an application increasingly specialized for large-scale collaborative publishing, with page histories, change tracking, and the operational demands of Wikipedia at its center.\n\nThe name MediaWiki was adopted in 2003, following a suggestion by Daniel Mayer. It deliberately resembles the name of the Wikimedia Foundation, which was established that year, but the terms refer to different things. MediaWiki is software; Wikimedia is the movement and family of projects associated with the foundation; Wikipedia is one encyclopedia project using that software. The similarity of the names has remained a frequent source of confusion.\n\nDevelopment gradually moved beyond its original encyclopedia-specific setting. MediaWiki 1.0 was released in December 2003, providing an identifiable software release for independent installations. Subsequent development expanded extension interfaces, language support, media handling, authentication, and interfaces for automated access. Major additions across the wider software ecosystem included VisualEditor, the Lua-based Scribunto extension, and the integration of structured data through Wikibase.\n\nThe project is maintained through contributions from Wikimedia Foundation staff, other organizations, and independent developers. Its source code is publicly available, and much of its engineering discussion and issue tracking takes place in public. The software is distributed under the GNU General Public License, version 2 or later. This licensing permits modification and redistribution under the license’s conditions; it does not determine the copyright status of articles or uploaded files stored in a particular installation.\n\nMediaWiki’s history therefore reflects two related but separate developments: the construction of infrastructure for Wikimedia’s exceptionally large public sites, and the maintenance of a reusable application that can run on much smaller servers. Features needed by one environment do not always become mandatory components of the other."
    },
    {
      "heading": "Application architecture and storage",
      "text": "MediaWiki is primarily a server-side application following the client–server model. A web browser requests a page or submits an edit; a web server passes the request to PHP; MediaWiki retrieves and processes the relevant data; and the server returns a representation, usually HTML. Browser-side behavior is implemented largely in JavaScript, with CSS controlling presentation. The server remains responsible for authoritative content storage, permission checks, and edit processing.\n\nA relational database holds information about pages, revisions, users, links, categories, and other application state. MediaWiki supports MySQL and MariaDB, with PostgreSQL and SQLite also supported subject to release-specific requirements and limitations. Extensions may impose narrower database compatibility than the core application. Uploaded media files ordinarily reside in a file store rather than directly in the main relational tables, although alternative storage systems can be integrated.\n\nA page and a revision are different entities. A page has an identity, title, namespace, and current state; a revision records a saved version of its content together with associated information such as its timestamp and contributor attribution. Modern MediaWiki also separates contributor identity, edit comments, content references, and other concerns into specialized structures. These arrangements support efficient storage and schema evolution without requiring every historical contribution to duplicate all related data.\n\nSince MediaWiki 1.32, multi-content revisions have provided a model in which a revision can contain multiple named content slots. The main slot normally holds the familiar page content, but the architecture permits associated content to be stored in other slots. This distinguishes the logical revision from a single undifferentiated text field and accommodates applications that need several related representations or types of content.\n\nConfiguration commonly resides in LocalSettings.php, generated initially by the installation process and subsequently maintained by the site operator. It specifies settings such as database access, enabled extensions, language, upload behavior, and permission changes. Some configuration and site messages can also be managed through designated wiki pages, but those mechanisms do not replace server-side administration.\n\nMaintenance scripts perform operations that are unsuitable for ordinary web requests, including database updates, imports, and repair tasks. A job queue handles deferred work such as refreshing dependent pages after a template change. These mechanisms are important because a single edit can affect thousands of pages: saving the edit and completing every consequence synchronously would make response times unpredictable and could overload the server."
    },
    {
      "heading": "Pages, namespaces, and collaborative workflows",
      "text": "The basic unit of organization is a titled page. Titles belong to namespaces, which distinguish different classes of material. A typical installation separates ordinary content pages from user pages, discussion pages, uploaded-file descriptions, templates, categories, and system messages. A namespace prefix such as User: or Template: is part of the title’s interpretation, not simply a directory name in a conventional file system.\n\nMany subject namespaces have corresponding talk namespaces. An encyclopedia article, for example, can have a separate discussion page where contributors debate sources, wording, or proposed changes without placing those discussions in the article itself. User talk pages similarly provide a location for communication associated with an account or editing identity. DiscussionTools, an extension deployed on Wikimedia sites, adds reply interfaces and other discussion-oriented functions to this page-based model.\n\nEvery saved edit normally creates a revision. The history interface lists revisions, and a difference view displays changes between selected versions. Earlier content can be restored by saving a new revision based on it. This is a form of version control designed for web documents rather than a direct equivalent of a source-code repository: the system emphasizes readable histories, contributor attribution, and rapid correction within a shared live publication.\n\nRecent changes, watchlists, and contribution lists expose different views of editing activity. Recent changes surveys activity across the wiki; a watchlist follows pages selected by a user; and a contribution list groups edits associated with an editing identity. These interfaces support distributed review, but the software does not guarantee that someone has checked a particular edit. Review practices depend on the community, staffing, and extensions used by the installation.\n\nCategories create overlapping collections of pages. Adding a category declaration places a page in a category listing, and categories can themselves be categorized. The resulting structure is a graph rather than a strictly enforced hierarchy. Subpages provide another organizational mechanism, where enabled, while redirects allow alternative titles to lead to a target page. Redirects are particularly useful for spelling variants, renamed subjects, and page moves.\n\nPage deletion and revision deletion are controlled administrative operations, not necessarily immediate physical erasure from all storage. Authorized users may retain access to deleted material, depending on the operation and configuration. Similarly, moving a page normally preserves its history and can leave a redirect at the former title. These behaviors reflect a central design choice: routine editorial actions should preserve provenance and enable correction, while stronger restrictions remain available for material that should not remain publicly accessible."
    },
    {
      "heading": "Wikitext, templates, and rendering",
      "text": "MediaWiki’s traditional editing language is wikitext, a lightweight markup syntax for links, headings, lists, tables, formatting, and other page structures. An internal link can be written as [[article-title|Article title]], while a heading uses equals signs around its text. Unlike Markdown, MediaWiki wikitext developed around a particular wiki engine and its evolving publishing requirements. Its full behavior depends on the parser, enabled extensions, and local configuration.\n\nReusable content is commonly provided through template transclusion. A construct such as {{Infobox}} inserts the evaluated content of another page into the current page. Parameters allow the same template to generate different output for different articles. This supports navigation boxes, citation formatting, maintenance notices, and standardized information panels. The template page remains a shared dependency: changing it can alter the rendered appearance of every page that uses it.\n\nTransclusion is not simple textual copying performed once at edit time. The rendering process expands templates and evaluates applicable parser functions, while tracking dependencies needed for caching and later updates. Substitution offers a different behavior: a substituted invocation writes expanded material into the saved page text. This distinction matters for maintenance because a transcluded notice follows later template changes, whereas substituted text usually becomes independent of its original source.\n\nTemplates can become complex programs despite their document-oriented syntax. Conditional logic, nested calls, and string operations enable sophisticated behavior but can also produce difficult-to-maintain constructions. The Scribunto extension addresses some of these needs by allowing modules written in Lua to perform computations invoked from wikitext. Scribunto imposes execution constraints appropriate to a shared web application; it is not unrestricted access to the server’s operating environment.\n\nVisualEditor provides a graphical editing interface in which contributors work with a rendered representation instead of directly manipulating all source markup. Its operation is closely associated with Parsoid, which converts between wikitext and a structured HTML representation. Parsoid preserves information needed for round-trip editing, including distinctions that ordinary display HTML would discard. This is especially important when an editor changes one part of a page containing complicated templates elsewhere.\n\nRendering is consequently more involved than converting headings and links into HTML. MediaWiki must account for template dependencies, language rules, extensions, references, categories, media, and editor-specific requirements. Parser limits constrain costly operations, such as excessive expansion or expensive queries. These limits help prevent a short-looking source page from demanding disproportionate server resources through deeply nested or widely branching template calls."
    },
    {
      "heading": "Extensions, skins, and specialized applications",
      "text": "MediaWiki’s core supplies general wiki functions, while extensions add or modify capabilities. Extensions can register event handlers, special pages, content types, permissions, parser tags, application programming interfaces, and other components. A hook allows extension code to participate at a defined point in the application’s execution. This design permits substantial specialization without requiring every installation to maintain a separate modification of the core source.\n\nExtensions differ greatly in scale. Some add a single markup element, while others introduce substantial subsystems. Cite implements reference-related markup such as <ref> and reference lists. Math renders mathematical expressions supplied in TeX-like notation. AbuseFilter evaluates rules against editing actions, and ConfirmEdit supplies CAPTCHA-related integrations. None of these examples means that every MediaWiki installation has the feature enabled: packaging and local configuration determine the actual feature set.\n\nSkins govern the surrounding interface, including navigation, page layout, and presentation of actions. They are distinct from content and from extensions that implement editorial functions. Vector, introduced on Wikimedia sites in 2010, became one of the most recognizable MediaWiki interfaces. Its later Vector 2022 design introduced changes to navigation and reading layout. A wiki operator can choose another skin, and users may be allowed to select among installed alternatives.\n\nResourceLoader manages the delivery of browser-side resources. Rather than requiring every page to load all scripts and styles independently, it organizes resources into modules with dependencies, caching behavior, and appropriate delivery rules. This is important for both extensions and skins, which often need browser code but should not impose the same download cost on every reader and every page.\n\nTwo extension families illustrate MediaWiki’s use beyond conventional articles. Semantic MediaWiki adds annotations and querying capabilities that allow wiki content to function more like a structured knowledge base. Wikibase, the software behind Wikidata, provides data entities such as items, properties, and statements. These are separate projects with different data models; installing one does not automatically reproduce the behavior or contents of the other.\n\nExtensibility creates compatibility obligations. An extension may require a particular MediaWiki branch, PHP version, database backend, or another extension. Changes to internal interfaces can require updates, and abandoned extensions can complicate upgrades. MediaWiki’s extension ecosystem therefore combines flexibility with an operational dependency: the behavior and maintainability of a deployed wiki depend on the compatibility of the entire selected stack, not only the core release."
    },
    {
      "heading": "APIs, search, and external data exchange",
      "text": "MediaWiki provides several mechanisms for programmatic interaction. The Action API, traditionally exposed through api.php, supports operations such as querying page content, retrieving histories, listing category members, uploading files, and submitting edits. Requests commonly receive JSON responses. Write operations require appropriate credentials and permissions, and many require tokens that help protect against cross-site request forgery.\n\nThe API is used by editing tools, mobile interfaces, administrative utilities, and automated agents. A bot that updates links or imports structured information can use the same underlying permission system as a human account. Bot status and flags may affect how changes appear in review interfaces, but they do not inherently bypass all access controls. Automated work also encounters limits on request size, concurrency, and resource use.\n\nREST interfaces provide another approach to exposing resources, including page and revision information and rendered content. The exact endpoints available depend on the MediaWiki version, extensions, and deployment. It is important to distinguish interfaces shipped with MediaWiki from Wikimedia-operated services that aggregate, cache, or transform information across projects. A small independent installation does not automatically include every public Wikimedia API.\n\nBasic search is integrated into the application, but larger installations often use specialized search infrastructure. CirrusSearch integrates MediaWiki with Elasticsearch-based search services, enabling richer full-text retrieval and additional indexing behavior. Search indexes are derived representations rather than the authoritative record of page content. They can lag behind edits, and rebuilding them is a separate maintenance operation from preserving or restoring the main database.\n\nMediaWiki also supports XML-based export and import of page content and histories. An export can include selected pages or a larger collection, depending on the tool and options used. Such files are useful for migration, research, and content reuse, but they are not necessarily complete site backups. Uploaded binaries, account information, local configuration, extensions, logs, and other operational data may require separate preservation.\n\nLinks between wikis can be managed through interwiki prefixes, while language links and shared media repositories provide additional forms of integration. For example, a wiki configured to use Wikimedia Commons as a foreign file repository can display eligible files hosted there without keeping a local copy. These mechanisms connect separate installations while preserving an important architectural distinction: a cross-wiki link or remote media reference does not make the participating sites a single database or a single administrative system."
    },
    {
      "heading": "Performance and large-scale operation",
      "text": "MediaWiki’s workload is often highly asymmetric: published pages may receive many more reads than edits. Serving a previously rendered page is substantially cheaper than repeatedly parsing its source, expanding its templates, and querying all associated data. Caching therefore plays a central role in performance. Different layers can store rendered content, parsed output, object data, localization information, and browser assets.\n\nParser caching reduces repeated work by retaining the output of expensive rendering operations. However, cached content must remain consistent with its dependencies. If a template changes, pages that transclude it may need their cached output refreshed. MediaWiki records relationships among pages and uses deferred work to propagate these consequences. Cache invalidation is thus connected to the wiki’s content graph, not just to elapsed time.\n\nVery large deployments add reverse proxies and shared cache services in front of the application. These can answer many requests without running the full PHP request path. Logged-in sessions, personalized content, permission-sensitive output, and unusual request parameters complicate caching because the same address may not have an identical safe response for every visitor. Correct cache separation is therefore both a performance and an information security concern.\n\nDatabase replication and load balancing distribute work across servers. Read replicas can handle many retrieval operations while writes go to the appropriate primary server. Replication lag creates a consistency problem: a user may save an edit and then encounter a replica that has not yet received it. MediaWiki includes database abstractions and request-handling mechanisms intended to manage such conditions, but distributed operation still requires careful deployment-specific configuration.\n\nA Wikimedia-scale installation also relies on services outside the minimal application: search clusters, media transformation systems, monitoring, job execution infrastructure, and other components. Images may need thumbnails in many sizes, and a widely read page can create sudden demand for a newly uploaded file. The software’s support for these tasks does not imply that they all run within a single PHP process or on one server.\n\nSmaller installations can operate on a single machine with a conventional web server and database. Their performance constraints may instead come from slow storage, insufficient memory, expensive extensions, or template-heavy pages. Large article counts alone are not a complete measure of cost. Revision volume, edit frequency, media processing, search requirements, dependency structure, and the ratio of anonymous to personalized traffic all influence the resources a wiki requires."
    },
    {
      "heading": "Permissions, abuse controls, and security",
      "text": "MediaWiki separates the ability to perform an action from the social decision about when it is appropriate. Permissions are assigned through user groups and configuration. Typical actions include editing pages, moving them, deleting them, blocking contributors, protecting titles, and viewing restricted material. An administrator is therefore a user with a particular set of technical rights, not necessarily the owner of the server or the final authority on editorial disputes.\n\nPage protection restricts selected operations according to user status or other configured rules. Blocks constrain actions by accounts, addresses, or other supported targets. More granular mechanisms, including partial blocks and extension-based restrictions, can limit particular activities without excluding every contribution. These controls are used to address vandalism, spam, and disruption, but their meaning depends on a wiki’s local policies and technical configuration.\n\nMediaWiki applies familiar web-security measures, including output escaping, database query safeguards, session controls, and checks on state-changing requests. Its handling of wikitext is particularly important: allowing collaborative markup does not mean allowing unrestricted JavaScript or arbitrary server-side code. Extensions that introduce new markup, upload handlers, or authentication systems enlarge the security-sensitive surface and must integrate correctly with the core’s permission and output rules.\n\nUploaded files create distinct risks. A file can contain active content, misleading media types, or material that triggers problems in external processing software. MediaWiki therefore distinguishes allowed file types, validates uploads, and applies handling rules to particular formats. Rendering a thumbnail or converting a document can involve software outside MediaWiki itself, so security depends on the broader server environment as well as the application.\n\nMediaWiki can restrict reading and editing, but it is not primarily designed as a fine-grained confidential document management system. A deployment that attempts complex per-page secrecy must account for indirect disclosure through search, categories, transclusion, APIs, caches, and extensions. Features developed for openly readable encyclopedias may need particular scrutiny in a private installation. Software permissions also do not replace organizational rules governing sensitive information.\n\nRevision histories introduce another security and privacy consideration: removing text from the current page does not normally remove it from earlier revisions. Revision deletion and stronger suppression mechanisms restrict access to selected historical information, but external mirrors, exported datasets, browser caches, and independent copies may already exist. Likewise, deleting an account identifier or altering public attribution is different from erasing every operational record. MediaWiki’s archival strengths require explicit administrative mechanisms when public persistence is inappropriate."
    },
    {
      "heading": "Internationalization, maintenance, and independent deployment",
      "text": "Internationalization is fundamental to MediaWiki because Wikimedia projects operate in many languages and writing systems. Interface messages are separated from application logic and translated through community processes, including translatewiki.net. The site’s content language and an individual user’s interface language can differ, allowing navigation and controls to appear in one language while the page being read is written in another.\n\nSupport extends beyond translating labels. MediaWiki uses Unicode text and accommodates right-to-left scripts, localized namespaces, grammatical variations, and language-dependent number and date formatting. Some languages require additional treatment for word segmentation, collation, or script conversion. The LanguageConverter system, for example, supports configured conversions between writing variants in certain languages; it is not a general-purpose machine translation service.\n\nAccessibility and interface consistency involve both the core application and the components surrounding it. Skins determine navigation and visual structure, while editors, media viewers, and extensions supply additional controls. A site can undermine otherwise accessible software through poorly constructed templates, unsuitable color choices, or inaccessible custom scripts. The separation between platform and local content therefore matters for usability as much as it does for editorial governance.\n\nMediaWiki releases follow maintained branches, including designated long-term-support releases. A branch’s support period and requirements must be distinguished from the release numbers used by Wikimedia’s continuously deployed development environment. Independent operators generally install packaged releases and apply updates within a maintenance process. Database schema changes are handled through the update machinery, while extensions and skins may require coordinated upgrades.\n\nA complete operational backup involves more than article exports. It ordinarily includes the database, uploaded files, local configuration, and records of installed extensions, skins, and custom modifications. Restoration must reconcile these components: restoring an older database with incompatible application code or omitting the media store can leave a site incomplete even when its article text survives. Credentials and other secrets in configuration require separate protection.\n\nOutside Wikimedia, MediaWiki is used for public reference works, game and hobby communities, technical documentation, and institutional knowledge collections. Its strengths are especially visible where documents benefit from persistent history, dense internal linking, reusable content, and participation by many editors. Applications centered on tightly controlled document approval, elaborate confidential permissions, or highly customized transactional interfaces may require extensive additional development. The resulting installation remains a combination of the core software, selected extensions, hosting infrastructure, and local editorial practices rather than a fixed reproduction of Wikipedia."
    }
  ],
  "links": [
    "free-software",
    "open-source-software",
    "wiki",
    "wikipedia",
    "wikimedia-foundation",
    "source-code",
    "gnu-general-public-license",
    "client-server-model",
    "web-browser",
    "html",
    "javascript",
    "cascading-style-sheets",
    "relational-database",
    "file-system",
    "version-control",
    "markdown",
    "application-programming-interface",
    "tex",
    "knowledge-base",
    "wikidata",
    "search-engine",
    "wikimedia-commons",
    "information-security",
    "load-balancing",
    "unicode",
    "machine-translation"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}