The 15 Minute guide to setup mediaWiki (Windows)

Believe me or not, thats all it takes from an empty system with all the right software downloaded to a system running on Wiki.

So what do you need ?

So now that you have these, first step is to get xampp up and running…

Extract xampp to your favourite location.

Run ‘setup_xampp’.

Run ‘XAMPP Control Panel’.


Ensure that under Modules, ‘Apache’ and ‘MySql’ is clicked.This ensures that the apache and MySql is installed as service.

Now, click on “Service” button next “SCM”.


Tick Apache and MySql and clikc OK.

Now head straight to


to see the security status.


First step in this will be to lock down mysql. Head to http://localhost/security/xamppsecurity.php and enter a password for root user for mysql.

Ok now we are almost done with xampp. Now next step is prepare mysql for mediawiki.

Head to http://localhost/phpmyadmin , login with the newly set root password.

Once in, hit the link titled ‘Privileges’. Now click on “Add User” with the logo ->b_usradd

user name : wikiuser

Host : localhost

password : password

Leave everything else as default, and hit go at the bottom.

SO now we have added the user. We are almost there for getting the mediawiki ready.

Now click on b_selboard icon which is on left pane just below ‘phpMyAdmin’.

This should cause a sql query window to popup.

Now copy paste this code, (change the password ofc)


GRANT ALL ON wikidb.* to wikiuser@localhost IDENTIFIED BY ‘password’;

SET PASSWORD FOR wikiuser@localhost = OLD_PASSWORD(‘password’);

And hit go

you shouldnt see any errors here…

Now you are ready for putting mediawiki.

Extract the mediawiki.tar.gz to <xampp root>htdocs

So now you should have <xampp>htdocsmediawiki-1.19 (or some other version number)

Rename the <xampp>htdocsmediawiki-1.19 to <xampp>htdocsmediawiki     ( Remove the version number)

Now fireup the browser and goto http://localhost/mediawiki

SO you should see a link asking you to setup mediawiki, click it.

These values need to be changed

Database name:   <leave it as it is, unless you gave a different db name during ‘CREATE DATABASE wikidb’

DB username: <leave it as it is>

DB password: Must not be blank : password

DB password confirm   : password

Tick the ‘Superuser Account’, and enter the password for root. This is the same password you set in xampp security page for mysql.

Leave everything as it is and hit “Install Mediawiki” and watch the fun.

Once this is successful. from windows explorer navigate to <xampp>/htdocs/mediawiki/config/LocalSettings.php to htdocs/mediawiki/LocalSettings.php

Now fire up the browser, and head to http://localhost/mediawiki . Tada! you should be looking at your own wiki.

Done, just one last step.

Noticed whenever you type http://localhost you are redirected to http://localhost/xampp, Let me show you how to make it to http://localhost/mediawiki .

First head to htdocs folder. Edit the index.php.

replace the line

header(‘Location: ‘.$uri.’/xampp/’);

header(‘Location: ‘.$uri.’/mediawiki/’);

So there you go, your own Wiki.

A few things worth noting.

  • Not the most secure setup.
  • you maynot want to use “password” as the password for wikiuser.
  • Always protect the MySql with root password.
  • Dont forget to have fun 🙂

Detailed instructions for mediawiki –>

Drop in a word, if you need any clarifiaction 🙂 Will try my best to help you out 😉


6 thoughts on “The 15 Minute guide to setup mediaWiki (Windows)

  1. Allajunaki,

    I follow your steps up until copy and paste code then I get this error from mysql:
    #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘‘blank’’ at line 1
    where the password I set is the word “blank”

    any idea on how I get past that?


  2. Hey Tom,
    I got the same issue when I copy pasted the commands for the procedures from this blog.
    It has something to do with the presentation.
    DO this..
    Copy paste the above code onto notepad.
    Then replace all the single quotes ( ‘ and ’ ) with single quotes again (that is ‘ ) . That should do the trick.
    Hope that helps..

  3. Pingback: 15 Minutes guide to VirtualBox+Turnkey Appliance Linux (aka Linux on Windows) « Allajunaki’s Random blurbs

  4. Very usefull information,it works like charm for me.
    For SQL syntax error(depends on mysql version)
    Just try as below:
    GRANT ALL ON wikidb.* to wikiuser

    if you get database already cvreated means don’t executed that command again …good luck

  5. Thanks for the instructions, all clear to follow. I’ve done this all OK, and have now got Mediawiki running, all good so far. When I access the machine from elsewhere on the network, I can see the config page ok. When I try 192.168.20/wikiname it re-directs to localhost/wikiname/index.php which doesn’t exist as there isn’t a localhost on the other machines. Any thoughts on config of the mediawiki to resolve this? Thanks!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s