Manual:Installing MediaWiki on SourceForge.net

=Introduction=

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=

Database creation
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
Copy content of your MediaWiki folder to sftp://username,myproject@web.sourceforge.net/home/groups/m/my/myproject/htdocs/wiki

Do not copy the images folder.

Create a symbolic link for images
To enable image uploads, the first step is to ensure that the images directory is writable. As with the sessions directory, this is done by creating a writeable directory in the /home/groups/m/my/myproject/persistent directory and create a symbolic link to this directory :


 * 1) sftp username,myproject@web.sourceforge.net:/home/groups/m/my/myproject/htdocs/wiki
 * 2) mkdir /home/groups/m/my/myproject/persistent/images
 * 3) symlink /home/groups/m/my/myproject/persistent/images /home/groups/m/my/myproject/htdocs/wiki/images

Copy the content of mediawiki-1.13.1/images to /home/groups/m/my/myproject/htdocs/wiki/images

Change the rights of /home/groups/m/my/myproject/htdocs/wiki/images (a+rwx)

Modify index.php
Edit /home/groups/m/my/myproject/htdocs/wiki/config/index.php and comment :

/* if( !is_writable( "." ) ) {	dieout( " Can't write config file, aborting

In order to configure the wiki you have to make the config subdirectory writable by the web server. Once configuration is done you'll move the created LocalSettings.php to the parent directory, and for added safety you can then remove the config subdirectory entirely.

To make the directory writable on a Unix/Linux system:

cd /path/to/wiki chmod a+w config

Afterwards retry to start the setup. " );

}



Configure mediawiki
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): disabled * mysql: mysql-m * Database name: m12345_wikidb * DB username : m12345admin * DB password: passworddb

The result configuration will be displayed. Copy it to sftp://username,myproject@web.sourceforge.net/home/groups/m/my/myproject/htdocs/wiki/LocalSettings.php

Remove config folder

Memory
Start LocalSettings.php with <?php ini_set( 'memory_limit', '32M' );
 * 1) If PHP's memory limit is very low, some operations may fail.

SourceForge requires that you ask their permission before you use this setting

=Optional configuration=

Sourceforge logo
Modify in wiki/includes/Skin.php:

Enabling upload
You then need to change a setting in LocalSettings.php to enable upload: $wgEnableUploads = true;

(Anonymous) users are 127.0.0.1
Users may be all linked to the IP address 127.0.0.1, 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('127.0.0.1');

Using a Short URL
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.