MediaWiki
This page explains how to install MediaWiki on your website. MediaWiki is one of the most popular wiki programs available. It's used to run Wikipedia.org — it's also free and easy to install.
Installing MediaWiki
These instructions are based on MediaWiki 1.12.0 and assume you're using Windows on your own computer, although the instructions are likely to be similar for other versions and platforms.
1. Get MediaWiki
Download the most recent zip version from http://www.mediawiki.org/wiki/Download onto your own computer, then extract the files. This creates a folder named something like "mediawiki-1.12.0". Rename this to something simpler like "wiki".
2. Create a MySQL database
MediaWiki uses a MySQL database to store its entries. We recommend creating a new database specifically for MediaWiki, rather than using an existing one. To create the database on our servers, follow our instructions explaining how to create a MySQL database.
There's no specific format you need to follow when naming the database. The rest of these instructions will assume that your database is called "mwexample" — if you use a different name, just use that name instead of "mwexample" when following the instructions below.
3. Upload the MediaWiki files
Upload the entire "wiki" folder — and all of the files in it — to the top level of your website using an FTP program.
4. Run the Installation Script
MediaWiki has a simple installation script that creates the users and configures the database. To start this go to:
http://example.com/wiki/config/index.php
After a few seconds the installation page should load. Scroll down to the "Site Config" section:
Enter a name like "My Wiki" under the Wiki Name box. This will be displayed in the browser title bar when anyone visits your wiki.
Then enter an email address in the Contact email box.
Enter an admin username and password.
Now scroll down to the "Database Config" section. You can leave the default settings for the "E-mail, email notification and authentication setup" section:
Select MySQL as the database type.
Enter localhost as the database host.
Enter mwexample as the username and database name, then enter the password you choose when creating the database.
Everything else can be left with the default values.
Click Install MediaWiki!
The installer should then run:
The final stage is to use FTP to move the LocalSettings.php file up one level out of the wiki/config folder into the wiki folder. Once this is complete click "follow this link to your wiki". This should take you to the following page:
http://example.com/wiki/index.php
The installation is now complete. You should be able to login and configure MediaWiki.
Advanced: using short URLs
By default, your pages will use URLs like this:
http://example.com/wiki/index.php?title=Main_Page
According to the MediaWiki documentation, it is possible to use other URL formats. As the documentation says, you should be very careful about choosing other URL formats, because they can become invalid if certain things are changed in the future, thus breaking any external links to your wiki.
Using short URLs like http://example.com/wiki/Main_Page
The documentation on this page shows you how to get URLs like the format used by Wikipedia. (This URL format is more stable than the other alternative shown below.) Be sure to have your wiki installed into a folder named something other than "wiki". For example, the documentation assumes that you have installed the wiki into a folder named "w". Be sure to rename the folder that you uploaded in the installation instructions above.
Using short URLs like http://wiki.example.com/Main_Page
Some users wish to use URLs of this format:
http://wiki.example.com/Main_Page
The documentation for this format is incorrect. Here are the correct contents for the .htaccess file (in the /wiki/ sub-directory):
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?title=$1 [L,QSA]
And here are the correct lines for LocalSettings.php:
$wgScriptPath = ""; $wgArticlePath = "/$1"; $wgUsePathInfo = false;
Copyright © 2000-2024 Tiger Technologies LLC