Manual:Installing MediaWiki on Windows Server 2019

From MediaWiki.org
Jump to navigation Jump to search
Installation guides
FreeBSD
GNU/Linux
- ALT Linux
- Arch Linux
- Damnsmalllinux
- Debian or Ubuntu
- Fedora
- Gentoo
- Mandriva
- Red Hat Enterprise Linux or CentOS
- Slackware
macOS
NetWare
Solaris
- Solaris 11 / opensolaris
- Solaris 10
Windows
- Windows Server 2019
- Windows Server 2016
- Windows Subsystem for Linux
on a stick
- Uniform Server
- XAMPP
Sourceforge.net

This configuration is in progress with versions (18/06/2020):

  • Microsoft Windows Server 2019
  • Apache 2.4.41 (Win64)
  • PHP 7.3.19
  • MySQL 5.7.29 (community distribution) ;
  • MediaWiki 1.34.1

The goal of this guide is to give some a quick and easy way to install MediaWiki on a Windows Server 2019 environment.

Requirements[edit]

The following items will be required:

Instructions[edit]

Apache[edit]

Set Default Document[edit]

Set default document to index.php.

  • Add index.php and move it to top of the list.

PHP[edit]

To install PHP follow the steps below:

  1. Install the Microsoft Visual C++ Redistributable.
  2. Extract the PHP zip into to a location of your choice. In this example C:\PHP is used.
  3. Create the php.ini file by opening the php.ini-production file and saving it as php.ini.
  4. Open your C:\PHP\php.ini file in Notepad and uncomment the values below by removing the semi colon symbol (;). Line numbers depend on version. Newer versions use the format extension=<ext> instead of extension='php_<ext>.dll for the extensions.
    1. extension_dir = "ext"
    2. cgi.force_redirect = 1
    3. cgi.fix_pathinfo = 1
    4. fastcgi.impersonate = 1
    5. fastcgi.logging = 0
    6. extension=curl
    7. extension=fileinfo
    8. extension=gd2
    9. extension=intl
    10. extension=mbstring
    11. extension=mysqli
    12. extension=openssl
    13. extension=pdo_sqlite
    14. extension=pgsql
    15. extension=sockets
    16. extension=sqlite3
  5. Edit permissions on the images directory of the MediaWiki installation and add IUSR with modify privileges.
  6. Edit permissions on the temp directory of windows (C:\Windows\Temp) and add IUSR with modify privileges.
  7. Create a file called C:\inetpub\wwwroot\phpinfo.php, include the lines below.
  8. Open web browser and access http://127.0.0.1/phpinfo.php, it should bring up a PHP information page.
Contents of file PHPInfo.php
<?php phpinfo();

Database[edit]

MySQL[edit]

To install MySQL follow the steps below:

  1. Launch the installer, select Server only.
    1. After the installer finishes installation you will be prompted to run the MySQL Server Instance Configuration Wizard.
    2. Select Server Machine, then click Next
    3. Confirm Enable TCP/IP Networking and Add firewall exception for this port are checked, then click Next.
    4. Enter in root password, then click Next.
    5. Confirm Install as Windows Service is checked, then click Next.

MediaWiki[edit]

To install MediaWiki follow the steps below:

  1. Extract the media wiki archive into C:\inetpub\wwwroot\mediawiki directory. Do not use 7zip, see: Topic:Vp73pxywm362a3t5
  2. If you have just one .tar file, extract that file into the C:\wamp\www\mediawiki directory.
  3. If you want MediaWiki to be the default website follow the optional instructions below.
  4. Configure MediaWiki by accessing the configuration URL (http://[server name]/mediawiki/mw-config/index.php).
  5. Follow guide for using the configuration script. Ignore the GNU diff3 not found error.

Create specific IIS website for MediaWiki (Optional)[edit]

Configure MediaWiki as the default website for a host name or an IP address.

  1. Select a name for the web site.
  2. Rename the C:\etpub\wwwroot\mediawiki folder to C:\inetpub\wwwroot\[web site name].
  3. Open the Internet Information Services (IIS) Manager, open the server name from the list.
  4. Right click on Sites and choose Add Web Site....
    1. Enter the web site name in the Site Name field.
    2. Change the physical directory to C:\inetpub\wwwroot\[web site name].
    3. Add a host name for your website or select an IP address.
  5. Click OK to create the web site.

GNU diff3 Installation (Optional)[edit]

Common Errors[edit]

  • No styling when installing MediaWiki: Set the permissions for the temp directory of windows (C:\Windows\Temp) and add IUSR with modify privileges.
  • 500 error on configuration step: Topic:Vp73pxywm362a3t5

Notes[edit]

This installation is testing with versions (18/06/2020):

  • Windows Server 2019
  • Apache 2.4.41
  • PHP 7.3.19
  • MySQL 5.7.29
  • MediaWiki 1.34.1