ArticleslgStudy

computer science

MediaWiki

MediaWiki is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand MediaWiki rather than just read about it. In short: MediaWiki is wiki software written in PHP, initially released in 2002 for its use by Wikipedia. It powers several wiki hosting websites across the Internet, as well as most websites hosted by the Wikimedia Foundation, including Wikipedia, Wiktionary, Wikimedia Commons, Wikiquote, Wikivoyage, Meta-Wiki and Wikidata, which define a large part of the set requirements for the software.

MediaWiki — main illustration
MediaWiki — illustration

Key takeaways

  • MediaWiki belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect MediaWiki to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of MediaWiki from memory before moving on to harder problems.

Reference excerpt

MediaWiki is wiki software written in PHP, initially released in 2002 for its use by Wikipedia. It powers several wiki hosting websites across the Internet, as well as most websites hosted by the Wikimedia Foundation, including Wikipedia, Wiktionary, Wikimedia Commons, Wikiquote, Wikivoyage, Meta-Wiki and Wikidata, which define a large part of the set requirements for the software. Besides its usage on Wikimedia sites, MediaWiki has been used as a knowledge management and content management system on websites such as Fandom, wikiHow and major internal installations like Intellipedia and Diplopedia. 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. Because Wikipedia is one of the world's largest and most visited 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 400 languages. The software has hundreds of configuration settings and more than 1,000 extensions available for enabling various features to be added or changed. It was originally developed by Magnus Manske and later further enhanced by Lee Daniel Crocker, after which development has been coordinated by the Wikimedia Foundation.

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

Internationalization and localization

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 400 languages on translatewiki.net, and can be further customized by site administrators (the entire interface is editable through the wiki). MediaWiki handles user-facing interface text through system messages, which can be customized for different languages and locales. For broader multilingual support, the MediaWiki Language Extension Bundle provides a curated set of extensions for adding language-related features to MediaWiki installations. 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. Cloud hosting can eliminate the need to deploy a new server. 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, adding a site logo, and installing extensions, to be made by modifying configuration settings contained in a file called LocalSettings.php. 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, and certain gadgets can be added by creating JavaScript pages in the MediaWiki namespace. The MediaWiki community publishes a comprehensive installation guide.

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 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. 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. The following side-by-side comparison illustrates the differences between wiki markup and HTML:

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

Editing interface

MediaWiki's default page-editing tools have been described as somewhat challenging to learn. 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." 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. VisualEditor has its own integrated wikitext editing interface known as 2017 wikitext editor, the older editing interface is known as 2010 wikitext editor.

… excerpt ends here. Continue reading the full article.

Illustrations

MediaWiki illustration
MediaWiki illustration
MediaWiki illustration
MediaWiki: Editing interface of MediaWiki 1.44.0-wmf.4, with syntax highlighting, showing the edit toolbar of the 2017 wikitext editor and some examples of wiki syntax
Editing interface of MediaWiki 1.44.0-wmf.4, with syntax highlighting, showing the edit toolbar of the 2017 wikitext editor and some examples of wiki syntax
MediaWiki: An example of interlanguage links
An example of interlanguage links

Worked examples

Example 1 — a first encounter with MediaWiki

Start with the simplest possible case. Write down what MediaWiki claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to MediaWiki before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about MediaWiki ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of MediaWiki

In research
MediaWiki appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses MediaWiki in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
MediaWiki is common in secondary-school and first-year university syllabi. It links to neighbouring topics 2002 software, Collaborative software, Cross-platform free software, so understanding it makes those chapters shorter.
In everyday life
Look for MediaWiki outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study MediaWiki in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what MediaWiki means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain MediaWiki out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is MediaWiki in simple terms?

MediaWiki is wiki software written in PHP, initially released in 2002 for its use by Wikipedia. It powers several wiki hosting websites across the Internet, as well as most websites hosted by the Wikimedia Foundation, including Wikipedia, Wiktionary, Wikimedia Commons, Wikiquote, Wikivoyage, Meta-W…

Why does MediaWiki matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study MediaWiki?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on MediaWiki.

Tags

  • 2002 software
  • Collaborative software
  • Cross-platform free software
  • Free content management systems
  • Free software programmed in PHP
  • Free wiki software
  • History of Wikipedia
  • MediaWiki
  • Multilingual websites
  • Software using the GNU General Public License
  • Version control systems

Keep exploring