Changing the Logo - MediaWiki - Version 1.10.0
June 2, 2007 – 5:05 pm | by gaulardcom
|
|
After I got the MediaWiki software all installed on the DotWiki.US domain and looking semi-like Wikipedia, my first task was to change the logo in the upper left hand corner.
I didn’t think this was going to be much of a challenge for a seasoned web developer, such as myself. Well, I must say that it took a little time to figure out the system.
Ok, here it is…after you install the Wiki, a file called “LocalSettings.php” is created on the server. You need to download that to your local computer in the proper directory (in this case, the “wiki” directory). You will want to do that to work on it, as well as for backup. MediaWiki has a good line on its configuration page…
This (page) is an index of all supported configuration options based on the DefaultSettings.php file. Never edit DefaultSettings.php; copy appropriate lines to LocalSettings.php instead and amend them as appropriate.
The reason you don’t want to edit DefaultSettings.php is because you will write over all your edits when you upgrade the software. Also, it would be quite amateur to edit such a file when there is another one created just for that purpose that won’t be overwritten. Any variable that you copy and modify from DefaultSettings.php and paste into LocalSettings.php will be given preference in LocalSettings.php, so don’t worry about leaving the variable hanging out there in DefaultSettings.php. Just copy it and ignore it.
So, back to how to change the logo. Well, the MediaWiki instructions say this…
The logo that appears in the top left of each page is determined by the $wgLogo configuration setting in the LocalSettings.php file. To change this you simply need to change the value of $wgLogo to point to the URL of your own logo image. You can upload a file via the wiki and use that address (which allows it to be replaced easily, so you may want to protect the page if you use this method) or use an image uploaded to your server via other means. Caution: It is possible to simply overwrite the default logo installed with MediaWiki, but this is strongly advised against, as an upgrade may end up overwriting it or change the default location of this file. Tip: The logo image should be 135 pixels square.
Here is the first problem for the few of us who may have a hangover from the night before…there is no $wgLogo variable yet in the LocalSettings.php file. You need to go into DefaultSettings.php and find that variable. Then, copy the whole line into a commented area of LocalSettings.php. Also, what exactly are you supposed to change? I knew I was supposed to upload a new image, but where and was I supposed to create a new path? I fiddled with it for a while and came up with this…
### ADDED TO CHANGE WIKI LOGO ###
$wgLogo = "http://www.dotwiki.us/wiki/wiki_logo.png";
### ADDED TO CHANGE WIKI LOGO ###
PS - I changed the actual logo directory above from the real directory.
That’s all there is to it. You need to take out some of the other stuff in the original line and modify it like above. I like to comment to hell out of things like this to keep them very visible.

7 Responses to “Changing the Logo - MediaWiki - Version 1.10.0”
By Timothy Collins on Jul 23, 2007 | Reply
Hi
Thanks for the suggestion,I had searched the net over several days to find a method for changing the logo of my mediawiki site.Yours was the only one which gave me a succinct method of changing the logo.I think you should write down your method in the mediawiki website.
P.S:The logo can be of smaller size also,it works,the only issue is when the size is increased.
Thanks again for a wonderful tip.
By Alfred Mutanga on Sep 23, 2007 | Reply
Thank for the solution…..
I have not yet publishe my wiki site but to tell the truth I struggled until I googled and reach to your technical and perfect solution.
I agree with the other user that you should publish it on the Mediawiki site.
Thank you, once again
By Daran Joshi on Dec 27, 2007 | Reply
marvellous thanks very much. The instructions for this that come with media wiki are just awful. You saved a lot of fiddling around although I had already put a couple of hours in.
By Tom L on Jun 21, 2008 | Reply
Great tip about the
### ADDED TO CHANGE WIKI LOGO ###
line - thanks for the help!
By Mandi on Jun 28, 2008 | Reply
Thank you so much! I have spent about 2 hours trying to figure this one out…
By Claire on Aug 27, 2008 | Reply
Thank you so much!! This was the best help tip on the topic out there. I was pulling my hair our for two hours. I am still wondering why MediaWiki documentation is so unclear on this.
By jaygaulardcom on Aug 27, 2008 | Reply
It’s because the MediaWiki documentation sucks. For all the talent they have as programmers, you think they would get just one person who can write for the general public.