Chapter 13. Changing Appearances

MediaWiki’s default look and feel is familiar to any Wikipedia visitor. All the same, you might want to change it for various reasons: reflecting the theme of the wiki, matching your corporate branding, or simple personal preference. Fortunately, the look is highly configurable, although the means for changing it is spread across cascading stylesheets, configuration settings, system messages, and more. This chapter will guide you through the maze of changing your wiki’s appearance. (Read Chapter 11 first to learn about configuration in general.) For CSS changes, it’s assumed that you’re using the default MonoBook skin or another skin derived from it.


After any CSS change, force-refresh your browser to clear its cache and pick up your changes.

If an article does not change as expected, try purging the page from MediaWiki’s cache by appending the query parameter action=purge onto the URL. (This should rarely be needed, however.)

The Basics

Let’s start by configuring your wiki name, logo, and home page.

Wiki Name

The name of your wiki is stored in the configuration setting $wgSitename, in the file LocalSettings.php:

$wgSitename = 'BongoWiki';

This name is also available within wikitext as the variable SITENAME:

Welcome to {{SITENAME}}!

Logos and Icons

The graphical logo on every page is determined by the configuration setting $wgLogo in LocalSettings.php. Any 135×135 pixel image will do, ideally with a transparent background. You can point to a URL:

$wgLogo ...

Get MediaWiki now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.