MediaWiki Administrators' Tutorial Guide

By Mizanur Rahman
  • Instant online access to over 7,500+ books and videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. About MediaWiki

About this book

Run your own MediaWiki collaborative website with this fast-paced, friendly tutorial, which is full of information and advice for creating powerful MediaWiki sites, and filling them with varied and useful collaborative content. Whether you are creating a public wiki for completely open contributions, a private wiki for collaborating within your work team or group of friends, or even a wiki for personal use, this book will show you all the essential steps.

You will see the various ways of organizing and managing content, and preventing collaboration from getting out of control. You'll learn how to incorporate images and other media into your pages, as well as becoming a wiki markup wizard to produce intricately formatted pages with tables, lists, and more. On the technical side, the book covers how to administer users, back up and restore content safely, migrate your installation to another server or database, and even make hacks to the code.

MediaWiki is the free, open-source wiki engine software that powers Wikipedia and many of the other popular wikis across the Web. Written in PHP, it possesses many features that make it the engine of choice for large collaborative wikis: flexible markup, comprehensive user management, multimedia handling, and more.

Publication date:
March 2007


Chapter 1. About MediaWiki

Before we get down to starting on wiki engines (and wikis in general), I would like to take a minute to present a case in point—the wiki that started it all.


The free encyclopedia that anyone can edit is the slogan of Wikipedia, an online encyclopedia. Wikipedia is a great online resource center for everyone and every purpose. It is the biggest multilingual encyclopedia available online, containing over 2 million articles and still growing. You won't be surprised to hear that many of us have first heard the term wiki from the site Wikipedia. Have you ever wondered what software is managing such a huge number of articles and performing flawlessly? The software is none other than MediaWiki, a wiki engine that manages wiki site. Now let's see what a wiki means.



The free encyclopedia that anyone can edit is the slogan of Wikipedia, an online encyclopedia. Wikipedia is a great online resource center for everyone and every purpose. It is the biggest multilingual encyclopedia available online, containing over 2 million articles and still growing. You won't be surprised to hear that many of us have first heard the term wiki from the site Wikipedia. Have you ever wondered what software is managing such a huge number of articles and performing flawlessly? The software is none other than MediaWiki, a wiki engine that manages wiki site. Now let's see what a wiki means.



A wiki is a browser-based collaborative writing environment, in which a community may amass and exchange information on particular topics, and to which anyone may contribute without having web programming skills. In other words, a wiki is a piece of software that is used for collaborative content creation.

Different people have different ideas about what a wiki really is, but whichever definition we take, a wiki is software that handles complex problems in a simple manner.

According to Leuf and Cunningham, the creators of the original wiki concept, "a wiki is a freely expandable collection of interlinked web pages, a hypertext system for storing and modifying information—a database, where each page can easily be edited by any user with a forms-capable web browser client". The content can be directly linked to that found in other wikis and in web documents.

In many situations, we need something collaborative on the Internet. We should be able to contribute to a particular discussion and ensure that everyone has the ability to participate. Wiki gives us this opportunity and flexibility to perform such tasks. To use a wiki, we do not have to be a webmaster or have knowledge about web programming. We do not need any special software for that. Just open a web browser, go to a wiki site and start writing. We neither have to wait for a webmaster to upload our contents and share with others, nor do we have to wait for any administrator to approve our contents to be shown. We can do it ourselves instantly.

When to Use a Wiki

As we have just discussed, a wiki is used to create collaborative or community sites, and it will not be wise to use a wiki site for personal purposes. We can use wiki when we need to build something for the community, where more than one person will share their views, knowledge, and opinions. We can use wiki for brainstorming, a community forum based on specific topics, developing frequently ask questions (FAQs), a knowledge base, course management and project management, family histories, planning, etc.

These are the possibilities that we can implement using a wiki, but is this the only reason we will be using a wiki? The answer is no, not at all. Suppose we are developing an open‑source project where people from different locations are contributing. Now to build a collaborative system, we might need some people working on the collaboration process, to take information from each contributor, make a page, and publish it for the other contributors, or need the contributor to mail the findings and changes to the other contributors.

There are two bottlenecks in these situations. For the first one, there is no necessity of collecting information from contributors and presenting information to others. It is just a waste of time. For the second one, think about the others who join in later for the development; how will they know all the information about the previous contributions? The answer is someone will demonstrate all the things to the newcomer and keep doing it again and again as new contributors join the program in the future. But does it really make any sense? A wiki-based site can take care of all these painful tasks itself. We do not need anyone to take notes from contributors and publish them online. Each contributor can do it himself or herself by adding, editing contents in the wiki site. It is the easiest job on earth to work with a wiki site.

Wiki versus Blog, Forum, and CMS

A question could arise in your minds at this stage: Can't we do the same task using a CMS (content management system), forum, blog, or other community software? The answer is yes. But wait! Don't jump to any conclusion yet. If we think a forum, blog, and CMS are easy solutions for this, then a wiki will be an even easier solution for the problem. Let's explore a few simple differences:






Posting/Editing content

Usually done by the blog owner. Visitors can post comments on a particular post, but it requires approval from the blog owner before showing to the site.

Any registered member can post a message but in general you might need approval of the administrator for that. Visitors or other users can reply on the message, but cannot change the original post.

Only an administrator can post the content. Other users can view the content.

Anyone can add or edit content easily without any intervention from the administrator.


The blog owner writes the content and other comments on it. So the blog owner is the main contributor.

For a particular topic, the participants are the contributors to the topic, but only the admin can change the core topic content.

In CMS, the administrator or the privileged to create contents are the contributors. Others can not comment or edit the contents.

In a wiki everyone is a contributor. He or she can edit anyone's content, and even complete the uncompleted contents.

In general a wiki can be classified as a very simple tool for managing your content. The wiki stands out among forums, blogs, and CMS for its simplicity. A wiki gives you the flexibility to do more things that any other single piece of software can provide. You can use wiki pages to serve your content like a CMS. You can use wiki talk pages to create discussions like in a forum. A wiki might not have the all the features that you can have in a CMS and forum software, but it gives you many options so that you can play around and create feature‑rich sites with basic tools. It is just like a blank canvas, and you can portray anything you want.

Is a Wiki Right for You?

The answer is: it solely depends on your requirements. If you are planning to build an e-commerce site, then a wiki is not a good solution for you. If you are looking to build a personal information site, then a wiki is not the right option for you. There can be many other situations for which a wiki would not be a suitable solution. However, whenever you want to build a collaborative site, where every voice can be heard, you can consider a wiki as a good solution.

If you need to manage large content you can easily choose a wiki since the largest online encyclopaedia, Wikipedia, uses a wiki to manage such large content. Content management has been transformed to a simple task after arrival of wikis in the scenario.

Nowadays open-source projects are blooming. We have thousands of open-source projects where millions of people are participating, contributing, and using projects. The open-source community is growing rapidly and in order to manage such a large community, many open-source projects have their own sites for supporting users and contributors with range of knowledgebases, development materials, news, announcements, etc. It is a very hard job to manage such large numbers of users and amounts of content. That is why many of the most popular open-source projects have shifted to wiki solutions for their content management issues. Mozilla wiki (, Linux Fedora Core wiki (, the Eclipse Project wiki (, and the AJAX Patterns site ( are a few names to mention for their effective wiki use.

So if you are looking to build a knowledge-based site you can definitely choose a wiki as the perfect solution.

You can use a wiki for creating information-based site like. Wikitravel ( is popular site run by a wiki in order to serve traveling information to travelers from around the world. You can use wiki for creating news sites as well as a dictionary. The bottom line of the discussion is that if your content is large, then it is always better to use a wiki.


Web 2.0

With the bursting of the dot-com bubble in 2001, many things happened to the web world. Lots of new sites came out and made their presence felt in the world of web. New concepts and new vision gave the Web a new life. That's what we call the Web 2.0. It is a move from the complex services aimed at attracting customers, to simple friendly tools aimed at helping people benefit from each other's presence and skills.

Today, the Web is not just few HTML pages for information sharing. Today's Web is much more mature and focused on a particular area. Perhaps the best known word about Web 2.0 is AJAX (Asynchronous JavaScript and XML). Google was the first to introduce this concept to the web world and it was grasped within no time by everyone. In the early web scenarios, we focused more on technologies like double-click, personal websites, content management system, screen scrapping, etc. However, our views have changed after the arrival of Web 2.0. We are now focusing more on making the Web a platform to develop web-based applications.

The core competencies of Web 2.0 are:

  • It is a service not a packaged product.

  • It is an architecture where any one can participate.

  • It has cost-effective scalability.

  • It has mixable data sources and data transformation.

  • It is focused to create software above the level of a single device.

  • It harnesses collective intelligence.

Web 2.0 and Wiki

As we have seen from the previous discussion, Web 2.0 is the next big thing for the web world. If we think of Web 2.0 as a medium for collaboration, then here are the key concepts that build the thought:

  • Users control the processing of information and generation of new forms of expression, as well as subscriptions and relationships.

  • Makes the Web a point of presence by creating internet-mediated social environments with collective activities and participation.

  • Is more focused on user engagement and rich user experiences.

  • It is about participation and democracy for the users that encourages users to add value to the application they are using. It is a media revolution where you can hear the voice of the crowd rather than a single voice.

Now we put the beads together for a wiki to fit it into the Web 2.0 paradigm:

  • A wiki is a piece of application that is used for collaborative participation.

  • Users are the primary contributors for a wiki-based site.

  • Users process information and publish it for all.

  • It is all about people's voices that we hear.

  • People are breaking the barrier of the geographical border and creating a new citizenship in the web world.


About MediaWiki

MediaWiki is the wiki implementation used by Wikipedia and the other Wikimedia resources. These are, probably, the largest and most successful wikis. It is robust and has proved itself with the public. The markup style is already known to a large number of wiki users. The display is easy to navigate, and it is simple to format text from the toolbar. MediaWiki offers a lot of features, including an optional file upload feature, a very comprehensive markup, very good internationalization support (even supporting bi-directional text), version control, a search feature, back-links, mathematical equation support, and page names that can consist of any characters.

MediaWiki is written in PHP and uses a MySQL database. MediaWiki installation is incredibly simple, especially considering its complexity. It involves setting up a MySQL database, unpacking the distribution, making a certain directory there writable, and accessing a configuration script. It has a lot of configuration options, and you can configure it to your heart's desire. It is built to work in almost any web-hosting environment that gives you MySQL and PHP.

The MediaWiki syntax is both very rich and flexible. You can even use some HTML tags instead of the regular markup, which is useful if you cannot recall the original markup immediately. It has many features that may make it overkill for some sites, but that largely depends on your requirements and it is not necessary for you to use all the available features.

MediaWiki Features

Let us have a look at a few features of MediaWiki:

  • Easy navigation system: MediaWiki provides an easy navigation system with options such as searching, Go button, random page, Special pages, and Printable version of a page. The entire navigation system is present on the page, so you can quickly browse through it.

  • Editing, formatting, and referencing: MediaWiki provides an easy way to edit, format, and reference pages with other pages. It also gives us the option to track changes. Since it is a multi-user environment, tracking changes is a key feature to manage the content properly.

  • Look and feel change: Users can change the look and feel of a wiki site using MediaWiki. Users can change skins and styles for their individual pages.

  • File uploading: MediaWiki gives you an option to add file upload capabilities to your pages. This is a nice option to make it a complete content management system. It also gives you flexibility to decide the allowable file extensions that can be uploaded by users and also a block list of file extensions.

  • Multilanguage support: MediaWiki supports many languages and UTF-8. So you can implement MediaWiki in different languages. Many sites such as Wikipedia use a multilingual version, which allows you to read and write different languages using the same piece of software.

  • User management: MediaWiki has a built-in user management system where you can create new logins and assign user privileges. You can also customize privileges for user types in order to fit your security needs.

  • Syndication: MediaWiki supports web syndication by providing RSS syndication for many special pages such as Special:Newpages and Special:Recentchanges. Syndication benefits both the websites providing information and the websites displaying it. It gives the option to grow your site rapidly in the web world.

Available Wiki Software

There are lots of open-source and commercial wiki software packages available online. You can search with Google with the wiki keyword and can find lots of wiki software. Here are a few popular wiki software packages available:

  • DokuWiki: DokuWiki is a simple wiki engine based on PHP and can be used to create any type of document. It is simple and standards compliant. It is suitable for small companies, development teams, and user groups. The most interesting part of this wiki is that it does not have any database.

    As a result all the data is saved in a plain text file. The syntax is very simple yet powerful enough to create any type of content. Key features include: simplified editing, linking, support for image and other files, plug-ins support to extend wiki functionality.

  • PhpWiki: PhpWiki is a clone of original WikiWikiWeb. It was the first wiki software written in PHP and was released in 1999. It supports a majority of the databases. The installation process is very simple and gives you what you look for in an out-of-the-box solution. It supports plug-ins in order to increase functionality. It is suitable for freeform discussion-based site creation and also for collaborative development sites.

  • PmWiki: PmWiki is a PHP-based wiki that does not require any database. It is very easy to install and to extend its functionality. It supports a template system in order to change the look and feel of the website as well as the functionality to a great extent. It also provides an access control system in order to protect site pages or groups of pages by enabling a password-protected mechanism. It also gives ample opportunity to customize the site as well as extend its functionality using plug-ins.

  • QwikiWiki: QwikiWiki is another wiki system written in PHP and does not require any SQL database in order to operate. It uses cookies and its own file system in order to process and manage files. It has some key features like file uploading, a template system, and an access control system.

  • Wikipage: It is small, but a wiki standard, easy-to-use system. Wikipage is more secure than Tipwiki. It has password-protection support for access control, multilanguage and multisite support. Other common features include file uploading, table support etc.

  • TWiki: TWiki is a flexible, powerful, and easy-to-use enterprise collaboration platform and knowledge management system. It is a structured wiki written in Perl. It is typically used to run a project development space, a document management system, a knowledge base, or any other groupware tool, on an intranet or on the Internet. It does not require any database since the data are stored in file system. It has a powerful plug-ins system with more than 200 plug-ins available to use such as spreadsheet, image gallery, slide shows, drawings, charts, graphs, etc.

  • Kwiki: Kwiki is perhaps the simplest to install, most modular, and easiest to extend. It is written in Perl and also available in CPAN. Other than providing basic wiki features, Kwiki by default offers slide shows, page backups, privacy options, and blog capabilities that are not found in any other wiki. It supports a plug-ins system in order to extend functionality.

  • MoinMoin: MoinMoin is written in Python and has been derived from the PikiPiki wiki engine. This wiki uses a flat file and folder in order to save data. It does not require any database for operation. It is extensible and customizable. It supports sub-pages, Unicode, RSS feed, a template system, theme support, an access control list, and an anti-spam feature.

How MediaWiki Fits your Need

If you are looking for a wiki as a solution, then MediaWiki is a better choice. It has a cool feature set and offers flexibility. Let's tailor MediaWiki features in order to fit your needs:

  • Editing is simplified: Every page contains an Edit link on the top navigation bar, which will take you to a very simple editing screen upon clicking. When you finish making changes, submit them by clicking the SUBMIT button, and, voila! Your changes show up on the site. Can editing be simpler than that? I don't think so.

  • Use of simple markup: When you edit an HTML content item, it is always difficult if you do not have proper knowledge of HTML tags. Nowadays WYSIWYG editors take away the pain but still in some cases you need to work with HTML markup. What if the program does this for you? You don't have to remember complex tags. Yes, that is why MediaWiki is so simplified. It has its own type of syntax, which makes the editing a simpler job and the proper HTML tag conversion is done by the system. MediaWiki will solve this problem by writing the HTML for you. All you need is to learn a few simple markup rules. These rules are designed to make wiki markup easy for general users to write and adopt.

  • Recording histories: MediaWiki will save a copy of your old pages and lets you revert to an older version of a page if you need to. In fact, MediaWiki will display a comparison, called a diff, which shows you the exact changes you have made or someone else has to your page over time.

  • Simplifying creating links: MediaWiki stores your entire website's content in an internal hypertext database. MediaWiki knows about every page you have and about every link you make. When you are using MediaWiki, you don't have to worry about the location of files or the format of your tags. Simply name the page, and MediaWiki will automatically create a link for you. You can create links within your wiki or to some other wiki as well as to the web world. Creating links cannot be simpler than the way MediaWiki does it.

  • Simplifying creating new pages: MediaWiki links you to pages that don't yet exist. Click on a link that points to a nonexistent page, and the wiki will ask you for the initial content to be placed in the page. If you submit some initial content, then the wiki will create the page. All links to that page (not just the one you clicked) will now point to the newly-created page. That is the simplest way of creating a new page in MediaWiki. You don't even have to bother to create the page, save it, and then link it from another page. You can do it in a single shoot.

  • Simplifying site organization: MediaWiki uses a database in order to manage the hypertext of the site. As a result you can organize your page however you want. Many content management systems require you to plan classifications for your content before you actually create it. This can be helpful, but only if you are looking for a rigid structure. With MediaWiki you can organize your page into categories and namespaces if you want, and you can also try other things. Instead of designing the site structure, many wiki sites just let the structure grow with the content and the links inside their content. But you don't have to have it either way. Visitors can navigate the site by following a storyline, drilling down through a hierarchy, or they can just browse with the natural flow of the internal links. MediaWiki helps you to get out of this nightmare and without any such a complex site structure.

  • Tracking all your stuff: Using MediaWiki, you can track everything in your site, because MediaWiki stores everything in a database and it knows about all your links and all your pages. So it's easy for MediaWiki to show back-links, a list of all the pages that link to the current page. It also stores your document history in order to list recent changes. It can even show a list of recent changes to pages that link to the current page.

  • Opportunity for collaborative communities: The core concept of MediaWiki is to create a collaborative community. MediaWiki allows anyone to click the Edit button and change the website. While this may seem odd, many wikis are able to do this successfully without major issues in terms of vandalism. Remember, MediaWiki stores the history of each page. So in case of an act of vandalism, the original content can quickly be reset. MediaWiki gives you the option to handle this challenge differently. You can make the site completely open, and to curb vandalism, you can make restricted access to the site so that only register users can do the editing or you can even set a different reporting system to stop such activities. How you deal with this challenge depends on what you plan to use the wiki for.



In this chapter we have learned about the basics of wikis and their usefulness, the features of MediaWiki and a bit about Web 2.0. We have learned that a wiki is an application that is used for collaborative content development with a very easy-to-use user interface. In the next chapter we will see how to install MediaWiki on our system.

About the Author

  • Mizanur Rahman

    Mizanur Rahman from Bangladesh is a Senior Software Engineer at Relisource Technologies). He loves to work with Java, PHP and other web-based technologies and is a moderator of PHPXperts, the largest PHP user group in Bangladesh

    Browse publications by this author
Book Title
Access this book, plus 7,500 other titles for FREE
Access now