In this tutorial I’m going to show you how to install MediaWiki for a local test environment. You can then use this install to experiment with configuring and running a wiki.
For this tutorial you will need to have XAMPP running and also have created a MySql database. If you haven’t already read my previous tutorials you should check out the XAMPP installation and the MySql database set up tutorials.
First thing you’ll need to do, if you haven’t already, is download MediaWiki from the MediaWiki website. However, the latest version of MediaWiki (version 1.15.4) doesn’t support PHP5.3.1 which is used by the current XAMPP for Windows so I am using MediaWiki version 1.15.1 for this tutorial. A direct link to the MediaWiki download archives is here.
Once you have extracted the zip file you will need to copy it in to the htdocs folder in XAMPP (should be C > xampp > htdocs). If you want you can rename the folder from phpbb to whatever you like, for this tutorial I renamed it “wiki”.
For this tutorial I put the folder in my WordPress tutorial folder (i.e. C > xampp > htdocs > tutorial), I have done this to keep it neat.
Using your favorite web browser type in http:\\localhost\tutorial\wiki (change tutorial and/or wiki to whatever the folder(s) is called) and hit enter, you should see the screen below:
Click where it says “set up the wiki”
On the next screen you will need to give your wiki a name, enter a user password and enter the database information. I have circled in red the relevant fields you need to fill in.
- Give your wiki a name
- Choose a password for the main user known as WikiSysop
- Enter the database information in the screen. I’m using the same database I used for the WordPress tutorial, see below: You can either do the same or create a new database for this install.
Once you’ve entered all the information click the button “Install MediaWiki”
MediaWiki will now connect to your database and once it’s all done you will see the screen below:
As instructed at the bottom of the page you need to move “Localsettings.php” file from the config folder into your main wiki folder before you can use the wiki.
Minimise your browser and then open the config folder, it should be C > xampp > htdocs > tutorial > wiki > config , locate the “LocalSettings.php” file and move it up one folder into the main wiki folder, C > xampp > htdocs > tutorial > wiki
Once you have done this you can close the folder.
Bring up your browser window and click where it says “follow this link to your wiki”, you should then see this screen:
That’s it! MediaWiki is installed and you are presented with the main page. You can now log in as the Administrator (WikiSysop) and start to experiment. This is a great way to learn the code and techniques required for editing MediaWiki wiki’s, and possibly saves you from messing up Wikipedia!!
I hope this helps you get started.