Print

SiteGround Tutorials


MediaWiki Installation

How to install MediaWiki?

SiteGround customers can request a free installation of Mediawiki from their Customer Area.

Mediawiki software is not included in the Fantastico automated installation tool. That is why its installation is relatively more complicated than those of Joomla or phpBB for instance.

Pre-installation Steps

Step 1: Database Setup

Please check our MySQL tutorial, to see how to create MySQL database and user.

Step 2: Upload Files

Once you have downloaded the release you want (Mediawiki can be downloaded from here), you can upload it to your account using the File Manager tool or an FTP client.

MediaWiki Installation

Now you should open the folder where you extracted the files with your favorite browser. If you have extracted the files in a folder called 'wiki', then you should go to:

www.yourdomain.com/wiki

There you will be asked to set up your MediaWiki.

Mediawiki - set up your MediaWiki

When you click on the Set up the wiki link, you will be taken to the installation page.

Step 1: Site config

Under the Site config section you will be able to choose a name for your wiki, to set up a contact mail, to choose a language and license, to set an admin username and password and to select a caching method.

Mediawiki - Site config

Step 2: E-mail, e-mail notification and authentication setup

The name of the next section - E-mail, e-mail notification and authentication setup, speaks for itself. Here you should configure the mail features for your wiki.

Mediawiki -

Step 3: Database config

In the Database config section you have to set up your database:

Mediawiki - E-mail, e-mail notification and authentication setup

  • For Database type you should select MySQL.
  • For Database host you should type localhost.
  • In the fields for database name, user and password you should enter the MySQL database, username and password you created during the database setup.
  • The option for Superuser account should be left unchecked.

Step 4: MySQL specific options

Under MySQL specific options you can configure:

Mediawiki - MySQL specific options

  • Database table prefix. You can leave this blank or type in a table prefix, for example mw_ or wiki_.
  • Storage Engine. We recommend using MyISAM as a storage engine for your database.
  • Database character set. Here we recommend using Backwards-compatible UTF-8.

When you are ready, click on [Install MediaWiki!] button.

If everything has been set up correctly, you should see the Installation successful message.

Mediawiki - Installation successful

Then you have to move the file LocalSettings.php from the config/ folder to your main wiki folder.

Congratulations! MediaWiki has been successfully installed to your account. You can access it through: www.yourdomain.com/wiki.



MediaWiki Hosting
(c) Copyright 2005 SiteGround Wiki Hosting Services. All rights reserved.

Mediawiki Documentation

In the MediaWiki Documentation section we have included several articles, which will help you manage your wiki website. Below you will find informaiton about:



MediaWiki Hosting
(c) Copyright 2005 SiteGround Wiki Hosting Services. All rights reserved.
Next

Change Page Name

How to Change the Page Name

In order to change the name of a page, for example the name of the Main Page, you will first need to login as Administrator. You can do this by clicking on the log in/create account link at the top right corner of your page.

Mediawiki - log in/create account

Then you should type in the admin username and password you set during the installation.

Mediawiki - admin username and password

Now that you are logged in as administrator, you need to click on the [Move] link at the top of the page. A new page will open and you will be given the option to change the Title of the page.

Mediawiki - Change the Page Name



MediaWiki Hosting
(c) Copyright 2005 SiteGround Wiki Hosting Services. All rights reserved.
Previous Next

Add Links to Posts

How to Add Links to Posts

The first thing you need to do in order to edit the page is to click on the [Edit] button at the top of the page.

In order to create links, you will need to specify them with tags as follows. A link in external link style can be of the forms:

target: http://meta.wikimedia.org/ is rendered as http://meta.wikimedia.org/

[target label], with a blank space in between: [http://meta.wikimedia.org/ wikimedia] gives wikimedia

Mediawiki - Add Links



MediaWiki Hosting
(c) Copyright 2005 SiteGround Wiki Hosting Services. All rights reserved.
Previous Next

Sections and Categories

How to Create Sections and Categories in Mediawiki

Sections in Mediawiki are created by creating their headers. Please, use the example below and replace Section, Subsection and Sub-Subsection with the names you would like to give to your sections:

==Section==
===Subsection===
====Sub-subsection====

Here is a preview of how this example will look after the parsing:

Mediawiki - Create Sections and Categories



MediaWiki Hosting
(c) Copyright 2005 SiteGround Wiki Hosting Services. All rights reserved.
Previous Next

MediaWiki Posts

How to edit Posts in MediaWiki

All posts in the Wiki are located in the text version of the page. This can be edited by clicking on the edit button.



MediaWiki Hosting
(c) Copyright 2005 SiteGround Wiki Hosting Services. All rights reserved.
Previous

Mediawiki Skins

How to change Skins/Templates

You can change the Logo of your wiki by altering the $wgLogo variable in /includes/DefaultSettings.php to the name of the image you want to use as a logo.

Important Please note that this logo should be placed in the /skins/common/images/ folder.

Create MediaWiki Skin

You can create a skin all by yourself by following the steps provided below:

  • Go to the /skins folder within your Mediawiki directory;
  • Copy the /monobook directory and rename it with the name of your skin, for example:

    mywikiskin;

  • Copy the MonoBook.php file and rename it with the name of your skin, for example:

    MyWikiSkin.php;

  • Edit MyWikiSkin.php and change the class name to SkinMyWikiSkin, for example:

    class SkinMyWikiSkin extends SkinTemplate;

  • In MyWikiSkin.php, change make the other class to have your skin name together with the word Template, for example:

    class MyWikiSkinTemplate extends QuickTemplate;

  • In MyWikiSkin.php, make $this->skinname to have a string value of your skin name, for example:

    'mywikiskin';

  • In MyWikiSkin.php, make $this->template to have a string value of your skin name properly capitalised with the word Template, for example:

    'MyWikiSkinTemplate';

  • In your /mywikiskin directory edit the image and CSS files;
  • Edit and customise MyWikiSkin.php as you please;
  • In LocalSettings.php set

    $wgDefaultSkin = 'mywikiskin'

You can now enjoy the new skin you have prepared!



MediaWiki Hosting
(c) Copyright 2005 SiteGround Wiki Hosting Services. All rights reserved.

Extensions in MediaWiki

How to install MediaWiki Extensions?

If you have any extensions that you might want to install, you can do that by simply adding a line in the LocalSettings.php file in the following manner:

include("extensions/YourExtensionName.php");

Generally, each extension should have a Readme file that will explain if it needs any special actions taken before the installation.

In the Mediawiki Extensions section you will also find:



MediaWiki Hosting
(c) Copyright 2005 SiteGround Wiki Hosting Services. All rights reserved.
Next

MediaWiki Images

How to add images to MediaWiki?

To upload images, you should ensure that:

  • The 'images' directory is writable
  • Upload in MediaWiki is enabled. To do this, you should set $wgEnableUploads in LocalSettings.php to true
  • The file type you wish to upload must be allowed in /includes/DefaultSettings.php:

    $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'doc', 'xls', 'pdf' );

You can also set

$wgStrictFileExtensions = false;

to allow most file types to be uploaded.

  • The user is logged in

Uploading Directly from a URL

You can allow users to directly upload files from a URL. To allow this, in includes/DefaultSettings.php you should set:

$wgAllowCopyUploads = true

To add an image to a post, you need to indicate it in your post as an image using :

[[image:test.png]]

(where test.png is the name of the image).

You can also add thumbnailed images using:

[[image:test.png|thumb|caption]]

The image can be aligned so that you can add text next to it. Here is an example how to create a left alligned image:

[[image:test.png|left|thumb|50px|]]

Upload Permissions

By default, all registered users can upload files. To change this, you have to modify $wgGroupPermissions in includes/DefaultSettings.php:

  • To prevent normal users from uploading files, you should set:

    $wgGroupPermissions['user']['upload'] = false;

  • To create a special group called "uploadaccess", and allow members of this group to upload files, you should set:

    $wgGroupPermissions['uploadaccess']['upload'] = true;

  • To allow "autoconfirmed" (non-newbie) users to upload files, you should set:

    $wgGroupPermissions['autoconfirmed']['upload'] = true;



MediaWiki Hosting
(c) Copyright 2005 SiteGround Wiki Hosting Services. All rights reserved.
Previous Next

MediaWiki Math

How to enable Math in MediaWiki?

To see how to enable the Math extension for MediaWiki, please check our article about this in our Knowledge Base: How to enable Math support in Mediawiki>

Please, feel free to contact us if you have any questions or recommendations about this tutorial at: tutorials 'at' siteground.com



MediaWiki Hosting
(c) Copyright 2005 SiteGround Wiki Hosting Services. All rights reserved.
Previous