Manual:Skin configuration

This page contains comprehensive information for administrators on how to configure skins on a wiki. Please refer to skins>Special:MyLanguage/Help:Skins|Help:Skins for general skin information and skinning>Special:MyLanguage/Manual:Skinning|Manual:Skinning for developer information on creating new skins.

Installing skins
The download>Special:MyLanguage/Download|MediaWiki tarball download comes with four skins: vector>Special:MyLanguage/Skin:Vector|Vector (the default skin), monobook>Special:MyLanguage/Skin:MonoBook|MonoBook, modern>Special:MyLanguage/Skin:Modern|Modern and cologne>Special:MyLanguage/Skin:Cologne Blue|Cologne Blue. If you have installed MediaWiki using it, you have the skins already!

If you've downloaded git>Special:MyLanguage/Download from Git|MediaWiki from Git or a nightlies>Special:MyLanguage/Nightlies|nightly version, or if you want to install cat-skins>Special:MyLanguage/:Category:All skins|additional skins, you need to
 * 1) place the skin's files into a subdirectory under   of your MediaWiki installation (you may also place the git repository there)
 * 2) add a   line to your LocalSettings.php file corresponding to the skin:
 * (This is identical to extension installation, only in a different directory.)
 * (This is identical to extension installation, only in a different directory.)

Detailed installation instructions are available on each skin's page here on MediaWiki.org, for example see Skin:Vector. Instructions for all other skins are analogous.

Setting the default skin for a wiki
A default skin should be set for new users of a wiki by setting the variable   in  to the lowercase skin name specified in the skin file. Users can still change their skin by going to their pref>Special:Preferences|preferences page, unless you uninstall or suppress all other skins, or disable the preference altogether (see below). For example: Changing these value on an existing wiki will automatically change the setting of all users who have been using the previous default skin. There is a maint-script>Special:MyLanguage/Manual:Maintenance scripts|maintenance script to change users' preferences (useropt>Special:MyLanguage/Manual:userOptions.php|userOptions.php), but you will most likely not need to use it.

If you do not change this value, Vector will be the default skin.

Uninstalling skins
To uninstall a skin, remove the  line from your LocalSettings.php file. You may remove the skin files from the  directory afterwards.

If any users have been using the skin you just uninstalled, MediaWiki will automatically switch them to the default skin of the wiki.

Suppressing skins without uninstalling
The administrator can limit the skin choices that are offered site-wide in pref>Special:Preferences|user's preferences by listing skin(s) to suppress in the  array. This might be useful if you want to test a new skin without letting users see it. To do this, put something like this in :

You will be able to preview the skin using the useskin URL parameter.

Site-wide CSS modifications
MediaWiki allows administrators to specify site-wide CSS rules to be added to every page rendered. These rules can be added by editing the page common>MediaWiki:Common.css</>|Common.css on your wiki, if  is set to true. In addition to a global stylesheet, one can also specify CSS rules to be used only in certain skins (see stylesheets>Special:MyLanguage/Manual:Interface/Stylesheets</>|Manual:Interface/Stylesheets).

User CSS modifications
Users can also specify their own CSS rules by creating the page "User:Username/common.css". The CSS on this page is then applied to whatever skin the user is using. If the website is changed to a different default skin, the user's custom CSS will continue to work just as before. This feature can be enabled by setting  to true in. A user can also apply CSS to a specific skin by creating the page "User:Username/skinname.css". If a user uses the MonoBook skin for example, they would edit the page Special:MyPage/monobook.css.

Disable site users' ability to choose skins in user preferences
The system administrator can completely remove the "Skin" option so that it does not show up at all in User Preferences. This makes sense if your site will use a customized skin and would not look right in any other skin.

To do it, add a new line containing the following code to LocalSettings.php. It will remove the "Skin" option from preferences and the possibility to use the <tt>useskin</tt> parameter in the URL.