• About Me
  • Best Of
  • Contact Me
  • Forum

Jay Gaulard

  • Home & Living
    • Automotive & Mechanical
    • Carpentry & Building
    • Entertainment
    • Firewood & Heating
    • Gardening
    • Home Improvement
    • Lawn Care & Landscaping
    • Pets & Animals
  • Fitness & Recreation
    • Brazilian Jiu-Jitsu (BJJ)
    • Bushcraft & Camping
    • Hiking & Walking
  • Nature & Outdoors
    • Trees & Shrubs
    • Weather & Seasons
  • Technology & Internet
  • Travel & Destinations
  • Writing & Blogging
    • Ramblings & Opinion
You are here: Home / Technology & Internet / Changing the Logo – MediaWiki – Version 1.10.0

Changing the Logo – MediaWiki – Version 1.10.0

June 2, 2007

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.

Related posts:

  1. Wiki Installation – MediaWiki – Version 1.10.0
  2. Creating Short URLs – MediaWiki – Version 1.10.0
  3. How To Make A Favicon
  4. Sudden Drop In Google Ranking
  5. How to Set Up a Custom 404 File Not Found Page

Filed Under: Technology & Internet

What’s Next? Email Updates!

If you enjoyed reading this post as much as I enjoyed writing it, why not sign up to receive my posts by email? It's free and you can unsubscribe at any time!

Comments

  1. Timothy Collins says

    January 8, 2017 at 5:25 pm

    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.

    Reply
  2. Alfred Mutanga says

    January 8, 2017 at 5:25 pm

    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

    Reply
  3. Daran Joshi says

    January 8, 2017 at 5:25 pm

    Marvelous 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.

    Reply
  4. Tom L. says

    January 8, 2017 at 5:25 pm

    Great tip about the

    ### ADDED TO CHANGE WIKI LOGO ###

    line – thanks for the help!

    Reply
  5. Mandi says

    January 8, 2017 at 5:26 pm

    Thank you so much! I have spent about 2 hours trying to figure this one out…

    Reply
  6. Claire says

    January 8, 2017 at 5:26 pm

    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.

    Reply
  7. Jay G. says

    January 8, 2017 at 5:26 pm

    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.

    Reply
  8. WhiteCave says

    January 8, 2017 at 5:27 pm

    Brilliant tip! Been trying every which way to get the logo to show, and … (talk about madness, trying the same thing over again to try to get a different outcome!) But your tip worked! Thank you so much!

    Reply
  9. Klick says

    January 8, 2017 at 5:27 pm

    Howdy! This is my first comment here so I just wanted to give a quick shout out and tell you I truly enjoy reading your articles. Can you recommend any other blogs/websites/forums that go over the same topics? Thanks a lot!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

CONNECT WITH ME

  • Email
  • Facebook
  • Google+
  • RSS
  • Twitter

RECEIVE MY POSTS BY EMAIL!

Interested in receiving my posts by email? This is your chance! Simply place your email address in the box below and I'll deliver each and every post I write directly to your inbox.

Copyright © 2021 · Jay Gaulard My Personal Blog Blog · About · Best Of · Contact · Privacy / Terms · Sitemap