A Guide to Customising MediaWiki in a hosted environment
This article is part of a series compiled as a guide to encourage and assist those building a MediaWiki-based website in a hosted environment.
Each article links to relevant documentation from the MediaWiki.org website and the Wikimedia.org website. Where the official documentation does not adequately cover the issues for a hosted site, or is too 'advanced', additional information, explanation and advice is provided.
Customising the Interface
- Navigation - The Sidebar
- The page MediaWiki:Sidebar defines the navigation bar. The position of the Sidebar depends on the Skin used. The Manual shows how to set up items and links to target pages in a menu.
- Copyright and other reference pages
- The Manual:Page customizations lists the pages which are not in MediaWiki when it is installed, but are linked from the interface. These include:-
HTML and CSS
MediaWiki supports most html tags. One exception is the html link tag. To use this you would need to enable 'raw html' in LocalSettings.php. This is generally discouraged for public sites, as explained in the Manual:$wgRawHtml. Skins like Foreground, used on this Site, require the html link tag for links on buttons. Otherwise, normal wiki links work well.
MediaWiki skins use cascading style sheets (CSS) and you can add your own styles to the page MediaWiki:Common.css.
The resource Help:Cascading style sheets from Wikimedia.org has more information for users of MediaWiki.
For a guide to customising the background colours for a Vector skin, a demonstration site has been created as part of this site to provide a visual guide on how to make the required changes to CSS in MediaWiki:Common.css. The process illustrated in this multi-page guide can be applied to other skins.
The information or advice provided in this Guide is based on, or links to, official documentation for MediaWiki and was accurate when this article was created. However, some variation may occur between versions of MediaWiki; and the specifics of web hosting varies by service provider. Consequently, you should always create an effective backup before making any changes; ensure that you can restore your database and website; read the Release Notes before upgrading; and apply best practices to the management of your website. Any action that you take based on information provided here is at your own risk and the author accepts no liability for any loss or damage.