Working with MediaWiki
2nd ed., HTML version

1 About MediaWiki

MediaWiki is an open-source wiki engine originally developed for use on Wikipedia, and Wikipedia is still by far the best-known use of it. But MediaWiki is also in use on at least tens of thousands of wikis around the world – it's almost certainly the world's most popular wiki software. It's also most likely the world's most powerful wiki software, although that statement will require more justification – hopefully this book will provide suitable proof.
In this chapter, we'll start with some of the non-technical aspects of MediaWiki.

History of MediaWiki

The history of MediaWiki starts with Wikipedia, and the history of Wikipedia starts with wikis, so we'll begin there. In 1995 Ward Cunningham, a programmer who was already known for his work in defining software design patterns, created the first wiki, on his company's website, c2.com. It was a very simple website, with one bizarre-at-the-time feature: every page had an "edit" link, where random visitors to the website could modify its contents. The wiki was meant to hold information about design patterns, as part of a section on the website called the "Portland Pattern Repository". Cunningham was inspired by HyperCard, an Apple application from the 1980s that stored information on editable "cards" that could link to one another; he wanted to create something similar for the then-new World Wide Web. For the name of this concept, Cunningham originally thought of "QuickWeb", but then remembered the "Wiki Wiki Shuttle", an airport shuttle he had taken in Honolulu, Hawaii, and decided to call his new idea "WikiWikiWeb". "Wiki" or "wiki wiki" means "fast" or "hurry up" in Hawaiian; and in fact it apparently derives from the English word "quickly", so its new presence in English is somewhat of a return.
"WikiWikiWeb" for a while referred to four things: the website hosted on c2.com, the software used to run it (written in Perl), and later any user-editable website (what is now known as a wiki), and any application used to run such a site (now known as wiki software). There was no great distinction for the first five years or so between the code used to run a wiki and the content on it, partly because there was nearly a 1:1 correspondence between the two: many of the original wiki administrators were programmers, and they tended to create their own new, or modified, version of the software to run their own wikis.
In 2000, Jimmy Wales, an internet entrepreneur living in Florida, decided to create Nupedia, a free online encyclopedia that would compete with the various subscription-only encyclopedias like Encyclopedia Britannica. He hired Larry Sanger to edit it. Like traditional encyclopedias, each article was written by an expert on the subject matter. Nupedia was a failure, managing to get all of 12 fully-finished articles in its first year. While the two were thinking about how to increase contributions, Sanger heard from a friend of his about wikis, and suggested the idea to Wales for use as a way to supplement Nupedia's content. Wales, though skeptical at first, put up a wiki. Sanger suggested that it be called "Wikipedia", and Wales agreed, obtaining the domain names "wikipedia.com" and "wikipedia.org". On January 15, 2001, Wikipedia was launched at wikipedia.com. Though interest was low at the beginning, it started to increase exponentially, and Nupedia was soon forgotten. Several months later, the first subdomains for non-English languages were created; the first was "deutsche.wikipedia.com" in March 2001. In August 2002, the content was transferred to wikipedia.org, reflecting Wales' new view of Wikipedia as a non-profit public resource, instead of the side project of a for-profit website.
Wales and Sanger later had a falling-out over philosophical differences, and now Sanger has become one of Wikipedia's most vocal critics. That fascinating turn of events is a subject for another book; but in any case, the path was in place for Wikipedia to achieve its meteoric rise in popularity. It soon fundamentally altered the course of wikis, and later it would fundamentally alter the world as well.
The software that Wales and Sanger originally ran Wikipedia on was UseModWiki, a Perl application written by Clifford Adams. UseModWiki, like most wiki software at the time, was the work of tinkerers: it was based on AtisWiki, which was based on CvWiki, which in turn was based on WikiWikiWeb, Cunningham's original application. And again like most wiki software of the time, UseModWiki used flat text files to store all page revisions. That approach was slow, and, given Wikipedia's constant growth, was proving unworkable. Wikipedia also needed functionality that UseModWiki didn't provide, so in late 2001 Wales hired Magnus Manske, a German programmer and active Nupedia contributor, to rewrite the software in PHP, now storing edits in a MySQL database. In January 2002, Wikipedia switched over to this new (unnamed) software. This new software had performance problems of its own, though. Programmer Lee Daniel Crocker started working on a newer version of the software, and in July 2002 Wikipedia switched to that software. Crocker's code was now known as "phase III", with UseModWiki and Manske's code retroactively referred to as "phase I" and "phase II", respectively.
A year later, in June 2003, Wales created the Wikimedia Foundation, also known as the WMF, to manage Wikipedia and its growing number of sister sites, like Wiktionary. The name "Wikimedia" was based on "Wikipedia", and had been suggested by Sheldon Rampton on a Wikipedia mailing list in March. The next month, Wikipedia enthusiast Daniel Mayer, writing on that same mailing list, suggested a name for Crocker's "phase III" software: "MediaWiki", a play on "Wikimedia". The name stuck, and was quickly made official.
Was "MediaWiki" an ideal name? Maybe not: its similarity to "Wikimedia" has caused no shortage of confusion, and almost everyone who has discussed the software has gotten those names mixed up at least once. And the presence of the word "media" in the name has led some people to think that the software specializes in audio, video and the like. Nonetheless, after a while everyone seems to get used to the name.
MediaWiki has been used by all Wikimedia websites since 2004. And almost since the beginning of MediaWiki's existence, it started getting heavily used on non-Wikimedia sites as well. By now, there have been tens of thousands, if not hundreds of thousands, of wikis, both public and private, that use MediaWiki software.
At this point, most early wiki software, like WikiWikiWeb, UseModWiki etc., is no longer in widespread use, but there are certainly wiki applications other than MediaWiki that are still in regular use and under development. Interestingly, nearly all of the wiki applications in widespread use today were originally created between 2002 and 2006. They include, besides MediaWiki, the open-source applications PmWiki, Tiki and TWiki (an exception, since it was started in 1998), and the proprietary applications Confluence and Socialtext. There are also various content-management systems that include some limited wiki functionality; these include Traction TeamPage and Microsoft SharePoint.
As for the Wikimedia Foundation, it has remained in charge of Wikipedia and its related sites, as well as MediaWiki. It moved to San Francisco, California in 2007, and has grown every year since 2003; it currently has almost 300 employees.
This growth has been accompanied by some conflict. Things came to a head in 2016 with the resignation of Lila Tretikov, who had been the WMF's second Executive Director. There had long some tension between the WMF's two primary objectives: encouraging the growth of its websites, like Wikipedia, and managing the technology used to run those sites, chiefly MediaWiki. There was a sentiment that the WMF was neglecting the technology side of things in its high-level goals, and indeed many of the technical initiatives out of the WMF in the previous years had less-than-ideal results: some fell significantly behind schedule (like VisualEditor), others were abandoned after lackluster reviews (like LiquidThreads, MoodBar and ArticleFeedback), and others never achieved fruition at all (like a mobile-friendly skin called Athena, and planned rewrites of the MediaWiki parser and ResourceLoader). This led in part to the hiring of Tretikov, who was primarily a technologist, in the hope that she would provide some strong technical leadership.
Tretikov brought a more top-down approach to management than the Wikimedia movement had seen before, culminating in an episode in which she let a rogue high-level employee put together a secret plan for Wikipedia to compete with Google as a global search engine. How much input she had into the plan is unknown, and the plan was quickly abandoned in any case; but after it became public knowledge, she continued to deny that it had ever existed – something that might be more forgivable from a tech CEO than from a community leader. This and other issues led to a drumbeat of complaints that ended with her resignation.
The dissatisfaction with Tretikov may have been due to specific problems with her management, rather than larger issues of Wikimedia governance. Nevertheless, during the ongoing debate, many of these larger issues were brought up. And this is relevant to us because among the ideas discussed in the wake of Tretikov's resignation was that the development of MediaWiki and related software should be spun off into its own organization, perhaps to be called the "MediaWiki Foundation", in the manner of many other organizations that manage the development of open-source software. At the time of writing in 2016, this remains an ongoing discussion, though the odds do seem stacked against it due to institutional inertia if nothing else.
But back to MediaWiki. The first released version of MediaWiki was 1.1, and the current version, at the time of this writing, is 1.27. We won't get into the changes that happened in each version here, though suffice it to say that there have been a lot; virtually the entire codebase has been rewritten, in some cases several times. You can see the full version history for MediaWiki at:
http://en.wikipedia.org/wiki/MediaWiki_version_history
During the over ten years that MediaWiki has existed, it has had contributions from hundreds of developers, translators and testers, along with a handful of usability experts, graphic designers, project managers, etc. It would be difficult to list here all of the people who have made significant contributions to MediaWiki, or even invaluable contributions. Two names stand out, though, for the scope of their involvement. The first is Brion Vibber, who is currently the Lead Software Architect for the Wikimedia Foundation, and who has essentially had that role in MediaWiki since nearly the beginning, adding enormous amounts of code and serving as the final word on what gets into the software and onto Wikimedia sites.
The second name is Tim Starling, who serves as the WMF's Lead Platform Architect, and who like Brion has been involved in development since nearly the beginning, has contributed a huge amount of code, and has had significant influence on the current state of the software.

Community and support

There's a strong community of users and developers around MediaWiki, who can provide support. The best ways to get support are the mailing list, the IRC channel, and on the MediaWiki website at mediawiki.org.
There are a large number of mailing lists for MediaWiki-related topics (26, at last count, although not all are still active). Only two are important, though, for average MediaWiki users:
Special mention should also be made of mediawiki-enterprise, a very low-traffic mailing list about the use of MediaWiki in companies and organizations. In the future, this list may take on a greater role.
You can see information about these and the other mailing lists, like how to subscribe, here:
https://www.mediawiki.org/wiki/Mailing_lists
Support is also always available at the MediaWiki IRC channel, #mediawiki, via freenode.net. There are other IRC channels, though they're not nearly as useful to regular MediaWiki users. You can see a full listing here:
https://www.mediawiki.org/wiki/IRC
You can also get support at mediawiki.org. To ask questions about core MediaWiki, you can go here:
https://www.mediawiki.org/wiki/Support
And for any specific extension, you can use its talk page on mediawiki.org to get support.
There is no single comprehensive conference for MediaWiki users and developers; instead, events are split between Wikimedia-focused ones and those for enterprise users. For Wikimedia projects and developers there are usually one or two MediaWiki-focused "summits" and "hackathons" each year, and there is also Wikimania, an annual conference on everything Wikimedia-related, which also includes a several-day hackathon. For enterprise users, there are EMWCon, the Enterprise MediaWiki Conference, which is held in the spring in the United States; and SMWCon, the Semantic MediaWiki Conference, which is held in the fall in Europe. (EMWCon began as an offshoot of SMWCon, but has a more general focus.)
The mediawiki.org "Events" page shows a constantly-updated list of MediaWiki-related events and hackathons around the world:
https://www.mediawiki.org/wiki/Events
If you think you've found a bug in MediaWiki or one of its extensions, or you've created a software patch and want to submit it, the best way to do that is at the MediaWiki bug tracker/task manager (which uses the software Phabricator), here:
https://phabricator.wikimedia.org
This is often the best place to make feature requests as well.
Finally, there are various ways to get paid support, either from individuals or from consulting companies. The most definitive list of both individuals and companies doing MediaWiki consulting is here:
https://www.mediawiki.org/wiki/Professional_development_and_consulting
It would be odd not to mention my own company here – WikiWorks (http://wikiworks.com). We may be the most explicitly MediaWiki-focused consulting company at this point, though we're far from the only that provides such services.

Available hosts

Instead of setting up a new wiki on your own domain, from scratch, you may want to have your wiki hosted on an existing website dedicated to wiki hosting – such sites are usually referred to as "wiki farms", or, as Wikipedia prefers to call them, "wiki hosting services". The advantage of such a setup is that it's much easier to get started -- you can often set up a wiki on a wiki farm, and start editing it, in minutes. Also, for the most part, you don't have to worry about the software -- you don't have to set up MediaWiki or any extensions, and you don't have to update it as new versions come out, because the wiki farm presumably takes care of that.
On the other hand, there are disadvantages to using a wiki farm, as there are any time that one's data is put in "the cloud" – to use the current buzzword for online data. There's no guarantee that the wiki's contents won't be lost, if the website in question stops operating, or there's some technical glitch, or it gets hacked. And if your wiki is meant to be private, there's the risk that its contents will get revealed due to some security leak. Of course, all the same risks exist on any computer network that your wiki might run on – but on third-party websites, the perception, at least, is that the risk is greater.
Let's say that you do want to use a wiki farm, though, and (since you're reading this book) that you want the software it runs on to be MediaWiki. Thankfully, MediaWiki is a popular wiki engine for wiki farms – in fact, it appears to be easily the most popular, with at least five serious wiki farms that use it. By comparison, most other wiki engines power no more than one.
The biggest MediaWiki-based wiki farm, by far, is Wikia, at wikia.com. In fact, it's the most popular wiki farm of any kind; according to the Alexa traffic-monitoring service, it's currently among the top 100 most popular websites in the world, and among the top 50 in the United States. And that may be even understating its popularity, since some of its most popular wikis, like Memory Alpha (for Star Trek) and WoWWiki (for the video game World of Warcraft) have their own domains, which means that Alexa isn't counting them as part of Wikia's traffic.
Wikia was founded in 2004 by Jimmy Wales – the co-founder of Wikipedia – as well as Angela Beesley (now Angela Beesley Starling), who was a Wikimedia Foundation board member at the time. For that reason, some people think Wikia is affiliated with Wikimedia or Wikipedia, but in fact there's no official connection.
Wikia differs from most other wiki farms in that they have to approve every new wiki that is proposed, with the main criterion being whether this new wiki will get sufficient traffic (Wikia currently gets all their revenue from the ads they run on the pages). So a wiki meant for use only by a specific group or organization wouldn't be accepted, and a private wiki wouldn't even be possible – all Wikia wikis are public. In practice, most wikis on Wikia – and certainly most of the popular ones – are on pop-culture topics: TV shows, movies, video games and books, with a special focus on anything related to science fiction or fantasy. If the wiki you're considering creating is anything along these lines, Wikia is a very reasonable choice.
Other wiki farms tend to allow anyone to create a wiki, with each wiki getting either a subdomain of the wiki farm's main domain, or a directory. In some cases, wiki farms make their money from ads, while in others, they get money from customers who pay for extra service.
The MediaWiki-based wiki farm closest to my heart is Referata, at referata.com – that's because I created it and still run it, via WikiWorks. Referata has been around since 2008. It offers a standard usage of MediaWiki for free, with some options -- like making one's wiki private – requiring a monthly payment.
Other useful MediaWiki-based wiki farms are WikiHoster.net (wikihoster.net), EditThis.info (editthis.info) and Wiki Site (www.wiki-site.com).
You can see a more complete listing of wiki farms here:
https://www.mediawiki.org/wiki/Hosting_services
How to choose one of these? For simple wikis, it shouldn't really matter. But if you have the need for special features, you can try looking at the site's "Special:Version" page, to see what version of MediaWiki it's running, and what extensions it has installed. You can also look at any of the wikis already hosted on that farm (usually there are a few linked from the homepage), to see what they look like, whether they're inundated with spam (you can check Special:RecentChanges for that), how quickly they load, whether they have a distracting amount of ads, etc.