MediaWiki

Apache
Go to Apache.

MySQL
Go to MySQL.

PHP
Set uses:


 * apache2 -- Apache Support (required)
 * mysql -- MySQL database support (required)
 * suhosin -- PHP Security Module (HIGHLY recommended)
 * ssl -- Secure Sockets Layer (for encrypted connections)
 * gd -- GD Image rendering library (if you want to thumbnail images)
 * jpeg -- JPEG image support
 * truetype -- Truetype Fonts

Install:

Install
Set uses:

Install:

Config
And point your browser to http://127.0.0.1/mediawiki/index.php. And follow the white rabbit...

Then

Advanced Configs
http://meta.wikimedia.org/wiki/MediaWiki_FAQ#Configuration

http://www.mediawiki.org/wiki/Manual:LocalSettings.php

How do I allow only logged-in users to edit?
See http://meta.wikimedia.org/wiki/Setting_user_rights_in_MediaWiki for questions relating to user rights.

First you need to determine MediaWiki version. Go to Special pages, Version.

MediaWiki version 1.5.1 or later
To stop people other than this SysOp (Admin) from creating accounts, add this line in : // Only SysOp (Admin) can create accounts - $wgGroupPermissions['*']['createaccount'] = false;


 * Logged-in users will still be able to create accounts if that's the only line you change.

To stop people from anonymously editing pages without being logged in, add this line in : // No anonymous editing allowed - $wgGroupPermissions['*']['edit'] = false;

MediaWiki version earlier than 1.5.1
Add this in : $wgWhitelistEdit = true;

Testing
To test whether anonymous editing disable worked, make sure you are really logged out. Possibly you will be kept logged in using some cookie or whatever, in such case press "Log Out" in top right corner.

How do I allow only authorized users to view pages?
There are two hacks (patches) for this. See http://meta.wikimedia.org/wiki/Page_access_restriction_with_MediaWiki and http://meta.wikimedia.org/wiki/Hidden_pages. Alternatively using native wiki http://meta.wikimedia.org/wiki/Preventing_Access.

This can also be done by adding the following line to the LocalSettings.php file in MediaWiki 1.9.x
 * $wgGroupPermissions['*']['read'] = false;

Short way
As an administrator, edit the wiki page "MediaWiki:Sidebar". (The editinterface permission needs to be enabled and is enabled for administrators by default; for information on assigning it to other groups, see Manual:User rights.)

Example sidebar code:
 * navigation
 * mainpage|mainpage
 * Special:Recentchanges|Recent changes
 * new heading
 * portal-url|portal
 * http://www.mediawiki.org|MediaWiki home

Short_URL
http://www.mediawiki.org/wiki/Manual:Short_URL

Setting the Copyright informations
For more information look here.

Generating sitemaps
Since MediaWiki 1.6, the MediaWiki core has a Google site map generator. It is a command-line utility, and it is located at maintenance/generateSitemap.php in your MediaWiki directory.

If your URL is http://something.domain.org/ then YourSiteName is something.domain.org and the commandline would be:

You may also use --path index.php if your site publishes URLs like http://murphy.if.usp.br/ wiki/index.php/ArticleName so the commandline would be:

Make sure that the files it generates are moved to your docroot. They are named sitemap-*.xml*

Mediawiki 1.11.1
This version has a different sintax:

Visit https://www.google.com/webmasters/sitemaps/siteoverview?hl=en and enter http://something.domain.com/sitemap-index-mediawiki.xml (whatever your URL is).

Google analytics
Let use google analytics tool to get some statistics of our wiki!

Let's do it
wiki-install-folder/extensions/googleAnalytics
 * 1) Create a new folder (directory) in the following location:
 * 1) Download the googleAnalytics.php file from SVN
 * 2) Copy googleAnalytics.php in to the new googleAnalytics folder
 * 3) Add the following code to your LocalSettings.php at the bottom:


 * NOTE: This extension now requires MediaWiki 1.11+

Adding a new website for interwiki linking
Interwiki links are links to pages of other projects, using a prefixed internal link style.

Interwiki links make it possible, to link to pages of (e.g.) Wikipedia, Wikibooks, Wikinews etc. or to your wiki-project in different languages (see Manual:Wiki family).

A link like  will appear like this: Main Page and redirect you to Wikipedia's Main Page.

MySQL
The wiki database name is: wikidb and the table prefix of the wiki that you want to modify the interiki is m1_.

The fields of the  database table are as follows: Note: If iw_url is a binary BLOB field (SVN version, but also occurs in version 1.11.0, bug?) this won't work directly. You have to enter it as binary. There are two possible solutions: 1. You save the url in a plain text file, then import it through phpmyadmin. 2. You can directly enter an SQL query.
 *  : choose a prefix, which is used for interwiki linking, e.g. "wikipedia" for linking to Wikipedia
 *  : enter the project's URL, e.g.  for Wikipedia. Don't forget the   as it is replaced with the article's name you are linking to (  links to  ).
 *  : if 1, your wiki will redirect even external links of the form iw_prefix:title, not only those from its own pages. you need this if you want to use the redirect functionality from outside your wiki or other wikis use your transwiki functions for nested transwiki links (like http://en.wikipedia.org/wiki/fr:Accueil)
 *  : "transwiki transclusion" - set to 1 if you want to use pages from the other wiki as templates. You will also need to set $wgEnableScaryTranscluding = true in your LocalSettings.php

Upgrade
First make a full backup of the database (see here how you can do it), and the files at htdocs/mediawiki.

Now you can install the new version:

Then you need to copy the file /usr/share/doc/mediawiki-1.8.5/AdminSettings.sample.bz2 to /var/www/localhost/htdocs/mediawiki/AdminSettings.php or the place where you mediawiki is installed, at this file you should edit and set the username and password of db user that has more privileges than the common db user created at the installation. The root user can be used, but DON'T forget to erase the info after use it

Now go to maintenance directory and run the upgrade script:

Now go to Special:Version page and check that the version shown is correct. And erase the AdminSettings.php file and remove the old versions of mediawiki:

Media wiki and postgre
I can't make it works with postgre! See this post.