How to create MediaWiki website

From WikiJournal
Developer: MediaWiki Foundation
Type: Wiki CMS
Initial release: January 25, 2002
Language: PHP and JavaScript
Operational system: multi-platform
Latest version: 1.40.2 Download

MediaWiki is one of the best software for creating your own encyclopedia, web-journal, or blog. It can be installed quickly and easily, and is free to download. This manual describes how to do it.

MediaWiki is popular among webmasters due to its simple and free usage, its availability in many languages, and its ability to download a lot of additional extensions that allow for the creation of professional websites. Today, there are thousands of websites made with wiki technology that are quite famous.

This article is a detailed manual of MediaWiki installation, as well as a description of how to create articles, use templates, and install additional extensions. If you have extra information or some questions, feel free to post your comments on the discussion page of the article.

About MediaWiki

Mediawiki — a free software open source wiki package written in PHP, originally for use on Wikipedia. It is now also used by several other projects of the non-profit Wikimedia Foundation and by many other wiki websites.[1] WikiJournal runs at MediaWiki application (known as CMS among webmasters) as well.

The CMS is very convenient for writing different kinds of articles. The main difficulty when creating articles is the use of wiki markup in WikiEditor, which provides a specific framework with a set of feature-based modules, each of which can be selectively enabled or disabled, aiming to improve the user experience of editing and creating pages with so-called wikitext. There is an extra "VisualEditor" extension that provides simple tools to create or edit articles, especially for those who are not familiar with wiki text. However, this extension requires some technical knowledge to install it on your wiki website.

MediaWiki installation

MediaWiki installation process consists of three main steps:

  1. Download Mediawiki software from the official website. You can choose following versions: "stable" or "LTS" version. it means Long Term Support version.
  2. You should upload files to server of your hosting provider. You can use FTP client for that.
  3. After that you shall visit your website to go through online installation process which is described below.

Installation process

  • After all the software files have been uploaded to your hosting provider's server, visit the homepage of your wiki website (the address of the domain name). Afterwards, the installation wizard will give you options to install MediaWiki. Press "Set up the wiki" to start the installation. Then select the installation language and the language of your wiki website. Next, the system will check the compatibility of the PHP version, MySQL, and other server settings. If all is alright, the following message will be displayed: "The environment has been checked. You can install MediaWiki", then click the "Next" button. If the compatibility test fails, contact the technical support of your hosting provider; they will assist you in resolving such an issue.
  • The next step is to create and configure a MySQL database. During the MediaWiki installation, you should indicate the type, name, username, and password of the database. If something is not clear, click "Help" for more detailed information.
  • Next, you should customize the site: provide its name and administrator information (name, password, and email address). During this step, you can also configure the following options: user rights for creating and editing articles, copyrights, licenses, email settings, install various additional extensions, and the option to make uploading files to the server available, or you can choose "Stop, install wiki" and start installing the wiki website with the standard configuration. During all steps, there are help links for additional information on how to set the configuration.
  • After installation (which takes a few seconds), you will see the following message: "Congratulations! You have successfully installed MediaWiki." After that, you should download the LocalSettings.php file and upload it to the root folder on your host server. This file contains all the basic settings of the wiki website.
  • After visiting the homepage of your website, you will see the Main Page with the following message: "MediaWiki has been successfully installed." On this same page, you can follow the links to read more about settings and options, how to work with this CMS, and how to customize and suit it to your needs.

How to make new pages

VisualEditor at wiki website

New pages can be created or edited in VisualEditor, a specially designed editor for the MediaWiki platform. It has a wide range of tools, such as working with lists, tables, files, templates, links, and other objects on the page. To create a new page, you need to enter the name of the article in the search field. If there is no page with this name on the site, the system will offer to create a new page with this name. By going to the page in the editor, you can enter text and arrange it as desired. In addition to the editor, there is a page code editor that uses wiki markup, a markup language used to decorate text and make it easier to access the features of the HTML language. Pages designed using wiki text are first converted to HTML for viewing in a web browser.

Using of templates in articles

Templates are special informative thematic blocks that can be used as standard texts in several articles on similar topics. The convenience of using templates is that they can be installed on various pages and display the main information about a topic. Templates can also be used for navigation panels among articles of one common topic.

Templates are created as a separate page with its own namespace, such as "Template:Template name", for example: Template:CMS. Click the link to view the core of the template and understand how it is made and works.

To create a template, you should indicate its name, e.g. Template:Test, and inside the page you should indicate what information should be used in it, such as: {{{title}}} - the title of the template. Then, it is possible to use the template on all pages using this code: {{Template:Test}}.

|title = 

After the equal sign, you should put some text to display in the article. You can create many categories, as well as images, etc., depending on the information you would like to show in the articles. It is possible to create dynamic and large templates that use images, tables, and configure how it should look on a page using CSS settings. General design settings can be made on the special page in Mediawiki at Mediawiki:Common.css. Examples of templates can be found on any wiki website, including WikiJournal and Wikipedia, and they are free to download.

Find the manual on creating and using of Templates at official website.

How to create categories

There is a possibility to include an article to some categories. It is a very useful tool to categorize your wiki website for better navigation. When editing an article, you should put the following code at the end of the page: [[Category:]]. Several categories can be included to one page this way. After that, the link to the category appears at the bottom of the page. If the page of this category doesn't exist, the link to it will be in red. To create a category, you should simply click it and create it as a simple page.

How to install other skins

Mediawiki developed other skins:

  • Vector 2022 - New default skin developed in 2022
  • Vector - old style default skin used MediaWiki websites;
  • MonoBook - Earlier it was default skin for Mediawiki;
  • Modern;
  • Cologne Blue.

There are also other skins that were developed by volunteers. You can watch them and download at Mediawiki official website. If you wish to install some skin you should copy it to "skins" folder. There is also detailed manual how to install skins to your wiki website

To set a default skin you shall have this code at LocalSettings.php file:

$wgDefaultSkin = "MonoBook";
$wgDefaultSkin = "Modern";
$wgDefaultSkin = "CologneBlue";

As soon as this changes are made you will see that skin of your website also is changed. Mediawiki standard skins looks so:

MediaWiki settings

Extensions installing

Mediawiki developers, as well as other programmers, develop additional extensions that provide extra tools and options for using the application. There are a lot of different extensions that can be found and downloaded from the official website, along with a full description of their functions.

Once an extension is downloaded and uploaded to the extension folder on your server, it should be included in the LocalSettings.php file. You can find manuals for each extension on its description page, which provide instructions on how to use and install it.

MediaWiki update

Mediawiki software is upgraded from time to time by developers, who improve its core and remove bugs in the code. It is also recommended to upgrade the Mediawiki version as soon as there is a new stable version of it, but it isn't always necessary. There are several ways to upgrade Mediawiki. We will describe the simplest one. You will need some FTP client to upload the new version of Mediawiki files and to go through the upgrade process using any browser. To do it, you should follow these steps:

  • Rename LocalSettings.php in the root directory, for example to LocalSettings_2.php.
  • Check the compatibility of the PHP and MySQL versions on your server.
  • After that, your wiki website will not be available and the system will ask you to upload the LocalSettings.php file to the root directory, but you shouldn't do it.
  • Download all necessary directories:
    • Folder "images", where all images were uploaded;
    • Folder "extensions", with all additional extensions that you installed previously (after upgrading, you should also update all extensions for compatibility with the new Mediawiki version);
    • Save the MySQL database (you can do it through the panel at your hosting provider or directly at phpMyAdmin);
  • Download the new stable Mediawiki version from the official website and unpack it locally on your computer.
  • Connect to your server using an FTP client and upload the new files, replacing the old ones (except for the images directory).
  • Visit your website with this URL:
  • You will be welcomed by the Mediawiki installation wizard and you should install Mediawiki again, indicating the same information on the MySQL database administrator and its password.
  • Rename the LocalSettings.php file back.
  • After all these procedures, your website should be running on the new Mediawiki version.

If you have some errors after updating you can resolve them at Mediawiki support desk. You are also advised to read manual on upgrading at the official page.

Final note

MediaWiki is one of the best content management systems on the web. It can be installed very quickly and easily. If you have any difficulties during MediaWiki installation or its usage, feel free to post your message on the discussion page of the article.

Other relevant articles