MediaWiki Sample Files

by Steve Jacobson

Note

The Windows Web Application Gallery (WWAG) is being retired on July 1, 2021. We are no longer taking submissions via the Submission Portal. Please contact webpi@microsoft.com to make updates to your existing submission.

This is a set of sample files you could use with MediaWiki and the Web Deployment tool for deploying MediaWiki on IIS. The files are annotated with comments that explain specific lines in the files you'll need to customize for your configuration.

MediaWiki has an installation routine that takes care of creating the database using database super user privileges, so there is no requirement for using the Web Deployment Tool for that. However, MediaWiki could be set up to create the database from the Web Deployment Tool if that was preferred.

In addition, the MediaWiki installation routine creates the configuration file "LocalSettings.php" in the config sub directory. This requires the user to access the Operating System through either a command line, or the Explorer, to move the LocalSettings.php file to the application root. It might be worth investigating whether or not moving all of the steps for creating the database and LocalSettings.php file into the Web Deployment Tool would be worth the effort. The benfit would be that when the Web Deployment Tool (Or Web Platform Installer calling the WDT) was finished, the Wiki would be completely configured and ready for use. Or at least ready for the remaining system tests to be performed, and then to have the Wiki be used. The work invovled would be converting the PHP parameterization to WDT parameterization. The potential risk is that if the installation needed to change in any significant way, the change would have to be made in the MediaWiki installer, and in the WDT configuration files.

Sample manifest.xml file

<MSDeploy.iisApp>
    <iisApp path="mediawiki-1.15.1"/>
    <setAcl path="mediawiki-1.15.1/config" setAclAccess="Modify" setAclUser="anonymousAuthenticationUser" />
</MSDeploy.iisApp>

Sample parameters.xml file

<parameters>
  <parameter 
    name="Application Path" 
    description="Full site path where you would like to install your application (i.e., Default Web Site/mediawiki)" 
    defaultValue="Default Web Site/mediawiki" 
    tags="iisapp"
    >
    <parameterEntry 
      type="ProviderPath" 
      scope="iisapp" 
      match="mediawiki-1.15.1" 
      />
  </parameter> 
  <parameter 
    name="SetAcl1" 
    description="Automatically sets write access for the application" 
    defaultValue="{Application Path}/config" 
    tags="Hidden"
    >
    <parameterEntry 
      type="ProviderPath" 
      scope="setAcl" 
      match="mediawiki-1.15.1/config" 
      />
  </parameter>

</parameters>

Sample web.config file

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <defaultDocument>
      <files>
        <remove value="index.php" />
        <add value="index.php" />
      </files>
    </defaultDocument>
  </system.webServer>
</configuration>