What is a MediaWiki skin?
MediaWiki is the free tool that powers wiki sites, which are websites anyone can edit. A skin is the look of the site: the colors, the menu position and the page layout. It is like a cover on a book. The words inside stay the same.
Do not mix this up with a "template". In MediaWiki, a template is a reusable block of text inside a page. It is not about looks. The look is the skin.
Before you start
You need to be able to edit files. Use File Manager in your hosting control panel. Back up LocalSettings.php first. A typing mistake in that file can take the wiki offline.
Steps: pick a skin as the default
- Log in to your hosting control panel and open File Manager.
- Open the folder where MediaWiki is installed.
- Right-click
LocalSettings.phpand choose Copy. Save the copy asLocalSettings.php.bak. - Right-click
LocalSettings.phpand choose Edit. - Find the line that starts with
$wgDefaultSkin. - Change the name in the quotes, for example:
$wgDefaultSkin = "vector";
This makes the Vector skin the default for all visitors. Other common names are monobook and timeless, if they are installed.
- Click Save Changes and refresh your wiki.
Steps: add a new skin
- Download the skin from the official MediaWiki website. Make sure it fits your MediaWiki version.
- Upload the ZIP into the
skinsfolder with File Manager. - Right-click the ZIP and choose Extract.
- Open
LocalSettings.phpto edit it. - Add a line to load the skin. Use the skin's own name:
wfLoadSkin( 'Timeless' );
This tells MediaWiki to load the Timeless skin. Older MediaWiki versions use a require_once line. The skin's page tells you which one to use.
- Save the file.
Let users choose their own skin
- Log in to your wiki.
- Click Preferences at the top.
- Open the Appearance tab.
- Pick a skin and click Save.
wfLoadSkin line first. Then delete its folder.Quick recap
- A skin is the look of a MediaWiki site.
- Set the default with
$wgDefaultSkininLocalSettings.php. - Add new skins in the
skinsfolder and load them withwfLoadSkin. - Back up
LocalSettings.phpbefore you edit it.