Debao's Blog...

Install MediaWiki on Windows

MediaWiki + Apache + php + MySQL


Download and install the msi installer of MySQL 5.6 from http://dev.mysql.com/downloads/installer/


Download and install Apache 2.4 from http://www.apachelounge.com/download/


Download and install php 5.8.6 from http://windows.php.net/download/

Rename php.ini-production to php.ini, then enable mysql extension

extension_dir = "c:/php-5.6.8/ext"
extension = php_mysql.dll

Enable intl extension

extension = php_intl.dll

To make intl really works, the following files which sit in the PHP directory

  • icudt54.dll
  • icuio54.dll
  • iculx54.dll
  • icutu54.dll
  • icuin54.dll
  • icule54.dll
  • icutest54.dll
  • icuuc54.dll

Should be copied to the bin path of Apache, or one of the path in system environment variant PATH.

Add following line to the conf file of apache to enable php.

LoadModule php5_module "c:/php-5.6.8/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php-5.6.8"

Add index.php to DirectoryIndex

DirectoryIndex index.html index.php

Create a simple .php file for test.

<?php phpinfo() ?>


Download MediaWiki 1.24.2 from http://www.mediawiki.org/wiki/Download

Add following line to the conf file of Apache.

# MediaWiki
Alias "/wiki" "d:/www/mediawiki-1.24.2"
<Directory "d:/www/mediawiki-1.24.2">
    ScriptInterpreterSource Registry-Strict
    Options +ExecCGI +FollowSymLinks
    DirectoryIndex index.php index.html
    AllowOverride Limit FileInfo Indexes Options
    Require all granted
<Directory "d:/www/mediawiki-1.24.2/images">
   # Ignore .htaccess files
   AllowOverride None

   # Serve HTML as plaintext, don't execute SHTML
   AddType text/plain .html .htm .shtml .php

   # Don't run arbitrary PHP code.
   php_admin_flag engine off

   # If you've other scripting languages, disable them too.