Hackathons/Laptop setup/Windows MediaWiki

Get MediaWiki via git
In these steps, you will download MediaWiki (the software that runs Wikipedia) using git.

First, you must start Git Bash. To do that, click the Start menu, then Programs, then Git, then Git Bash.

A new command prompt should open. In this prompt, we will now change directory to the path where XAMPP will serve PHP code. To do that, type this into the prompt:

cd /c/xampp/htdocs

Now we need to create a subdirectory into which we will download MediaWiki. To do that, type this into the prompt:

mkdir wiki

Now, type the following command to get the latest development code on MediaWiki into your wiki directory.

git clone https://gerrit.wikimedia.org/r/mediawiki/core.git wiki

This will take a while. As it downloads, introduce yourself to a neighbor!

Switch to a different branch of the code
Rather than run whatever is the latest code that has been added to the MediaWiki repository, we encourage you to run a released version of MediaWiki. To do that, run this in the terminal:

cd /c/xampp/htdocs/wiki git checkout origin/REL1_19 -b mywiki

This creates a branch called mywiki based on the MediaWiki 1.19 release, and switches you to that branch. (If that seems like gobbledygook, that is okay for now.)

Set up the wiki
With the wiki code in place, now is a good time to perform an installation of the wiki. This step is the easiest.


 * Visit http://localhost/wiki/ in a web browser.
 * You have to click the line that says Set up the Wiki.
 * Make sure a Continue button appears at the end. Click it!
 * The installer will ask you which Database type you want. Choose SQLite.
 * Choose whatever you want for the following options:
 * Name of wiki (Suggestion: "Mywiki")
 * Your name
 * Password
 * Password again
 * E-mail address
 * Check the box labeled "I'm bored already", then click Continue.
 * Click Continue once more, to install the wiki!
 * Click Continue yet once more, for some reason.
 * The web app will offer you a LocalSettings.php file. The browser will ask you where you want to save it. Navigate to C:\xampp\htdocs\wiki and save the file there. If you get a dialogue box saying "Windows can't open this file" go to the folder where downloads are normally placed. Find the file there and drag it to C:\xampp\htdocs\wiki.

Make sure your wiki works
If all went well, now when you go to http://localhost/wiki/, you will see a friendly message that tells you:

"MediaWiki has been successfully installed."

Congratulations! In the upper right corner of the page, log in with the username you just created to make sure it works.

If something did not work, do ask a staff member for help!

Return to laptop setup
&laquo; Return to laptop setup