Setting up your own MediaWiki?

From InterSciWiki
Jump to: navigation, search



The unix server setup for this wiki

This from our wiki administrator (Setting_up_your_own_MediaWiki?#The_unix_server_setup_for_this_wiki: We start out setting up a wiki similar to that of We have not started setting up the EduMod wiki but it will be on the same server and the process is the same.

Professor White's wiki server is running on Fedora linux distribution for its operating system, You need to install Apache web server with support for php. If you are a beginner with setting up a linux machine, I suggest you look at this website,

Here's the info about MediaWiki Installation, and a brief overview of the configuration we did for the wiki setup.

  1. Download mediawiki from
  2. Review the Installation Requirements:
  3. Configure Apache to make some folder (e.g. /var/www/html ) accessible to the web. Extract Mediawiki to a "wiki" subfolder - Apache Configuration:
  4. Configure a MySQL database for the MediaWiki installation:
  5. Follow the installation instructions here:

Customizations for MediaWiki:

  1. Enable LaTeX syntax:
  2. Install the Cite Extension:
  3. Follow recommendations about Security here:

Anti-Spammer configurations:

$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = true;
$wgNeedConfirmedEmailForEditing = true;
Download recaptcha from:

Good luck with your installation.

On wikis

  • Wikis by nature are a collection of "pages" - where a page can be structured independently of other pages. This makes it very easy for many users to create or modify content. But it can make organizing all of the content a difficult task. is the homepage which shows a default template - you can browse around there to get a feel for how they organize their content and the general layout. If you use mediawiki, your pages would have a similar "look and feel" unless you do heavy modifications to the template. --Jon Nilsson, who helped set up our site.
  • MediaWiki is a downloadable software package that was first intended for use by the free encyclopedia, Wikipedia. Today, the software is available for free to the general public to build and publish their own wiki pages. Businesses across the world are using MediaWiki. Function Design of the United Kingdom uses MediaWiki as an internal knowledge base. There are many possibilities for Media Wiki to be used in secondary education. Many academic students are referring wiki for completing their assignment.
Jon: I gave some structure to our links through hierarchies for types of authors and subject areas. Doug 11:44, 20 June 2007 (PDT)

Getting started (as MediaWiki Developer)

Captcha (Did this! It was easy)

Web sites that accept postings from the public, like this wiki, are often abused by spammers who use automated tools to post their links to many sites. While these spam links can be removed, they are a significant nuisance.

Sometimes, especially when adding new web links to a page, the wiki may show you an image of colored or distorted text and ask you to type the words shown. Since this is a task that's hard to automate, it will allow most real humans to make their posts while stopping most spammers and other robotic attackers.

Unfortunately this may inconvenience users with limited vision or using text-based or speech-based browsers. At the moment we do not have an audio alternative available. Please contact the site administrators for assistance if this is unexpectedly preventing you from making legitimate posts.


For email:

If ever you set up your own media site

Here is an idea:

Perhaps easier than MediaWiki proper

This was easy to do and free because they use keystroke recognition to help digitize books. I edited localSettings to activate the keys. It asked for the keys, which I had on paper only. Asked for new keys. Entered them. There was no need to do that but when testing, Captcha is only activated when you add a new external link. So you might not think it works if you only edit as a test.

Getting svg graphics to work

Try this?

Getting LATEX UNIQ9b86049d0f26dd40-math-00000000-QINU math symbols to work

I asked Remi who runs Wikiversity:

What did you follow to implement Latex characters for math symbols. Seems to be quite alot of perplexity about this on google-search sites.Douglas R. White 23:17, 5 July 2007 (UTC) ← I think that is the page you are looking for. I found it on Wikipedia is a sister project of Wikiversity (which could probably be considered a much younger less mature sibling); both projects are run by the Wikimedia foundation. I hope that helps. --Remi 23:31, 5 July 2007 (UTC)

Retrieved from ""

see below on installing texvc

this is referenced at

and this at

which was found by Remi at

Dao Vuong set up our system so it works... e.g., testing <math> commands:

<math>\sum_{m=1}^\infty\sum_{n=1}^\infty\frac{m^2\,n} {3^m\left(m\,3^n+n\,3^m\right)}</math>


more sample math commands at:

Ways we can make changes in our MediaWiki

  • Set $wgLogo to the URL path to your own logo image (the current image is $wgLogo = "$wgStylePath/common/images/wiki.png"
  • (you do this in LocalSettings.php which you can edit in ascii format)
  • No help here:
  • The easy way: Backup-Skins-Common-Images-wiki.png
  • rename your preferred image wiki.png, then copy it over
  • Tip: The logo image should be 135 pixels square.
  • If uploads are enabled in the wiki, files will be put in subdirectories under here (images).
  • Note to upgraders: as of MediaWiki 1.5, the images used in the user interface have been moved to skins/common/images.

Correcting the local time setting

The clock was off by four hours. I tried but these didnt work
$wgLocalTZoffset = date("Z") / 60;
$wgLocalTZoffset = date("Z") / -240;
This worked (in the LocalSettings.php:
$wgLocaltimezone = 'PST';
$wgLocalTZoffset = date("Z") / 60;
This changed all the times, now and in the past

RSS and WordPress

  • RSS in Plain English
  • (What is RSS? Rich Site Summary?) alt:RSS (Really Simple Syndicate) is a dynamical content that can be issued by various sources (scientific journals, new papers, etc.) and can be displayed on this website pages. You can thus customize your pages so that all the relevant informations for you appear within the page. To learn more about RSS and how it works : read this, look on the right bar to read about Popular Feed Readers and let --Doug know if you think we want to go there -- provide RSS updates for our wiki.
  • Word Press is a more structured format, but allows for easy template changes. It is actually a blogging application intended to provide one page which consists of sequential update entries, and any number of auxiliary pages organized into a hierarchy. The auxiliary pages are like normal website pages - they are pretty much static content pages. And this differs from the main page which will show the most recent "entries" by any contributors - in your case this could be news updates, published articles, research findings, or whatever. You mentioned that you want RSS feeds of the content. Wordpress is equipped for Rss by default, since it's content is a list of successive entries. To familiarize yourself with Wordpress, go to - their "home page" is actually a static page with sub-pages on the left side (you should especially read the section that contains pages for those "new to Wordpress"). The "Blog" page is the dynamic content page which shows a list of successive entries: you can see the title of the entry, the date, which user posted it, etc.

Allowing or blocking search engines in Wikis

The information specifying the parts that should not be accessed is specified in a file called robots.txt in the top-level directory of the website, above or under wiki, the url server name, i.e., at InterSci. I chose

User-agent: *
Disallow: /cgi-bin/
Disallow: /images/
Disallow: /tmp/
Disallow: /private/

Math images setup (FOLLOWING REMI ABOVE)

When done: see *Quik math for wiki

in LocalSettings.php $wgUseTeX = true;



OCaml 3.06 or later is required to compile texvc; this can be acquired from if your system doesn't have it available.

(but for the novice this is pretty difficult to figure out) says: Another way to use math under windows Maybe you will find that compile texvc is so complicated. (I am the one.) Here is another solution (Using LatexRender, thanks to Benjamin Zeiss).

You must replace the content of math.php file with this at first. I found that the last link is broken. you can find this page here

Append follow content at the end of LocalSettings.php: $wgUseTeX = true;

Where is your ImageMagick -- ON THE WIKI SERVER $wgImageMagickConvertCommand = 'D:\WebServer\ImageMagick\convert.exe'; $wgImageMagickIdentifyCommand = 'D:\WebServer\ImageMagick\identify.exe';

Where is your Tex $wgLaTexCommand = 'latex.exe'; $wgDvipsCommand = 'dvips.exe';Create folder "math" and "tmp" in the "images" folder if not exist. MATH DOES EXIST temp file created Make sure you have a working ImageMagick and Latex. Now you can try in the sandbox to see whether it works.

LocalSettings.php has a switch I could change to true:

  1. If you have the appropriate support software installed
  2. you can enable inline LaTeX equations:

$wgUseTeX = false; says

$wgMathDirectory - The file system path of the directory containing LaTeX math images. ("{$wgUploadDirectory}/math") $wgMathPath - The URL base of the directory containing LaTeX math images. ("{$wgUploadPath}/math")


Our wikiguru Jonathan Nilsson did this for us see Mediawiki footnotes.

Help pages

These were downloaded from Mediawiki. Not difficult but an extensive download operation that places all the needed pages.


This was done by adding two lines to our Mediawiki commands in localSettings.

If ever you set up your own wiki site

Some modification of WikiChart could count hits on your site: wherein you can visualize the link structure of wiki visits between different pages See also See also Special:Specialpages and Special:Statistics

Here is an idea: Perhaps easier than MediaWiki proper



Mozilla wiki:'s_Guide


Mediawiki administrators: Nowhere is it documented that the three commands that govern secure edits (by those logged in), which are

$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = true;
$wgNeedConfirmedEmailForEditing = true;

Should follow this command which is 2/3s the way down in the Local*.php Or somewhere in this area, but not at the top of the file

$wgEnableUploads       = true;
Personal tools