Manual:Installing MediaWiki on SourceForge.net

From mediawiki.org

Introduction[edit]

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

These are the instructions for manually installing MediaWiki on SourceForge.net. 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]

Database creation[edit]

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-m.sourceforge.net/ (https://mysql-[your project character].sourceforge.net/)

Copy mediawiki on your site[edit]

Copy content of your MediaWiki folder to sftp://username,myproject@web.sourceforge.net/home/project-web/myproject/htdocs/wiki

Configure mediawiki[edit]

Go to http://myproject.sourceforge.net/wiki/

   * Wiki name: MyProject
   * Contact e-mail: username@users.sourceforge.net
   * 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]

Start LocalSettings.php with

<?php
# 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]

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
 'IDHost'   => "YOUR_PROJECT_NAME_HERE",
 'port'     => 25,
 'auth'     => true,
 'username' => "YOUR_PROJECT_NAME_HERE",
 'password' => "YOUR_PROJECT_EMAIL_PASS_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]

Add these lines to LocalSettings.php:

	$wgFooterIcons['poweredby']['sourceforge'] = array(
        "src" => "http://sflogo.sourceforge.net/sflogo.php?group_id=353187&amp;type=1",
        "url" => "http://sourceforge.net/projects/myproject",
        "alt" => "Get myproject at SourceForge.net. Fast, secure and Free Open Source software downloads",
);

Enabling upload[edit]

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

$wgEnableUploads = true;

Block anonymous IP-addresses[edit]

Using a Short URL[edit]

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.

Dealing with slow performance[edit]

If you suffer from (very) slow performance, have a look at Manual:Performance tuning.