paul's picture

Recently I needed to change the look of an in-house Mediawiki site to look more like the theme of the rest of the local intranet. The instructions on the mediawiki site were not that clear. But in the end I discovered that it is quite easy to do:

Mediawiki allows you to change the css settings using the wiki. They strongly recommend that you do not change the css files themselves as they will be overwritten during an upgrade. Instead you need to modify the css using special wiki pages:

  • Mediawiki:Common.css: Changes on this page will be applied to all skins.
  • Mediawiki:Monobook.css: Change the style for the monobook skin (which is the default skin). For another skin, use the skin name.
  • User:username/monobook.css: Change the monobook css style only for user - username. This requires that you turn on user stylesheet (see mediawiki.org for details

All you have to do is add the required css entries.

I did discovered one problem. The wiki site is a restricted site - Only login users can access the pages. You need to add Mediawiki:Common.css and/or Mediawiki:Monobook.css to the whitelist in the LocalSettings.php file or else your change will not show when you are not login