Manual:System administration

This page documents common administrative tasks which you may wish to perform once your installation of MediaWiki is completed.

Toggle uploads on and off

 * See Configuring file uploads

Setting administrative rights
MediaWiki is a permissions-based wiki system. That means that users will only be able to perform the actions they are allowed to do. As declaring permissions individually for every user would be tedious and impractical, several User rights are pre-defined in MediaWiki. You are also allowed to declare new user groups, as your needs require. Individual extensions may also require creating new user rights.

Regardless of how they are created, user groups are fully customizable, by modifying the $wgGroupPermissions associative array in your LocalSettings.php file.


 * meta:Help:Setting user rights in MediaWiki
 * Manual:Preventing access
 * Paranoid Permissions

See also: Manual:Security

Sysop (Administrator)
The most common use. A user marked as 'sysop' can delete and undelete pages, block and unblock IPs, issue read-only SQL queries to the database, and use a shortcut revert-to-previous-contributor's-revision feature in contribs. (See Wikipedia:Administrators for info on sysops on Wikipedia specifically.)

Bot
A registered bot account. Edits by an account with this set will not appear by default in Recentchanges; this is intended for mass imports of data without flooding human edits from view. (Add &hidebots=0 to list changes made by bots e.g. like this)

Choosing a design: Selecting a skin
Currently, the following skins are available:

The default skin can be adjusted by modifying the $wgDefaultSkin variable in LocalSettings.php. A few other settings can also be adjusted regarding skins.

Localization
MediaWiki's interface has been translated in over 100 languages, and the interface text can be altered with minimal effort. The internationalized messages are located in the MediaWiki namespace of your wiki and can be edited by finding the correct page and modifying it (needs an account with the 'editinterface' right, by default the sysop group). A list of these pages, the default message, and, if applicable, the altered message, can be found in Special:Allmessages.

If you simply want to change the language of a wiki on a per-user basis, this can be done via Special:Preferences. If you selected the wrong language when setting up the wiki simply change the $wgLanguageCode in LocalSettings.php.

As features are continuously added to MediaWiki, interface text may not be fully translated. If you translate part of the interface, please submit your changes to Bugzilla so other users can use them. You might also consider participating in the Betawiki project, which is dedicated to translating MediaWiki into as many languages as possible. See also Localisation.

Upgrading MediaWiki

 * See Manual:Upgrading

Getting data: Importing a database dump
See 'Manual:Importing_XML_dumps

If you want a local copy of a Wikimedia wiki, see the overview at meta:data dumps and the download site.

Extending the database: Converting (importing) existing content
For existing sites it is always a tough task to migrate to a Wiki structure; the process of wikifying existing content from text files, HTML websites, or even office documents can be automated, but you'll have to write appropriate scripts on your own. As far as we know, there are no general-user ready-to-run scripts available for this purpose. Opposed to commercial Content Management Systems like Hyperwave or HTML editors like Microsoft FrontPage, MediaWiki and other Open Source WikiWiki software does not include import filters. There are some exceptions which will be discussed in the following sections.

Converting content from a UseMod Wiki
Prior to MediaWiki (Wikipedia Software Phase III and Phase II), the Wikipedia utilized the UseMod Wiki software written by Clifford Adams. UseModWiki is a Perl script which uses a database of text files to generate a WikiWiki site. Its primary access method is through CGI via the Web, but can be called directly by other Perl programs. To convert an existing UseMod Wiki site, there is a script available in the /maintenance subdirectory of your MediaWiki source folder.

The storage format of UseMod Wiki is well documented: DataBase.

tbd

Converting content from a PHPWiki
If you only have a few pages to convert, and the content isn't sensitive, you might want to try WebForce's online markup converter.

For larger PHPWikis, Isaac Wilcox has written a Perl script to do the conversion. It converts all the commonly used markup (still not 100% of markup, but most PHPWikis will only need minor tweaks after conversion; patches are welcome). It's written for the Mediawiki 1.4.x database schema, though updating it to handle 1.5.x should be fairly easy (again, patches welcome).

The above script works well, but the schema has changed quite a bit since it was written. I found it easier to install the last stable 1.4.x version, import my data, then upgrade mediawiki. The script did an excellent job of preserving almost all of the formatting.

Also see PhpWiki conversion for a solution that uses "sed".

Converting JSPWiki format to MediaWiki format
You can use jspwiki2mediawiki.pl to convert JSPWiki pages to MediaWiki format. The basis for this tool is php2mediawiki by Isaac Wilcox. php2mediawiki provided a convenient basis for this converter and the modifications added to it were introduced to support the conversion of the JSPWiki format.

Converting TracWiki format to MediaWiki format
You can use tracwiki2mediawiki.pl to convert TracWiki pages to MediaWiki format. The basis for this tool is php2mediawiki by Isaac Wilcox. php2mediawiki provided a convenient basis for this converter and the modifications added to it were introduced to support the conversion of the TracWiki format.

Converting MoinMoin format to MediaWiki format
There are various scripts for this, all dodgy. See mw:MoinMoin.

Converting content from a database dump
tbd

Converting content from a CSV text file
tbd

Converting content from HTML text file
If you have only a HTML excerpt or a few pages to convert, you might want to try Diberri's html2wiki converter, which uses HTML::WikiConverter Perl module from CPAN. For larger collection of files one should probably use the module itself.

There are probably other HTML to Wiki markup converters.

See the section below for importing into MediaWiki.

Converting content from a MS-Word document
Try: Word2MediaWikiPlus.

The OpenOffice.org office suite also does a good job of reading MS Word and a usable job of exporting as MediaWiki wikitext.

Converting content from other sources
If you are able and willing to do some scripting by yourself, it is possible to import almost any existing textual content with a documented file format into MediaWiki.

The key to this is to insert rows into the cur table. Specifically, you need to fill the fields cur.cur_title and cur.cur_text. They contain the page titles and the wiki text, respectively. This is enough to start at. However, link tables must still be updated so the "What links here" etc. pages will work.


 * Note: As of version 1.5.0, the text above is incorrect; the database schema for handling revisions has changed significantly. I might be inclined to work upon some conversion scripts in the future, however. Rob Church Talk 12:06, 12 October 2005 (UTC)

As an example there might be the following script of some interest, which imports the public domain data from the CIA World Factbook 2002 into MediaWiki. It has been written by Evan Prodromou (E-Mail: evan(at)wikitravel(dot)org) for his own use on Wikitravel - The free, complete, up-to-date and reliable world-wide travel guide. It is licensed under the GNU General Public License and is available for download.

Please note that it's a one-time script; most paths and stuff are hard-coded, and lots of the code is for parsing the CIA World Factbook print pages, but it might serve as a good example of what can be done.


 * Does anybody know where this script is available? Matthewsim 23:27, 27 Aug 2004 (UTC)
 * found it on Wikitravel site Renmiri 21:57, 16 February 2006 (UTC)

Changing the tagline
A way to change the tagline that appears on top of every page just below the page title (but by default is hidden in Monobook skin except when printing pages) is to modify the MediaWiki:Tagline system message that if undefined defaults to.

Add the following to MediaWiki:Common.css if you want the tagline to display in all skins, or to MediaWiki:Monobook.css if you want to adjust only the Monobook skin:

If you don't like the way it looks (the HTML displaying the text is H3 that displays bold by default in most browsers) add some CSS style declarations to that, eg:

Maintenance scripts

 * See Manual:Maintenance scripts