Skip to content
UFO Performance Marketing

Where intelligence is put to the test.

HomeServicesCase StudiesBlogAboutContact Us
Menu
HomeServicesCase StudiesBlogAboutContact Us
WordPress · Oct 16, 2014

Add a Favicon to your WordPress Blog

Add a Favicon to your WordPress Blog
JC
John Crenshaw
Oct 16, 2014

One of the little personalization details I like to add to any site I work on is a Favicon, that little icon you see next to the address bar in your browser. Even though it's one of the simplest changes you can make, many sites leave out this small detail for whatever reason. Well, in this article I'm going to show you how to add a Favicon to your WordPress-powered site.

Example of a WordPress Favicon
WordPress Favicon Example

First create the image

First of all, a favicon is really nothing more than a tiny png image with a .ico extension and sized to 16 pixels by 16 pixels (they can also be 32 by 32). So, the first thing you need to do is to create the image that you want to use; whatever you use, don't make it too complex because small detail tend to get lost when resized to a tiny 16 by 16 pixels.

For example, on this site I used the little WordPress Hacker cartoon that sneakily peaks at you over the top of every page. I originally started to use the entire cartoon, hands and all, but that amount of detail turned out to be too much and you couldn't quite tell what it was when resized to 16 by 16. So, I got rid of the hands and cropped the image to only include the top of the Hacker's head with his trademark blonde mohawk.

If you want to draw your own favicon, Favicon.cc has a cool tool that lets you draw your own icon while the Favicon in the browser updates in real time to reflect your changes. It'll even let you create animated favicons frame by frame. If you use this tool you can skip the next step as the tool will handle the conversion to .ico as well.

Next, convert your favicon to .ico format

Modern web browsers will generally let you get away with using a gif, png, or even a jpeg for your favicon, but to be compatible with older version of internet explorer, you'll have to convert the image to .ico format.

In order to do that, you can also use the Favicon.cc website, only this time, click the "Import Image" button on the left side of the page and upload your image. The tool will convert your image to .ico format and let you download the final product.

Finally, add the favicon to your site

By default, most browsers will look for a favicon in your site's root directory named favicon.ico. If you don't have any problem with that, just upload the file to your site's root directory, make sure it's named favicon.ico, and you should be all set. Keep in mind, this file is cached by your browser, so you may not see it until you clear your cache…incidentally, I've also had issues with the favicon showing up even after clearing my cache, but that problem usually resolves itself within a few hours. If the icon isn't recognized by default, you can follow the next step to be sure it gets picked up.

Now, what if you're like me and want to keep your favicon with your WordPress theme files, or maybe your favicon isn't being detected by your browser for some reason? In these cases, we need to tell the world where our favicon is. To do this you need to open up your theme file containing the site's <head></head> section…in my case that's header.php.

Then, assuming you save your favicon.ico file in your theme directory, add the following anywhere between the <head></head> tags.

1
<link rel="shortcut icon" href="<?php bloginfo('template_url'); ?>/favicon.ico" />

If you save your favicon.ico somewhere else, you'll have to adjust the href attribute appropriately.

Make sure you clear your browser's cache after making the change.

Final words of advice

If you save your favicon in a location other than your site's root directory, you'll have to add the above link to the short icon file inside the <head></head> tags of every page on the site. For most WordPress installs, this isn't a problem since there is usually one header.php file containing the <head></head> tags that gets called on every page. Just keep that in mind, however, if you've got a different setup.

Also, along those same lines, you probably won't see the favicon when you log into the WordPress admin because the admin uses a different header that your theme, so you either have to also add the link to your favicon to the admin head section or just put the favicon in your site's root directory.

Personally, I like to save the favicon with my theme files and just copy it to the site's root directory as well. This allows me to maintain the portability of my theme and I can easily move it to another server if need be without the risk of leaving my trusty favicon behind. Then, on the new server I'd just copy the favicon to the new site root. That also prevents the need to edit the core header files.

WordPress

Get the latest from UFO

Keep reading

More from the blog

All Posts →
ExpressionEngine vs. WordPress - Final Thoughts
WordPress

ExpressionEngine vs. WordPress - Final Thoughts

What I like about ExpressionEngine when compared to WordPress and my final thoughts on the commercial CMS from EllisLab.

John Crenshaw · Oct 13, 2018
Wordpress $post Object Quick Reference
WordPress

Wordpress $post Object Quick Reference

This quick reference / cheatsheet is for the WordPress $post object. This object contains a bunch of info specific to each WordPress post. Scroll down for the complete table of object properties.

John Crenshaw · May 15, 2015
Remove "Briefly Unavailable for Scheduled Maintenance" Message
WordPress

Remove "Briefly Unavailable for Scheduled Maintenance" Message

If you've been keeping on top of your WordPress updates using the automatic upgrade feature, you may have run into a problem immediately after upgrading.

John Crenshaw · Dec 10, 2014

Want results like these?

Let's talk about where you are, where you want to go, and the smartest way to get there.

Contact Us
UFO

Where intelligence is put to the test.

  • Home
  • Services
  • Case Studies
  • About
  • Partners
  • Testimonials
  • Projects
  • Blog
  • Careers
  • Contact Us

Offices

  • Cincinnati, OH
  • Columbus, OH
  • Portland, OR
  • (513) 549-7355
Contact Us
Google 5.0 five star rating Google Ads Premier Partner 2026
© Copyright 2026 UFO Marketing. All rights reserved. Privacy Policy | Terms of Use