Manual:Running MediaWiki on Windows

From MediaWiki.org
Jump to: navigation, search

Other languages:
català • ‎Deutsch • ‎English • ‎español • ‎suomi • ‎français • ‎italiano • ‎日本語 • ‎Nederlands • ‎polski • ‎português • ‎português do Brasil • ‎русский
Installation guides
on FreeBSD
on GNU/Linux
- ALT Linux
- Arch Linux
- Damnsmalllinux
- Debian
- Fedora
- Gentoo
- Mandriva
- Red Hat Enterprise Linux
- Slackware
- Ubuntu
on Mac OS X
on NetWare
on Solaris
- on Solaris 11 / opensolaris
- on Solaris 10
on Windows
- Windows Server 2008
- Windows Server 2003
- Streamlined Guide
- Simple Windows/Apache Guide
- on a stick
- on MoWeS Portable
- on Uniform Server
- on XAMPP
- on Sourceforge.net

This page will give you information about installing MediaWiki on a Microsoft Windows system using standard installation methods. For Windows-only hosting environments, the WIMP stack (using IIS) was recommended over Apache, (WAMP stack) as of 1.18, for manual installs.

Nginx - an alternative to apache and IIS - may be useful if you support MediaWiki across other host operating systems and/or are already using Nginx for internal hosting.

Required software[edit | edit source]

Getting required software[edit | edit source]

Although these products are not that difficult to configure under Windows, it can be extremely difficult to install (by difficult, it takes 30 minutes for WIMP) and configure Apache+MySQL+PHP one product at a time if completely new to apache/mysql/php. Under such circumstances it is highly recommended to look for a LAMP or WAMP pre-made combination which can just be installed and used. These will save you 99% of the trouble of configuring each package manually. The down-side is that some of these are trimmed down or modified versions which makes it hard to upgrade individual components, and other ones are seriously out of date.

XAMPP[edit | edit source]

The most popular of which is XAMPP:

Bitnami[edit | edit source]

  • Bitnami is a free suite of compatible installers for open source software. It supports an Nginx stack [1], Microsoft WAMP [2]), a generic LAMP stack [3] and XAMPP (which it will not install itself and on which only XAMPP-specific bitnami installers work [4]). Bitnami installs Mediawiki 1.23 on any of those, and they work alongside Wordpress or other software bitnami supports. See Bitnami itself for instructions [5] and updated support data. This can be a good option if you intend to use only the long term stable supported mediawiki releases. Support for older versions is not guaranteed. See Manual:Running_MediaWiki_on_Windows/bitnami for experiences with this method.

WAMP[edit | edit source]

See http://www.wampserver.com/en/

WIMP[edit | edit source]

On Azure: [6].

Installing MediaWiki[edit | edit source]

For experienced users, here is the quick version of the installation instructions. Most users will want to go through all the passages.

  1. Check that your system meets the minimum requirements
  2. Download MediaWiki (direct link to latest version) and extract the archive to a web-accessible folder on your server.
  3. Point your browser to the directory where MediaWiki was extracted and follow the link to the setup screen. It should be in the form http://[domain]/[directory]/mw-config/index.php. Replace [directory] with the path to your extracted MediaWiki folder. If installing on a local machine, replace [domain] with [localhost]. A locally installed wiki will need the LocalSettings.php modified from [localhost] to [domain] if you will ever be accessing the wiki from that domain. If installed on a remote server, replace [domain] with your server's domain name (eg: www.myserver.com).
  4. Follow the on-screen instructions to complete the process.

These instructions are deliberately brief. There is a lot that could go wrong, so if in doubt, you are advised to read the full instructions!


Optional Software[edit | edit source]

Diffutils[edit | edit source]

Diffutils (which contains diff3) can be downloaded from here, and File (file type checker) from here.

To activate the use of diffutils within MediaWiki, you have to ignore the fact that they won't be found during installation (they may actually be found if you install diff into your path) and open up LocalSettings.php to make the following changes:

$wgDiff3 = "/usr/bin/diff3";

becomes

$wgDiff3 = "C:/Program Files/GnuWin32/bin/diff3.exe";

and replace:

$wgMimeDetectorCommand = "file.exe -bi"; #use external mime detector (linux)

with

$wgMimeDetectorCommand = "C:/Program Files/GnuWin32/bin/file.exe -bi"; #use external mime detector

Please note that you have to replace "C:/Progra..." with the actual location where you installed the tools to.

ImageMagick[edit | edit source]

Note: PHP now comes with GD enabled by default which will work for thumbnailing. GD will not require any configuration or modification to be used. Therefore it's highly recommended to not install ImageMagick, since it is known to be unstable. In fact the $wgImageMagickConvertCommand and Image.php mentioned below does not exist in MW1.15.1. However, in MW 1.23 you have to disable ImageMagick in LocalSettings.php by setting $wgUseImageMagick to false.
Note: Settings for XAMPP v1.7.7 VC9 and MediaWiki v1.18.1

The "Q8" ImageMagick releases use 8 bits per channel, while the "Q16" releases use 16 bits per channel. To make image thumbnailing work, you will need to open includes/Image.php, locate the line that starts with $cmd = $wgImageMagickConvertCommand ., and remove the escapeshellarg() function, then do the same to the next line, so that the command variable builds like this:

 $cmd  =  $wgImageMagickConvertCommand .
       " -quality 85 -background white -geometry {$width} ".
       ($this->imagePath) . " " .
       ($thumbPath);

In addition, check to be sure that the $wgImageMagickConvertCommand in localsettings.php points to
(your imagemagick folder path)/convert.exe

Note:
  • use the .exe extension! It won't work, if omitted.
  • use a path without spaces as install path for ImageMagick or use the short name of the path.

Another way to make this work is to add the ImageMagick path to your Windows PATH variable, and simply setting the $wgImageMagickConvertCommand in LocalSettings.php as follows (note that you must still modify Image.php as shown above):

$wgImageMagickConvertCommand = "convert.exe";

Make sure that the Internet Guest Account (Usually IUSR_MACHINENAME) has Read & Execute rights to the ImageMagick bin directory. Without this you might see an PHP shell execution error similar to what happens when it can't find the convert.exe file.

Mathematics Support[edit | edit source]

See Texvc#Windows.