Setup a Wiki on Windows PC - Step-by-Step Guide

Understanding Wikis and MediaWiki
A wiki represents a jointly edited website, enabling users with accounts to author and interconnect articles. This article provides a streamlined guide to installing and configuring MediaWiki, avoiding the need for extensive documentation.
Quick Installation Overview
The initial setup can be completed within approximately five minutes. We will then delve into essential administrative functions.
These functions include user account creation, group assignment for permissions, and the customization of your wiki’s appearance through the application of different skins.
Administrative Tasks
Effective wiki management involves several key tasks.
- User Management: Easily create new user accounts as your community grows.
- Group Permissions: Organize users into groups to control access and editing rights.
- Customization: Enhance the visual appeal of your wiki with a variety of pre-designed skins.
By following these steps, you can establish and maintain a functional and visually engaging wiki environment.
Image credit: Szeke
MediaWiki Installation Guide
Utilizing MediaWiki requires a functioning Apache web server, a MySQL database, and PHP 5. While individual setup of these components is possible, EasyPHP streamlines the process with a simplified installation procedure.
Visit the EasyPHP website to download the installer. Proceed through the installation wizard, and a suitable environment for running MediaWiki will be established.

Upon completion of the installation, EasyPHP will be visible in your system tray. This system tray icon provides access to the administrative functions of your web server. The “Administration” page should be your first point of inspection.
This page offers a comprehensive overview of the services currently running on the server. Confirmation of this page’s accessibility indicates a properly functioning web server, and readiness for MediaWiki installation.

EasyPHP establishes a “www” directory. Placing the extracted MediaWiki distribution within this folder will allow EasyPHP to recognize and serve it. Windows users unfamiliar with the .tar file format used for MediaWiki distributions should not be concerned.
Simply install 7zip, a free archiving tool, and use it to extract the MediaWiki files into the “www” folder. Once completed, this folder will then be displayed on the EasyPHP administration page.

Following extraction, EasyPHP will automatically deploy MediaWiki. A link to the MediaWiki homepage will then appear under the “Root” icon. Clicking this link will direct you to the MediaWiki installation page.

The installation wizard will guide you through the necessary steps. Accepting the default settings provided by the wizard is generally sufficient for a standard installation.

If you intend to incorporate images into your Wiki, remember to enable image uploads during the installation process. This ensures the functionality is available from the outset.

The installation wizard will generate a file named LocalSettings.php upon completion. This file contains numerous configuration settings for MediaWiki. Comprehensive documentation detailing the purpose of each setting is maintained by the MediaWiki project.
Place this LocalSettings.php file within the MediaWiki folder that was previously extracted.
An Overview of MediaWiki
MediaWiki typically launches with MonoBook, a widely used theme characterized by its clean, white appearance. Numerous other themes are also available for customization of your Wiki. Before delving into theme modification, let's familiarize ourselves with the default theme’s layout.

Three key links are present on this initial page: the “log in/create account” link, the “edit” tab, and the “Special pages” link. By default, anyone can contribute edits to your Wiki, even without a registered account. To enhance security, the following command can be added to the LocalSettings.php file:
$wgGroupPermissions['*']['edit'] = false;
To begin modifying page content, navigate to the “edit” tab. Understanding wiki mark-ups is essential for content editing. While initially challenging, consistent practice will demonstrate how these mark-ups can significantly streamline your workflow.
A link for new account creation is located in the top right corner. Clicking this link allows users to establish an account and assign it to the relevant user group. Further information regarding user groups can be found by accessing the “Special pages” link. This special page provides access to a comprehensive suite of administrative tools for your Wiki.

Within the special pages, you can identify broken links, manage user accounts (additions or deletions), and perform other administrative tasks. Today’s tutorial will focus on three specific sections: the “login/sign up” page, the preferences page, and the user rights management page.
Managing MediaWiki Users
The “Login/Create Account” page within MediaWiki allows for the creation of new users and their assignment to various user groups. However, when dealing with a large number of users, individually adding them can be a time-consuming process.
Fortunately, the User Import Extension provides a solution for bulk user creation using a CSV file. This extension should be downloaded and placed within your MediaWiki extensions directory.
Installing the Extension
Following the download, include the following line in your LocalSettings.php file to activate the extension:
require_once("$IP/extensions/ImportUsers/ImportUsers.php")
With the extension enabled, you can then prepare a CSV file containing the details of all the users you wish to import and upload it through the MediaWiki interface.
The CSV file should be structured with columns for essential user information. An example structure is shown below:
| User ID | Password | User Name | |
| thegeek | s4f3p@assword | geek@htgwiki.com | The Geek |
After importing users, controlling their access levels is crucial. MediaWiki offers a range of user groups to manage permissions effectively. User Rights Management
Navigate to the user rights management page to assign imported users to the appropriate groups. This allows you to define what each user is permitted to do within the wiki.
For highly customized permissions, you can define new user groups directly within the LocalSettings.php file. This provides granular control over user access. For instance, the following code snippet creates a new group named “Trusted” with permissions equivalent to the “user” group, but without the ability to send emails.
$wgGroupPermissions['Trusted'] = $wgGroupPermissions['user'];$wgGroupPermissions['Trusted'] ['sendemail'] = false;
This approach allows for the creation of tailored user roles to meet specific needs within your MediaWiki installation.
Personalizing Your Wiki Environment
Having explored the fundamental functionalities of MediaWiki, we will now delve into methods for enhancing your Wiki’s appearance. This includes implementing custom skins, integrating your own logo, and enabling users to upload a diverse range of file types. Many of these customizations necessitate the addition of PHP code to either the php.ini file or the LocalSettings.php file.
The PHP.ini file can be accessed via a shortcut within the EasyPHP system tray. The upload_max_file_size setting governs the maximum size of files that can be uploaded to your wiki. By default, PHP restricts uploads to 2 MB. Should you require support for larger files, adjust this variable accordingly, for instance, to 20 M (20 megabytes).
MediaWiki inherently supports numerous file types, including PDF, Microsoft Office formats, and Open Office documents. However, to activate this functionality, the following PHP code must be incorporated into your LocalSettings.php file:
$wgFileExtensions = array('png','gif','jpg','jpeg','doc','xls','mpp','pdf','ppt','tiff','bmp','docx', 'xlsx', 'pptx','ps','odt','ods','odp','odg');
Skins and Logos
Navigate to the preference page to discover a selection of skins available for your Wiki. If the provided options are insufficient, you have the capability to create a new skin or, more conveniently, install pre-designed skins from the MediaWiki gallery.
Download your preferred skin and place it within the skins directory:
C:\Program Files (x86)\EasyPHP-5.3.6.0\www\mediawiki-1.17.0\skins
Following this step, the new skin should become available for selection on the preference page. To integrate a logo that complements your chosen skin, place the image file in the following folder: C:\Program Files (x86)\EasyPHP-5.3.6.0\www\mediawiki-1.17.0\skins\common\images. Then, add this command to your LocalSettings.php file:
$wgLogo="$wgScriptPath/skins/common/images/htg-logo.png";
Important: Remember to replace "htg-logo" with the actual filename of your logo.
MediaWiki offers a wealth of features beyond those discussed here. However, we trust that this guide has equipped you with the knowledge to successfully host your own Wiki using MediaWiki. We encourage you to experiment with these settings and share your experiences with other readers in the comments section.
Download Media Wiki