Manual:Running MediaWiki on Windows


 * MediaWiki User's Guide
 * Running MediaWiki

This page will give you informations about installing MediaWiki on a Microsoft Windows system.

You will need the following software:
 * Support software
 * Apache -- Web Server
 * MySQL -- DBMS
 * PHP
 * the Mediawiki code itself

You will also need some serious hardware for the full Wikipedia database.

Support software
You can install the three support components individually, or all together as a package. An example of the latter is IBServer.

MySQL
The download link below points to a page with all available versions of MySQL. The one you want is "Production release" which is recommended.

While downloading, read the Install Guide using the second link below.
 * Download
 * Install Guide

Download and install
Install the Apache web server from http://www.apache.org/ using the latest 2.x binaries. Use the Download link below, select a mirror close to your location and download the "Win32 Binary (MSI Installer)" version. Actually this is version 2.0.48 (nov. 2003)
 * Download
 * Install Guide

Configure
Modify the httpd.conf file for apache. It should be located at "C:\Program Files\Apache\Apache2\conf" if you used the default installation: LoadModule php4_module {PATH TO YOUR PHP FOLDER}/sapi/php4apache2.dll AddType application/x-httpd-php .php AddType application/x-httpd-php .php .php4 .phtml AddType application/x-httpd-php-source .phps php_admin_flag engine off  php_admin_flag engine on    
 * Add these lines at the end of the block of LoadModule lines:
 * Change the DocumentRoot
 * Add the PHP types and disable PHP for all directories other than the wiki


 * Note: if you need PHP for other purposes, you will need to add other directory sections like that above. Do not enable the PHP engine by default.
 * It is not strictly necessary to enable the rewrite engine or include the ampersand patch
 * You will have to change c:/playpen/wiki/runtime/wiki to your script directory. Copy all the executable PHP files for MediaWiki into this directory.

Download and install
Install PHP from http://www.php.net/ using the latest windows binaries using the Zip package. Lastest version 4.3.4.
 * Download
 * Install Guide
 * Documentation in several langages

MediaWiki
There are two options
 * the last stable release of the mediawiki software
 * the lastest development version.

Stable release

 * go to http://sourceforge.net/projects/wikipedia/
 * press Download on the left of "MediaWiki stable release"
 * Save on your disk and extract it to c:\mediawiki\

Latest release
This is the development version of MediaWiki and include the last changes made by the developers. If you aren't familiar with computering fall back to stable release.

If you do not already have a CVS client, you will have to get one and install it. WinCvs is a correct CVS software under windows http://www.wincvs.org/

Get MediaWiki from the CVS archives.

Installing
Visit your wiki with a web browser and follow the install directions! :)

not sure how well the following applies

PHP does not handle the include_once directive properly on all windows platforms and filesystems, probably due to the Windows treatment of upper and lower case in file names. You may have to comment out the include_onces in some of the .php files as follows:

Article.php:	# include_once( "CacheManager.php" ); Setup.php:	# include_once( "$IP/Title.php" ); SpecialMovepage.php:	#include_once( "LinksUpdate.php" );

Alternatively ensure that all inclusions use the same format i.e. make occurrences of ("CacheManager.php") and ( "$IP/CacheManager.php")'' consistent by using only one or other format. (I think the problem is because using the different formats is interpreted as two separate includes Mintguy 03:41, 22 Nov 2003 (UTC)).

iconv
Also, you really do need iconv for some of the special pages to work, unless you comment out the relevant call in language.php:

# return iconv( "UTF-8", $wgInputEncoding, $s );


 * Q:Did you try the iconv hack?
 * A:I believe there's a win32 build of iconv available out there somewhere!
 * Try looking at http://in2.php.net/iconv for more info! and a Win32 working (??) version is available at http://www.zlatkovic.com/pub/libxml/iconv-1.9.1.win32.zip

Content
All the articles of Wikipedia and their revisions are available for download at http://download.wikipedia.org/ in a MySQL dump format. The cur dump is enough for reading / mirroring wikipedia. \progra~1\mysql\bin\mysql -u root -p mysql> use wikidb Database changed mysql> mysql> source c:\temp\20031104_cur_table.sql
 * the cur dump only holds the latest modification of an article
 * the old dump has all the earlier revisions
 * Save and extract the file somewhere (ex c:\temp\).
 * Open a command box (start -> run -> cmd.exe).
 * Execute:
 * Enter root password for mysql
 * At the prompt select the wikipedia database (this is, by default, named 'wikidb'):
 * Then load the dump (change filename by the filename you downloaded):

N.B. this will take some time (several hours) if you load the full dump of the English Wikipedia database!

Next page: Running MediaWiki on Mac OS X >