Mediawiki

Mediawiki hosting from a subdomain

If you want your Mediawiki installation to properly display from the following example subdomain: wiki.bgevolution.com You will need to add the following to your LocalSettings.php configuration file: $wgScriptPath =”"; You will also have to adjust the ANAME records of your DNS server to make sure all subdomains are forwarded to your servers IP address. Use the wildcard (*) and everthing should be find. You will also need to create a name based apache virtualhost to receive the incoming subdomain request. Something like the following works fine: <VirtualHost *> HostName wiki.bgevolution.com DocumentRoot: /home/user/mediawiki/ </VirtualHost>

Mediawiki user permissions

If your Mediaiwki installation is not going to be completely editable by the public you will need to change various permissions options in the LocalSettings.php configuration file. For instance if you want to prevent account creation use: // Only SysOp (Admin) can create accounts – $wgGroupPermissions['*']['createaccount'] = false; If you want to prevent people from creating new pages use: $wgGroupPermissions['*'    ]['createpage']      = false; If you want to allow people to create talk pages use: $wgGroupPermissions['*'    ]['createtalk']      = true; Or if you want to completely prevent users from editing, without logging is as a registered user, use: $wgGroupPermissions['*']['edit'] = false;

Mediawiki caching problem – Pages not updating after edit or login

Mediawiki has built in caching functions. This can sometimes conflict with browsers, and cause pages to not update after an edit has been made your a user has logged in. To resolve this issue disable the caching feature of Mediawiki. In the includes directory, of your Mediawiki installation, open DefaultSettings.php. Change: $wgCachePages = true; to: $wgCachePages = false;

Mediawiki Configuration

Mediawiki is a great tool that can accompany any blog. There are a couple of features that Mediawiki makes use of that require configuration in the LocalSettings.php file. To force users to register and login before editing add the following line to the LocalSettings.php file; “$wgGroupPermissions['*']['edit'] = false;”. Another commonly desired feature is the <ref>. To achieve this upload the following 2 files to the extensions/Cite directory. If the Cite folder does not exist, simply create it. Cite.php Cite.i18n.php Now the LocalSettings.php file must reference the files to properly use the Cite.php file. Add the following line before the closing ?>; “require_once( “{$IP}/extensions/Cite/Cite.php” );”. The third thing is a custom logo. This is simply achieved by adding the line “$wgLogo” to your LocalSettings.php file. Do it like so: $wgLogo = “path to the image”