# Software:MediaWiki

Short description: Free and open-source wiki software, used by Wikipedia
Original author(s) ScreenshotThe Main Page of the English Wikipedia running MediaWiki 1.36 Magnus Manske, Lee Daniel Crocker Wikimedia Foundation January 25, 2002; 19 years ago 1.34.1[1] / 2020-03-26[2][±] PHP[3] Windows, macOS, Linux, FreeBSD, OpenBSD, Solaris ~48 MB (compressed) 459[4] languages Wiki software GPLv2+[5] {{{1}}}

MediaWiki is a free and open-source wiki software. It was developed for use on Wikipedia in 2002, and given the name "MediaWiki" in 2003.[6] It remains in use on Wikipedia and almost all other Wikimedia websites, including Wiktionary, Wikimedia Commons and Wikidata; these sites continue to define a large part of the requirement set for MediaWiki.[7] MediaWiki was originally developed by Magnus Manske and improved by Lee Daniel Crocker.[8][9] Its development has since then been coordinated by the Wikimedia Foundation.

MediaWiki is written in the PHP programming language and stores all text content into a database. The software is optimized to efficiently handle large projects, which can have terabytes of content and hundreds of thousands of views per second.[7][10] Because Wikipedia is one of the world's largest websites, achieving scalability through multiple layers of caching and database replication has been a major concern for developers. Another major aspect of MediaWiki is its internationalization; its interface is available in more than 300 languages.[11] The software has more than 1,000 configuration settings[12] and more than 1,800 extensions available for enabling various features to be added or changed.[13]

Besides its use on Wikimedia sites, MediaWiki has been used as a knowledge management and content management system on many thousands of websites, public and private, including the websites Fandom, wikiHow, and major internal installations like Intellipedia and Diplopedia.

MediaWiki is free and open-source software and is distributed under the terms of the GNU General Public License version 2 or any later version. Its documentation, located at www.mediawiki.org, is released under the Creative Commons BY-SA 3.0 license and partly in the public domain.[14] Specifically, the manuals and other content at MediaWiki.org are Creative Commons-licensed, while the set of help pages intended to be freely copied into fresh wiki installations and/or distributed with MediaWiki software is public domain. This was done to eliminate legal issues arising from the help pages being imported into wikis with licenses that are incompatible with the Creative Commons license.[15] MediaWiki's development has generally favored the use of open-source media formats.[16]

## Development

MediaWiki has an active volunteer community for development and maintenance. Users who have made meaningful contributions to the project by submitting patches are generally, upon request, granted access to commit revisions to the project's Git/Gerrit repository.[17] There are also paid programmers who primarily develop projects for the Wikimedia Foundation. MediaWiki developers participate in the Google Summer of Code by facilitating the assignment of mentors to students wishing to work on MediaWiki core and extension projects.[18] During the year prior to November 2012, there were about two hundred developers who had committed changes to the MediaWiki core or extensions.[19] Major MediaWiki releases are generated approximately every six months by taking snapshots of the development branch, which is kept continuously in a runnable state;[20] minor releases, or point releases, are issued as needed to correct bugs (especially security problems).

MediaWiki is developed on a continuous integration development model, which software changes are pushed live to Wikimedia sites on regular basis.[20]

MediaWiki also has a public bug tracker, phabricator.wikimedia.org, which runs Phabricator. The site is also used for feature and enhancement requests.

## History

Magnus Manske in 2012

When Wikipedia was launched in January 2001, it ran on an existing wiki software system, UseModWiki. UseModWiki is written in the Perl programming language, and stores all wiki pages in text (.txt) files. This software soon proved to be limiting, in both functionality and performance. In mid-2001, Magnus Manske — a developer and student at the University of Cologne, as well as a Wikipedia editor — began working on new software that would replace UseModWiki, specifically designed for use by Wikipedia. This software was written in the PHP scripting language, and stored all of its information in a MySQL engine database. The new software was largely developed by August 24, 2001, and a test wiki for it was established shortly thereafter.

The first full implementation of this software was the new Meta Wikipedia on November 9, 2001. There was a desire to have it implemented immediately on the English-language Wikipedia,[21] however, Manske was apprehensive about any potential bugs harming the nascent website during the period of the final exams he had to complete immediately prior to Christmas;[22] this led to the launch on the English-language Wikipedia being delayed until January 25, 2002. The software was then, gradually, deployed on all the Wikipedia language sites of that time. This software was referred to as "the PHP script" and as "phase II", with the name "phase I", retroactively given to the use of UseModWiki.

Increasing usage soon caused load problems to arise again, and soon after, another rewrite of the software began; this time being done by Lee Daniel Crocker, which became known as "phase III". This new software was also written in PHP, with a MySQL back-end, and kept the basic interface of the phase II software, but with the added functionality of a wider scalability. The "phase III" software went live on Wikipedia in July 2002.

The Wikimedia Foundation was announced on June 20, 2003. In July, Wikipedia contributor Daniel Mayer, suggested the name "MediaWiki" for the software, as a play on "Wikimedia".[23] The MediaWiki name was gradually phased in, beginning in August 2003. The name has frequently caused confusion due to its (intentional) similarity to the "Wikimedia" name (which itself is similar to "Wikipedia").[24]

MediaWiki logo until April 1, 2021

The old product logo was created by Erik Möller, using a flower photograph taken by Florence Nibart-Devouard, and was originally submitted to the logo contest for a new Wikipedia logo, held in from July 20 to August 27, 2003.[25][26] The logo came in third place, and was chosen to represent MediaWiki rather than Wikipedia, with the second place logo being used for the Wikimedia Foundation.[27] The double square brackets ( ) symbolize the syntax MediaWiki uses for creating hyperlinks to other wiki pages; while the sunflower represents the diversity of content on Wikipedia, the constant growth, and also the wildness.[28]

Later, Brion Vibber, the Chief Technical Officer of the Wikimedia Foundation,[29] took up the role of Release Manager, and the most active Developer.[6][30]

Major milestones in MediaWiki's development have included: the categorization system (2004); Parser Functions, (2006); Flagged Revisions, (2008);[31] the "ResourceLoader", a delivery system for CSS and JavaScript (2011);[32] and the VisualEditor, a "what you see is what you get" (WYSIWYG) editing platform (2013).[33]

The contest of designing a new logo was initiated on June 22, 2020, as the old logo was a bitmap image and had "high details", leading to problems when rendering at high and low resolutions, respectively. After two rounds of voting, the new and current MediaWiki logo designed by Serhio Magpie was selected on October 24, 2020 and officially adopted on April 1, 2021.[34]

### Version history

Main page: Software:MediaWiki version history

The first version of MediaWiki, 1.1, was released in December 2003.

## Sites using MediaWiki

FANDOM also makes use of MediaWiki.

MediaWiki's most famous use has been in Wikipedia and, to a lesser degree, the Wikimedia Foundation's other projects. Fandom, a wiki hosting service formerly known as Wikia, runs on MediaWiki. Other public wikis that run on MediaWiki include wikiHow and SNPedia. WikiLeaks began as a MediaWiki-based site, but is no longer a wiki.

A number of alternative wiki encyclopedias to Wikipedia run on MediaWiki, including Citizendium, Metapedia, Scholarpedia and Conservapedia. MediaWiki is also used internally by a large number of companies, including Novell and Intel.[35][36]

Notable usages of MediaWiki within governments include Intellipedia, used by the United States Intelligence Community, Diplopedia, used by the United States Department of State, and milWiki, a part of milSuite used by the United States Department of Defense. United Nations agencies such as the United Nations Development Programme and INSTRAW chose to implement their wikis using MediaWiki, because "this software runs Wikipedia and is therefore guaranteed to be thoroughly tested, will continue to be developed well into the future, and future technicians on these wikis will be more likely to have exposure to MediaWiki than any other wiki software."[37]

The Free Software Foundation uses MediaWiki to implement the LibrePlanet site.[38]

## Key features

MediaWiki provides a rich core feature set and a mechanism to attach extensions to provide additional functionality.

### Internationalization and localisation

Due to the strong emphasis on multilingualism in the Wikimedia projects, internationalization and localization has received significant attention by developers. The user interface has been fully or partially translated into more than 300 languages on translatewiki.net,[11] and can be further customized by site administrators (the entire interface is editable through the wiki).

Several extensions, most notably those collected in the MediaWiki Language Extension Bundle, are designed to further enhance the multilingualism and internationalization of MediaWiki.

### Installation and configuration

Installation of MediaWiki requires that the user have administrative privileges on a server running both PHP and a compatible type of SQL database. Some users find that setting up a virtual host is helpful if the majority of one's site runs under a framework (such as Zope or Ruby on Rails) that is largely incompatible with MediaWiki.[39] Cloud hosting can eliminate the need to deploy a new server.[40]

An installation PHP script is accessed via a web browser to initialize the wiki's settings. It prompts the user for a minimal set of required parameters, leaving further changes, such as enabling uploads,[41] adding a site logo,[42] and installing extensions, to be made by modifying configuration settings contained in a file called LocalSettings.php.[43] Some aspects of MediaWiki can be configured through special pages or by editing certain pages; for instance, abuse filters can be configured through a special page,[44] and certain gadgets can be added by creating JavaScript pages in the MediaWiki namespace.[45] The MediaWiki community publishes a comprehensive installation guide.[46]

### Markup

One of the earliest differences between MediaWiki (and its predecessor, UseModWiki) and other wiki engines was the use of "free links" instead of CamelCase. When MediaWiki was created, it was typical for wikis to require text like "WorldWideWeb" to create a link to a page about the World Wide Web; links in MediaWiki, on the other hand, are created by surrounding words with double square brackets, and any spaces between them are left intact, e.g. [[World Wide Web]]. This change was logical for the purpose of creating an encyclopedia, where accuracy in titles is important.

MediaWiki uses an extensible[47] lightweight wiki markup designed to be easier to use and learn than HTML. Tools exist for converting content such as tables between MediaWiki markup and HTML.[48] Efforts have been made to create a MediaWiki markup spec, but a consensus seems to have been reached that Wikicode requires context-sensitive grammar rules.[49][50] The following side-by-side comparison illustrates the differences between wiki markup and HTML:

MediaWiki syntax
(the "behind the scenes" code
used to add formatting to text)
HTML equivalent
(another type of "behind the scenes" code
used to add formatting to text)
Rendered output
(seen onscreen by a site viewer)
==== A dialogue ====

"Take some more tea," the March Hare said to Alice, very earnestly.

"I've had nothing yet," Alice replied in an offended tone: "so I can't take more."

"You mean you can't take ''less''," said the Hatter: "it's '''very''' easy to take ''more'' than nothing."
<h4>A dialogue</h4>

<p>"Take some more <a href="/wiki/Tea" title="Tea">tea</a>," the March Hare said to Alice, very earnestly.</p>

<p>"I've had nothing yet," Alice replied in an offended tone: "so I can't take more."</p>

<p>"You mean you can't take <i>less</i>," said the Hatter: "it's <b>very</b> easy to take <i>more</i> than nothing."</p>
A dialogue

"Take some more tea," the March Hare said to Alice, very earnestly.

"I've had nothing yet," Alice replied in an offended tone: "so I can't take more."

"You mean you can't take less," said the Hatter: "it's very easy to take more than nothing."

(Quotation above from Alice's Adventures in Wonderland by Lewis Carroll)

### Editing interface

Editing interface of MediaWiki 1.36(wmf), showing the edit toolbar and some examples of wiki syntax

MediaWiki's default page-editing tools have been described as somewhat challenging to learn.[51] A survey of students assigned to use a MediaWiki-based wiki found that when they were asked an open question about main problems with the wiki, 24% cited technical problems with formatting, e.g. "Couldn't figure out how to get an image in. Can't figure out how to show a link with words; it inserts a number."[52]

To make editing long pages easier, MediaWiki allows the editing of a subsection of a page (as identified by its header). A registered user can also indicate whether or not an edit is minor. Correcting spelling, grammar or punctuation are examples of minor edits, whereas adding paragraphs of new text is an example of a non-minor edit.

Sometimes while one user is editing, a second user saves an edit to the same part of the page. Then, when the first user attempts to save the page, an edit conflict occurs. The second user is then given an opportunity to merge their content into the page as it now exists following the first user's page save.

MediaWiki's user interface has been localized in many different languages. A language for the wiki content itself can also be set, to be sent in the "Content-Language" HTTP header and "lang" HTML attribute.

### Application programming interface

MediaWiki has an extensible web API (application programming interface) that provides direct, high-level access to the data contained in the MediaWiki databases. Client programs can use the API to log in, get data, and post changes. The API supports thin web-based JavaScript clients and end-user applications (such as vandal-fighting tools). The API can be accessed by the backend of another web site.[53] An extensive Python bot library, Pywikibot,[54] and a popular semi-automated tool called AutoWikiBrowser, also interface with the API.[55] The API is accessed via URLs such as http://en.wikipedia.org/w/api.php?action=query&list=recentchanges. In this case, the query would be asking Wikipedia for information relating to the last 10 edits to the site. One of the perceived advantages of the API is its language independence; it listens for HTTP connections from clients and can send a response in a variety of formats, such as XML, serialized PHP, or JSON.[56] Client code has been developed to provide layers of abstraction to the API.[57]

### Rich content

Images can be arranged in galleries, a feature that is used extensively for Wikimedia's media archive, Wikimedia Commons.

MediaWiki supports rich content generated through specialized syntax. For example, the software comes with optional support for rendering mathematical formulas using LaTeX and a special parser written in OCaml. Similar functionality for other content, ranging from graphical timelines over mathematical plotting and musical scores to Egyptian hieroglyphs, is available via extensions.

The software has become more powerful at dealing with a wide variety of uploaded media files. Its richest functionality is in the area of images, where image galleries and thumbnails can be generated with relative ease. There is also support for Exif metadata. The use of MediaWiki to operate the Wikimedia Commons, one of the largest free content media archives, has driven the need for further functionality in this area.

For WYSIWYG editing, VisualEditor is available to use in MediaWiki which simplifying editing process for editors and has been bundled since MediaWiki 1.35.[58] Other extensions exist for handling WYSIWYG editing to different degrees.[59]

### Tracking edits

Among the features of MediaWiki to assist in tracking edits is a Recent Changes feature that provides a list of recent edits to the wiki. This list contains basic information about those edits such as the editing user, the edit summary, the page edited, as well as any tags (e.g. "possible malware link")[60] added by customizable abuse filters and other extensions to aid in combating unhelpful edits.[61] On more active wikis, so many edits occur that it is hard to track Recent Changes manually. Anti-vandal software, including user-assisted tools,[62] is sometimes employed on such wikis to process Recent Changes items. Server load can be reduced by sending a continuous feed of Recent Changes to an IRC channel that these tools can monitor, eliminating their need to send requests for a refreshed Recent Changes feed to the API.[63][64]

Another important tool is watchlisting. Each logged-in user has a watchlist to which the user can add whatever pages he or she wishes. When an edit is made to one of those pages, a summary of that edit appears on the watchlist the next time it is refreshed.[65] As with the recent changes page, recent edits that appear on the watchlist contain clickable links for easy review of the article history and specific changes made.

There is also capability to review all edits made by any particular user. In this way, if an edit is identified as problematic, it is possible to check the user's other edits for issues.

MediaWiki allows one to link to specific versions of articles. This has been useful to the scientific community, in that expert peer reviewers could analyse articles, improve them and provide links to the trusted version of that article.[66]

Navigation through the wiki is largely through internal wikilinks. MediaWiki's wikilinks implement page existence detection, in which a link is colored blue if the target page exists on the local wiki and red if it does not. If a user clicks on a red link, they are prompted to create an article with that title. Page existence detection makes it practical for users to create "wikified" articles — that is, articles containing links to other pertinent subjects — without those other articles being yet in existence.

Interwiki links function much the same way as namespaces. A set of interwiki prefixes can be configured to cause, for instance, a page title of wikiquote:Jimbo Wales to direct the user to the Jimbo Wales article on Wikiquote.[67] Unlike internal wikilinks, interwiki links lack page existence detection functionality, and accordingly there is no way to tell whether a blue interwiki link is broken or not.

Interlanguage links are the small navigation links that show up in the sidebar in most MediaWiki skins which connect an article with related articles in other languages within the same Wiki family. This can provide language-specific communities connected by a larger context, with all wikis on the same server or each on its own server.[68]

Previously, Wikipedia used interlanguage links to link an article to other articles on the same topic in other editions of Wikipedia. This was superseded by the launch of Wikidata.[69]

### Content organization

#### Page tabs and associated pages

MediaWiki page tabs, using the "Vector" skin. The red coloration of the "discussion" tab indicates that the article does not yet have a talk page. As with any other red wikilink, clicking on it prompts the user to create the page.

Page tabs are displayed at the top of pages. These tabs allow users to perform actions or view pages that are related to the current page. The available default actions include viewing, editing, and discussing the current page. The specific tabs displayed depend on whether or not the user is logged into the wiki and whether the user has sysop privileges on the wiki. For instance, the ability to move a page or add it to one's watchlist is usually restricted to logged-in users. The site administrator can add or remove tabs by using JavaScript or installing extensions.[70]

Each page has an associated history page from which the user can access every version of the page that has ever existed and generate diffs between two versions of his choice. Users' contributions are displayed not only here, but also via a "user contributions" option on a sidebar. Carl Challborn & Teresa Reimann note that "While this feature may be a slight deviation from the collaborative, 'ego-less' spirit of wiki purists, it can be very useful for educators who need to assess the contribution and participation of individual student users."[71]

#### Namespaces

MediaWiki provides many features beyond hyperlinks for structuring content. One of the earliest such features is namespaces. One of Wikipedia's earliest problems had been the separation of encyclopedic content from pages pertaining to maintenance and communal discussion, as well as personal pages about encyclopedia editors. Namespaces are prefixes before a page title (such as "User:" or "Talk:") that serve as descriptors for the page's purpose and allow multiple pages with different functions to exist under the same title. For instance, a page titled "[[The Terminator]]", in the default namespace, could describe the 1984 movie starring Arnold Schwarzenegger, while a page titled "[[User:The Terminator]]" could be a profile describing a user who chooses this name as a pseudonym. More commonly, each namespace has an associated "Talk:" namespace, which can be used to discuss its contents, such as "User talk:" or "Template talk:". The purpose of having discussion pages is to allow content to be separated from discussion surrounding the content.[72][73]

Namespaces can be viewed as folders that separate different basic types of information or functionality. Custom namespaces can be added by the site administrators. There are 16 namespaces by default for content, with 2 "pseudo-namespaces" used for dynamically generated "Special:" pages and links to media files. Each namespace on MediaWiki is numbered: content page namespaces have even numbers and their associated talk page namespaces have odd numbers.[74]

#### Category tags

Users can create new categories and add pages and files to those categories by appending one or more category tags to the content text. Adding these tags creates links at the bottom of the page that take the reader to the list of all pages in that category, making it easy to browse related articles.[75] The use of categorization to organize content has been described as a combination of:

#### Subpages

In addition to namespaces, content can be ordered using subpages. This simple feature provides automatic breadcrumbs of the pattern [[Page title/Subpage title]] from the page after the slash (in this case, "Subpage title") to the page before the slash (in this case, "Page title").

### Customization

Users can configure custom JavaScript that is executed on every pageview. This has led to JavaScript tools that users can "install", the "navigation popups" tool shown here displays a small preview of an article when hovering over a link title.

If the feature is enabled, users can customize their stylesheets and configure client-side JavaScript to be executed with every pageview. On Wikipedia, this has led to a large number of additional tools and helpers developed through the wiki and shared among users. For instance, navigation popups is a custom JavaScript tool that shows previews of articles when the user hovers over links, and also provides shortcuts for common maintenance tasks.[77]

A screenshot of a wiki using MediaWiki with a customized skin

The entire MediaWiki user interface can be edited through the wiki itself by users with the necessary permissions (typically called "administrators"). This is done through a special namespace with the prefix "MediaWiki:", where each page title identifies a particular user interface message. Using an extension,[78] it is also possible for a user to create personal scripts, and to choose whether certain sitewide scripts should apply to them by toggling the appropriate options in the user preferences page.

### Templates

The "MediaWiki:" namespace was also originally used for creating custom text blocks that could then be dynamically loaded into other pages using a special syntax. This content was later moved into its own namespace, "Template:".

Templates are text blocks that can be dynamically loaded inside another page whenever that page is requested. The template is a special link in double curly brackets (for example "{{Disputed|date=October 2018}}"), which calls the template (in this case located at Template:Disputed) to load in place of the template call.

Templates are structured documents containing attribute–value pairs. They are defined with parameters, to which are assigned values when transcluded on an article page. The name of the parameter is delimited from the value by an equals sign. A class of templates known as infoboxes is used on Wikipedia to collect and present a subset of information about its subject, usually on the top (mobile view) or top right-hand corner (desktop view) of the document.

A related method, called template substitution (called by adding subst: at the beginning of a template link) inserts (like a copy and paste operation) the contents of the template into the target page, instead of loading the template contents dynamically whenever the page is loaded. This can lead to inconsistency when using templates, but may be useful in certain cases, and in most cases requires fewer server resources (the actual amount of savings can vary depending on wiki configuration and the complexity of the template).

Templates have found many different uses. Templates enable users to create complex table layouts that are used consistently across multiple pages, and where only the content of the tables gets inserted using template parameters. Templates are frequently used to identify problems with a Wikipedia article by putting a template in the article. This template then outputs a graphical box stating that the article content is disputed or in need of some other attention, and also categorize it so that articles of this nature can be located. Templates are also used on user pages to send users standard messages welcoming them to the site,[79] giving them awards for outstanding contributions,[80][81] warning them when their behavior is considered inappropriate,[82] notifying them when they are blocked from editing,[83] and so on.

### Groups and restriction of access

MediaWiki offers flexibility in creating and defining user groups. For instance, it would be possible to create an arbitrary "ninja" group that can block users and delete pages, and whose edits are hidden by default in the recent changes log. It is also possible to set up a group of "autoconfirmed" users that one becomes a member of after making a certain number of edits and waiting a certain number of days.[84] Some groups that are enabled by default are bureaucrats and sysops. Bureaucrats have power to change other users' rights. Sysops have power over page protection and deletion and the blocking of users from editing. MediaWiki's available controls on editing rights have been deemed sufficient for publishing and maintaining important documents such as a manual of standard operating procedures in a hospital.[85]

When a page consists only of useless content, there are several ways to remove that content. The simplest way, available to all users, is simply to blank the page. However, this interferes with page existence detection, unless an extension is installed to treat blanked pages as though they were nonexistent.[86] Blanking also leaves the content accessible through the history page, an outcome that, while potentially increasing transparency by allowing non-sysops to easily review the content removal decision for appropriateness, might be unacceptable or even unlawful[87] in some cases. Another option is for a sysop to delete the page, and thereby prevent it from being viewed by non-sysops. Another level of deletion, called RevisionDelete, can be used by a group (e.g. "Oversighters") to prevent a page from being viewed by non-members of that group.[88] It is also possible, using certain extensions, to remove content from being viewed through any of the normal channels on the wiki,[89] or even to completely delete revisions from the database.[90]

MediaWiki comes with a basic set of features related to restricting access, but its original and ongoing design is driven by functions that largely relate to content, not content segregation. As a result, with minimal exceptions (related to specific tools and their related "Special" pages), page access control has never been a high priority in core development and developers have stated that users requiring secure user access and authorization controls should not rely on MediaWiki, since it was never designed for these kinds of situations. For instance, it is extremely difficult to create a wiki where only certain users can read and access some pages.[91] Here, wiki engines like Foswiki, MoinMoin and Confluence provide more flexibility by supporting advanced security mechanisms like access control lists.

### Extensibility

The MediaWiki codebase contains various hooks using callback functions to add additional PHP code in an extensible way. This allows developers to write extensions without necessarily needing to modify the core or having to submit their code for review. Installing an extension typically consists of adding a line to the configuration file, though in some cases additional changes such as database updates or core patches are required.

Five main extension points were created to allow developers to add features and functionalities to MediaWiki. Hooks are run every time a certain event happens; for instance, the ArticleSaveComplete hook occurs after a save article request has been processed.[92] This can be used, for example, by an extension that notifies selected users whenever a page edit occurs on the wiki from new or anonymous users.[93] New tags can be created to process data with opening and closing tags (<newtag>...</newtag>).[94] Parser functions can be used to create a new command ({{#if:...|...|...}}).[95] New special pages can be created to perform a specific function. These pages are dynamically generated. For example, a special page might show all pages that have one or more links to an external site or it might create a form providing user submitted feedback.[96] Skins allow users to customize the look and feel of MediaWiki.[97] A minor extension point allows the use of Amazon S3 to host image files.[98]

## Extensions

Main page: Software:MediaWiki extension

### Resources to developers

MediaWiki can be made more advanced and useful for various purposes through its extensions. These extensions vary greatly in complexity.

The Wikimedia Foundation operates a Git server where many extensions host their repository. Most of them also have a documentation page on the MediaWiki website.

MediaWiki code review was itself historically facilitated through a MediaWiki extension.[99] As of March 2012, it has been done through Gerrit.

Since version 1.16, MediaWiki uses the jQuery library.[100]

### Text manipulation

Tim Starling in 2008

Among the most popular extensions is a parser function extension, ParserFunctions, which allows different content to be rendered based on the result of conditional statements.[101] These conditional statements can perform functions such as evaluating whether a parameter is empty, comparing strings, evaluating mathematical expressions, and returning one of two values depending on whether a page exists. It was designed as a replacement for a notoriously inefficient template called {{Qif}}.[102] Schindler recounts the history of the ParserFunctions extension as follows:[31]

Another parser functions extension, StringFunctions, was developed to allow evaluation of string length, string position, and so on. Wikimedia communities, having created awkward workarounds to accomplish the same functionality,[103] clamored for it to be enabled on their projects.[104] Much of its functionality was eventually integrated into the ParserFunctions extension,[105] albeit disabled by default and accompanied by a warning from Tim Starling that enabling string functions would allow users "to implement their own parsers in the ugliest, most inefficient programming language known to man: MediaWiki wikitext with ParserFunctions."[106]

Since 2012 an extension, Scribunto, has existed that allows for the creation of "modules" — wiki pages written in the scripting language Lua — which can then be run within templates and standard wiki pages. Scribunto has been installed on Wikipedia and other Wikimedia sites since 2013, and is used heavily on those sites. Scribunto code runs significantly faster than corresponding wikitext code using ParserFunctions.[107]

### For footnotes and academic-related display

Another very popular extension is a citation extension that enables footnotes to be added to pages using inline references.[108] This extension has, however, been criticized for being difficult to use and requiring the user to memorize complex syntax. A gadget called RefToolbar attempts to make it easier to create citations using common templates. MediaWiki has some extensions that are well-suited for academia, such as mathematics extensions[109] and an extension that allows molecules to be rendered in 3D.[110]

### Integration

A generic Widgets extension exists that allows MediaWiki to integrate with virtually anything. Other examples of extensions that could improve a wiki are category suggestion extensions[111] and extensions for inclusion of Flash Videos,[112] YouTube videos,[113] and RSS feeds.[114] Metavid, a site that archives video footage of the U.S. Senate and House floor proceedings, was created using code extending MediaWiki into the domain of collaborative video authoring.[115]

There are many spambots that search the web for MediaWiki installations and add linkspam to them, despite the fact that MediaWiki uses the nofollow attribute to discourage such attempts at search engine optimization.[116] Part of the problem is that third party republishers, such as mirrors, may not independently implement the nofollow tag on their websites, so marketers can still get PageRank benefit by inserting links into pages when those entries appear on third party websites.[117] Anti-spam extensions have been developed to combat the problem by introducing CAPTCHAs,[118] blacklisting certain URLs,[119] and allowing bulk deletion of pages recently added by a particular user.[120]

### Searches and queries

MediaWiki comes pre-installed with a standard text-based search. Extensions exist to let MediaWiki use more sophisticated third-party search engines, including Elasticsearch (which since 2014 has been in use on Wikipedia), Lucene[121] and Sphinx.[122]

Various MediaWiki extensions have also been created to allow for more complex, faceted search, on both data entered within the wiki and on metadata such as pages' revision history.[123][124] Semantic MediaWiki is one such extension.[125][126]

## Database

A schematic of the MediaWiki database structure

MediaWiki can use either the MySQL/MariaDB, PostgreSQL or SQLite relational database management system. Support for Oracle Database and Microsoft SQL Server has been dropped since MediaWiki 1.34.[127] A MediaWiki database contains several dozen tables, including a page table that contains page titles, page ids, and other metadata;[128] and a revision table to which is added a new row every time an edit is made, containing the page id, a brief textual summary of the change performed, the user name of the article editor (or its IP address the case of an unregistered user) and a timestamp.[129][130]

In a 4½ year period, the MediaWiki database had 170 schema versions.[131] Possibly the largest schema change was done in MediaWiki 1.5, when the storage of metadata was separated from that of content, to improve performance flexibility. When this upgrade was applied to Wikipedia, the site was locked for editing, and the schema was converted to the new version in about 22 hours. Some software enhancement proposals, such as a proposal to allow sections of articles to be watched via watchlist, have been rejected because the necessary schema changes would have required excessive Wikipedia downtime.[132]

## Performance and storage

Because it is used to run one of the highest-traffic sites on the Web, Wikipedia, MediaWiki's performance and scalability have been highly optimized.[30] MediaWiki supports Squid, load-balanced database replication, client-side caching, memcached or table-based caching for frequently accessed processing of query results, a simple static file cache, feature-reduced operation, revision compression, and a job queue for database operations. MediaWiki developers have attempted to optimize the software by avoiding expensive algorithms, database queries, etc., caching every result that is expensive and has temporal locality of reference, and focusing on the hot spots in the code through profiling.[133]

MediaWiki code is designed to allow for data to be written to a read-write database and read from read-only databases, although the read-write database can be used for some read operations if the read-only databases are not yet up to date. Metadata, such as article revision history, article relations (links, categories etc.), user accounts and settings can be stored in core databases and cached; the actual revision text, being more rarely used, can be stored as append-only blobs in external storage. The software is suitable for the operation of large scale wiki farms such as Wikimedia, which had about 800 wikis as of August 2011. However, MediaWiki comes with no built-in GUI to manage such installations.

Empirical evidence shows most revisions in MediaWiki databases tend to differ only slightly from previous revisions. Therefore, subsequent revisions of an article can be concatenated and then compressed, achieving very high data compression ratios of up to 100x.[133]

For more information on the architecture, such as how it stores wikitext and assembles a page, see External links.

## Limitations

The parser serves as the de facto standard for the MediaWiki syntax, as no formal syntax has been defined. Due to this lack of a formal definition, it has been difficult to create WYSIWYG editors for MediaWiki, although several WYSIWYG extensions do exist, including the popular VisualEditor.

MediaWiki is not designed to be a suitable replacement for dedicated online forum or blogging software,[134] although extensions do exist to allow for both of these.[135][136]

MediaWiki by default has little support for the creation of dynamically assembled documents, or pages that aggregate data from other pages. Some research has been done on enabling such features directly within MediaWiki.[140] The Semantic MediaWiki extension provides these features. It is not in use on Wikipedia, but in more than 1,600 other MediaWiki installations.[141] The Wikibase Repository and Wikibase Repository client are however implemented in Wikidata and Wikipedia respectively, and to some extent provides semantic web features, and linking of centrally stored data to infoboxes in various Wikipedia articles.

Upgrading MediaWiki is usually fully automated, requiring no changes to the site content or template programming. Historically troubles have been encountered when upgrading from significantly older versions.[142]

## Security

MediaWiki developers have enacted security standards, both for core code and extensions.[143] SQL queries and HTML output are usually done through wrapper functions that handle validation, escaping, filtering for prevention of cross-site scripting and SQL injection.[144] Many security issues have had to be patched after a MediaWiki version release,[145] and accordingly MediaWiki.org states, "The most important security step you can take is to keep your software up to date" by subscribing to the announcement listserv and installing security updates that are announced.[146]

## Developer community

MediaWiki developers are spread around the world, though with a majority in the United States and Europe. Face-to-face meetings and programming sessions for MediaWiki developers have been held once or several times a year since 2004.[147]

## Support

Support for MediaWiki users consists of:

• MediaWiki.org, including the Support Desk.
• An official mailing list, Mediawiki-l.
• Several books have been written about MediaWiki administration,[148] including some free online books.[149][150]

## Comparison to other online collaboration software

Main page: Software:Comparison of wiki software

Users of online collaboration software are familiar with MediaWiki's functions and layout due to its noted use on Wikipedia. Compared to other wikis, MediaWiki is also fairly aesthetically pleasing, though simple, and has an easily customized side menu and stylesheet.[151] However, in one assessment in 2006, Confluence was deemed to be a superior product due to its very usable API and ability to better support multiple wikis.[110] Wiki providers Socialtext and JotSpot have/had project management features that MediaWiki lacks.[152]

A study was done at the University of Hong Kong comparing TWiki to MediaWiki. The authors noted that TWiki has been considered as a collaborative tool for development of educational papers and technical projects, whereas MediaWiki's most noted use is on Wikipedia. Although both platforms allow discussion and tracking of progress, TWiki has a "Report" part that MediaWiki lacks. Students perceived MediaWiki as being easier to use and more enjoyable than TWiki. When asked whether they recommended using MediaWiki for knowledge management course group project, 15 out of 16 respondents expressed their preference for MediaWiki giving answers of great certainty, such as "of course", "for sure".[153] TWiki and MediaWiki both have flexible plug-in architecture.[154]

A study that compared students' experience with MediaWiki to that with Google Documents found that students gave the latter a much higher rating on user-friendly layout.[155]

## References

2. Reed, Sam (26 March 2020). "Security and maintenance release: 1.31.7 / 1.33.3 / 1.34.1". MediaWiki-announce (Mailing list). Retrieved 26 March 2020.
3. Reed, Sam (19 December 2019). "Announcing MediaWiki 1.34.0". mediawiki-announce (Mailing list). Archived from the original on December 19, 2019. Retrieved 19 December 2019.
5. "MediaWiki history". MediaWiki website. //www.mediawiki.org/w/index.php?title=MediaWiki_history&oldid=618636.
6. "What is MediaWiki?" (in en). January 9, 2021.
7. Magnus Manske's announcement of "PHP Wikipedia", wikipedia-l, 2001-08-24
8. Barrett, Daniel J. (October 2008). MediaWiki. O'Reilly Media. ISBN 978-0-596-51979-7. Retrieved April 23, 2010.
9. Česky. "Wikipedia:Statistics – Wikipedia, the free encyclopedia". En.wikipedia.org. //en.wikipedia.org/w/index.php?title=Wikipedia:Statistics&oldid=352738565.
11. "Category:MediaWiki configuration settings". MediaWiki. September 11, 2016.
13. Rafe Needleman (November 19, 2008), Wikipedia gears up for flood of video and photo files, C-Net, retrieved April 23, 2010
14. "Development policy". MediaWiki. July 19, 2013.
15. "Summer of Code". MediaWiki. March 26, 2013.
16. "Wikimedia". Open Hub.  Approximate counts (not deduplicated) as of 2012-11-04: 139 for core, 155 for extensions supported by WMF, 190 and 42 for extensions only hosted on WMF's Git and SVN repositories respectively.
17. "Version lifecycle". MediaWiki. September 5, 2018.
18. Bartlett, Manning (November 14, 2001). "Magnus's new script...". Wikimedia Foundation.
19. Manske, Magnus (November 14, 2001). "Magnus's new script...". Wikimedia Foundation.
20. Mayer, Daniel. "Phase IV, Wikibooks.org/.com and WikimediaFoundation.org/.com (was Wikis and uniformity)". Wikipedia-L mailing list archives.
21. "Differences between Wikipedia, Wikimedia, MediaWiki, and wiki". MediaWiki. May 25, 2010.
22. Wikimedia contributors (January 10, 2007). "International logo contest/results". Meta-wiki. Wikimedia Foundation.
23. Wikimedia contributors (January 17, 2007). "Historical/Logo history". Meta-wiki. Wikimedia Foundation.
24. Erik Möller (July 26, 2003). "File talk:EloquenceSunflowerNew-Small.png – Meta". Meta-wiki. Wikimedia Foundation.
25. David Weinberger (2007). Everything Is Miscellaneous: The Power of the New Digital Disorder. Times Books. p. 99. ISBN 978-0-8050-8043-8.
26. "Wikipedia and MediaWiki". Presentation MediaWiki development (video). April 28, 2006.
27. M Schindler; D Vrandecic (2009), Introducing new features to Wikipedia, Proceedings of WebSci, retrieved June 24, 2018
29. Sarabadani, Amir (31 March 2021). "Logo of MediaWiki has changed". Wikimedia Foundation.
30. MediaWiki testimonials , mediawiki.org
31. "A stealth transformation: introducing wikis to the UN". Knowledge Management for Development Journal. 2007.
32. Lerner, Reuven M. (February 23, 2006), Installing and Customizing MediaWiki, Linux Journal, retrieved April 23, 2010
33. Petrazickis, Leons (2009), Deploying PHP applications on IBM DB2 in the cloud: MediaWiki as a case study, Proceedings of the 2009 Conference of the Center for Advanced Studies on Collaborative Research, pp. 304–305, doi:10.1145/1723028.1723069
34. "Manual:\$wgLogo". MediaWiki. December 12, 2009.
35. "Manual:LocalSettings.php". MediaWiki. March 29, 2007.
36. "HTML to Wiki Converter – tables". WMF Labs. March 29, 2008.
37. "Markup spec". MediaWiki.
38. Jakes, David (August 15, 2006), Wild about Wikis, Tech & Learning, retrieved April 23, 2010
39. Foley, Brian; Chang, Tae (2008), Wiki as a professional development tool, Technology and Teacher Education, retrieved April 23, 2010
40. "API". MediaWiki. May 17, 2010.
41. "Pywikibot – MediaWiki". mediawiki.org.
42. Bartolo, Laura M.; Lowe, Cathy S.; Songar, Poonam; Tandy, Robert J. (May 20, 2009), Facilitating Wiki/Repository Communication with Metadata, Georgia Institute of Technology, retrieved April 23, 2010
43. "API:Client code". MediaWiki. May 24, 2010.
44. "Category:WYSIWYG extensions". MediaWiki. April 10, 2008.
45. "Tags – Wikipedia, the free encyclopedia". En.wikipedia.org.
46. "Manual:Tags". MediaWiki. August 31, 2009.
47. "IRC/Channels – Meta". Meta.wikimedia.org.
48. Daniel Nasaw (July 25, 2012). "Meet the 'bots' that edit Wikipedia". BBC News.
49. "Manual:Watchlist". MediaWiki. November 24, 2009.
50. Kevin Yager (March 16, 2006), "Wiki ware could harness the Internet for science", Nature 440 (7082): 278, doi:10.1038/440278a, PMID 16541049, Bibcode2006Natur.440..278Y
51. Pintscher, Lydia (2013-09-23). "Wikidata is Here!" (in en).
52. "Help:Navigation". MediaWiki. May 21, 2010.
53. Carl Challborn; Teresa Reimann (December 2004), Wiki products: a comparison, Athabasca University, retrieved April 23, 2010
54. Newman, Aaron, Adam Steinberg, and Jeremy Thomas (2008). Enterprise 2. 0 Implementation. McGraw-Hill Professional. p. 185. ISBN 978-0-07-159160-7.
55. Malcolm, Jeremy (2008). Multi-Stakeholder Governance and the Internet Governance Forum. Terminus Press. pp. 188, 280. ISBN 978-0-9805084-0-6.
56. Ebersbach, Anja, Markus Glaser, Richard Heigl, and Gunter Dueck (2006). Wiki. Springer. pp. 55, 80–82, 109, 120–121, 156. ISBN 978-3-540-25995-4.
57. Jakob Voss (April 27, 2006). "Collaborative thesaurus tagging the Wikipedia way". arXiv:cs.IR/0604036.
58. "Extension:Gadgets". MediaWiki. March 30, 2010.
59. Česky (May 16, 2010). "Template:Welcome – Wikipedia, the free encyclopedia". En.wikipedia.org.
60. T Kriplean et al. (2008), Articulations of wikiwork: uncovering valued work in wikipedia through barnstars, Proceedings of the ACM, pp. 47–56, doi:10.1145/1460563.1460573, ISBN 9781605580074
61. Česky. "Wikipedia:Barnstars – Wikipedia, the free encyclopedia". En.wikipedia.org.
62. Česky. "Template:Test – Wikipedia, the free encyclopedia". En.wikipedia.org.
63. "Template:Test5 – Wikipedia, the free encyclopedia". En.wikipedia.org. June 19, 2008.
64. H Zielke; W Boemke; M Kastrup; C Melzer (November 21, 2007), Operating Procedures in Clinical Practice, Royal College of Anaesthetists, retrieved April 25, 2010
65. "Extension:PureWikiDeletion". MediaWiki. May 26, 2010.
66. "Extension:Oversight". MediaWiki. May 15, 2010.
67. "Manual:Hooks/ArticleSaveComplete". MediaWiki. May 26, 2010.
68. "Manual:Tag extensions". MediaWiki. May 21, 2010.
69. "Manual:Parser functions". MediaWiki. March 22, 2010.
70. "Manual:Skins". MediaWiki. May 14, 2010.
71. "Manual:Integration with S3". MediaWiki. March 22, 2010.
72. jQuery on MediaWiki
73. "Extension:ParserFunctions". MediaWiki. December 25, 2009.
74. "Bug 6455 – Enable StringFunctions on WMF wikis". bugzilla.wikimedia.org.
75. "Extension:Cite". MediaWiki. May 3, 2010.
76. "Category:Math extensions". MediaWiki. December 26, 2009.
77. Marieke Guy (January 2007), Wikido: Exploiting the Potential of Wikis, Ariadne, retrieved April 23, 2010
78. "Category:YouTube extensions". MediaWiki. September 16, 2008.
79. M Dale; A Stern; M Deckert; W Sack (2009), System demonstration: Metavid.org: a social website and open archive of congressional video, Proceedings of the 10th Annual International Conference on Digital Government Research: Social Networks: Making Connections between Citizens, Data and Government, pp. 309–310, ISBN 978-1-60558-535-2
80. "Wiki spam – Meta". Meta.wikimedia.org.
81. Goldman, Eric, Wikipedia's Labor Squeeze and its Consequences, 8, Journal on Telecommunications and High Technology Law
82. "Extension:ConfirmEdit". MediaWiki. May 5, 2010.
83. "Extension:SpamBlacklist". MediaWiki. March 24, 2010.
84. "Extension:Nuke". MediaWiki. May 19, 2010.
85. Lucene-search MediaWiki extension , mediawiki.org
86. SphinxSearch MediaWiki extension , mediawiki.org
87. Masanori Arita; Kazuhiro Suwa (September 17, 2008), "Search extension transforms Wiki into a relational system: A case for flavonoid metabolite database", BioData Min (BioData Mining) 1 (1): 7, doi:10.1186/1756-0381-1-7, PMID 18822113
88. Script error: No such module "Cite Q".Wikidata Q21011200
89. Eric Ras; Jörg Rech; Sebastian Weber (August 1, 2008), Collaborative Authoring of Learning Elements for Adaptive Learning Spaces, Fifth International Conference on Adaptive Hypermedia and Adaptive Web-Based Systems, retrieved April 23, 2010
90. Hartung, Michael. "A Platform for Collaborative Management of Semantic Grid Metadata". Intelligent distributed computing, systems and applications. p. 123.
91. "Manual:Page table". MediaWiki. May 15, 2010.
92. Ortega, Felipe; González-Barahona, Jesus M.; Robles, Gregorio (2007), The Top-Ten Wikipedias: A Quantitative Analysis Using WikiXRay
93. Curino, Carlo A.; Tanca, Letizia; Zaniolo, Carlo (2008), Information Systems Integration and Evolution: Ontologies at Rescue, Workshop on Semantic, retrieved April 23, 2010
94. T Dumitras; P Narasimhan (2009), No downtime for data conversions: Rethinking hot upgrades, retrieved April 29, 2010
95. Bergsma, Mark, Wikimedia Architecture, retrieved October 21, 2015
96. "Extension:Wikilog". MediaWiki. November 27, 2009.
97. N Augar; R Raitman; W Zhou (2004), Teaching and learning online with wikis, Beyond the comfort zone, pp. 95–104
98. Cubric, Marija (2007), Analysis of the use of Wiki-based collaborations in enhancing student learning, University of Hertfordshire, p. 11, retrieved April 24, 2010
99. Albertsen, Johannes; Bouvin, Niels Olof (2008), User defined structural searches in mediawiki, Proceedings of the nineteenth ACM conference on Hypertext and hypermedia, ISBN 978-1-59593-985-2
100. T Dumitraş; P Narasimhan (2009), Toward upgrades-as-a-service in distributed systems, Proceedings of the 10th ACM/IFIP/USENIX International Conference on Middleware, pp. 1–2
101. Perrin, Chad (April 30, 2008), Five security tips from MediaWiki's lead developer, Tech Republic
102. "News". MediaWiki.
103. "Manual:Security". MediaWiki. March 22, 2010.
104. "Events". Mediawiki.org.
105. Books about MediaWiki , mediawiki.org
106. MediaWiki Administrator's Handbook. Wikibooks. Retrieved October 20, 2014.
107. MediaWiki User Guide, Wikibooks, retrieved October 20, 2014
108. Bryant, Todd (2006), Social Software in Academia, Educause Quarterly, retrieved April 23, 2010
109. Bean, L., & Hott, D. D. (July–August 2005), Wiki: A speedy new tool to manage projects, Journal of Corporate Accounting & Finance, pp. 3–8
110. Liang, M., Chu, S., Siu, F., & Zhou, A. (Dec 3–4, 2009), Comparing User Experiences in Using Twiki & Mediawiki to Facilitate Collaborative Learning, Proceedings of the 2009 International Conference on Knowledge Management
111. Schulz, Judith (2009), Company-Wiki as a knowledge transfer instrument for reducing the shortage of skilled workers, Institute of Technology and Education, retrieved April 25, 2010
112. Chu, S., Kennedy, D., & Mak, M. (December 3–4, 2009), MediaWiki and Google Docs as online collaboration tools for group project co-construction, Proceedings of the 2009 International Conference on Knowledge Management, retrieved April 23, 2010