I want to delete old favicon and replace new favicon in my wordpress website.

Please suggest, which file name and where code that I need to add new favicon.ico in my wordpress website?


Here are the instructions from the WordPress Codex:

  1. Go to your WordPress Administration Panel.
  2. Click on Appearance.
  3. Click on Theme Editor.
  4. Select the file called Header or header.php to edit the file.
  5. Search for the line of code that begins with <link rel="shortcut icon" and ends with /favicon.ico" />. Overwrite it, if it exists, or add the following code below the <head> HTML tag.

    <link rel="shortcut icon" href="<?php 
        echo get_stylesheet_directory_uri(); 
        ?>/favicon.ico" />

Since WordPress 4.3 you can follow the below directions to add a Favicon ( Site Icon ) to your WordPress install:

  1. Log into WordPress Administration Panel.
  2. Using the left-hand navigation, click Appearance -> Customize ( sub-menu item under Appearance ).
  3. On the left-hand side, locate "Site Identity" and click it.
  4. Again, on the left-hand side will be an area called "Site Icon" which will have a button where you can upload your favicon. As the instruction suggest, the icon should be at least 512px in height and preferably a jpg, png, or gif.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.