Manual:Installing MediaWiki on

Jump to: navigation, search

Introduction[edit | edit source]

Note: Some instructions are no longer required with the new project web system rolled out by See this for more. This document has been updated for this.

These are the instructions for manually installing MediaWiki on SourceForge, however, now supports MediaWiki as a hosted app. To install, you can just go to Project Admin -> Feature Settings, click the Available Features tab, and then check "MediaWiki". The hosted app doesn't have much flexibility (it doesn't allow you to change skins or add extensions), although it does integrate with the SourceForge user accounts.

Let's say that:

  • your project is named "myproject"
  • your login on sourceforge is "username"

Installation[edit | edit source]

Database creation[edit | edit source]

Log in on sourceforge, go to "Project Admin" > "Feature Settings", then "Configure" side "MySQL Database". You must set the passwords.

For example :

  • m12345ro:passworddb
  • m12345rw:passworddb
  • m12345admin:passworddb

Create the database m12345_wikidb on (https://mysql-[your project character]

Copy mediawiki on your site[edit | edit source]

Copy content of your MediaWiki folder to sftp://username,

Configure mediawiki[edit | edit source]

Go to

   * Wiki name: MyProject
   * Contact e-mail:
   * Admin username: WikiSysop
   * Password : mypassword
   * Shared memory caching: CACHE_ACCEL
   * E-mail (general): enabled
   * mysql: mysql-m
   * Database name: m12345_wikidb
   * DB username : m12345admin
   * DB password: passworddb 

Remove config folder

Memory[edit | edit source]

Start LocalSettings.php with

# If PHP's memory limit is very low, some operations may fail.
ini_set( 'memory_limit', '32M' );

SourceForge requires that you ask their permission before you use this setting [1]

E-mail[edit | edit source]

To enable email, set up an email password by going to "Project Settings -> Features", clicking on "Manage" beside "Project Web" and setting it from there. After that, add to LocalSettings.php:

$wgSMTP = array(
 'host'     => "prwebmail", //could also be an IP address
 'port'     => 25,
 'auth'     => true,
 'username' => "YOUR_PROJECT_NAME_HERE",

Email should now work, but SourceForge will monitor abuse of the service. As such, it is recommended to disable the send out of watchlist emails or install Extension:ConfirmEdit.

Optional configuration[edit | edit source]

[edit | edit source]

Add these lines to LocalSettings.php:

	$wgFooterIcons['poweredby']['sourceforge'] = array(
        "src" => ";type=1",
        "url" => "",
        "alt" => "Get myproject at Fast, secure and Free Open Source software downloads",

Enabling upload[edit | edit source]

You then need to change a setting in LocalSettings.php to enable upload:

$wgEnableUploads = true; 

Block anonymous IP-addresses[edit | edit source]

Users may be all linked to an IP address of a Sourceforge-server (range to, which makes difficult to block vandals. Use the $wgSquidServers variable to display the real IP address by adding the following line in LocalSettings.php:

$wgSquidServers = array('', '', '', '', '', '');

Using a Short URL[edit | edit source]

In order to use short URLs, you will need to follow the directions at Manual:Short URL/wiki/Page title -- no root access. Note that these directions assume that you installed the wiki in the "w" directory and want "wiki" to be a part of the short URL.