Skip to main content
Faviqo

Favicon for WordPress

How to add a favicon to WordPress

WordPress has a built-in Site Icon that covers the basics. If you also want a proper Apple Touch icon, an SVG favicon and a web manifest, add the full kit as well. Generate the files below, then follow the steps.

Generate my WordPress icon kit →Free · no upload · one ZIP

Add the favicon in WordPress

Upload files to
your site root via your host's File Manager or FTP
Add code to
a header-code plugin (e.g. WPCode) or your theme's header
  1. Quick route: Appearance → Customize → Site Identity → Site Icon, and upload android-chrome-512x512.png. Done.
  2. Full kit: upload every file to the site root (the folder that holds wp-config.php).
  3. Paste the snippet into the <head> with a header-code plugin, then remove the Site Icon so the tags aren't duplicated.

a header-code plugin (e.g. WPCode) or your theme's header

<link rel="icon" href="/favicon.ico" sizes="32x32">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="icon" type="image/png" sizes="48x48" href="/favicon-48x48.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
<link rel="manifest" href="/site.webmanifest">
<meta name="theme-color" content="#FFFFFF">

The file names match what the generator produces. Your theme colour and name are filled in when you generate your own kit.

How WordPress handles site icons

When you save a Site Icon, WordPress stores the original in the media library and generates its own sizes from it. It prints the icon tags into the <head> of every page, including a 32 and a 192 pixel icon, an Apple Touch icon and a Windows tile image. That is why one upload is often enough, and also why a second plugin that prints icons produces duplicates.

The Site Icon setting lives in Appearance → Customize → Site Identity on classic themes. Recent versions also show it in Settings → General, which is where to look on block themes that have no Customize screen. Requests for /favicon.ico are answered with your Site Icon when no real file exists in the web root, but a physical favicon.ico in the root wins, so delete a stale one left by an old theme or host.

WordPress only supports PNG and similar raster formats in the Site Icon field, so it will not serve an SVG favicon by itself. If you want the vector version, add it from your theme with the snippet below. Use a child theme or a small must-use plugin so a theme update does not remove it.

functions.php (child theme)

add_action( 'wp_head', function () {
  $svg = get_stylesheet_directory_uri() . '/favicon.svg';
  echo '<link rel="icon" href="' . esc_url( $svg ) . '" type="image/svg+xml">' . "\n";
}, 5 );

Upload favicon.svg to your child theme folder. This adds the SVG next to the PNG tags WordPress already prints.

Check it worked

  1. Open your site, choose View page source and search for rel="icon". You should see the Site Icon tags once, not twice.
  2. Open /favicon.ico in a new tab. If it shows an old image, a physical file in the web root is overriding your Site Icon.
  3. Purge your caching plugin, then your CDN, then test in a private window.

Why your WordPress favicon may not show

  • Site Icon must be square and at least 512 × 512. A smaller or non-square image is rejected or cropped.
  • If your theme or an SEO plugin already prints favicon tags, you end up with two sets. Remove the Site Icon, or the plugin's icon, once you add the full kit by hand.
  • A new favicon can take a while to show. Hard-refresh, then clear your caching plugin and CDN cache. Browsers also cache favicons separately from pages.
  • Block themes may not have the Customize screen. Look for Site Icon in Settings → General or in the Site Editor.

Already published? Run your site through the favicon checker to see exactly what is wrong, or see every favicon size for what each file is for.

WordPress favicon FAQ

Where do I set the favicon in WordPress?

Go to Appearance → Customize → Site Identity → Site Icon, upload a square image of at least 512 × 512 and save. WordPress prints the icon tags for you.

What size should a WordPress favicon be?

Square and at least 512 × 512 pixels. WordPress scales it down for browser tabs, Apple devices and Android.

Why is my WordPress favicon not changing?

Almost always cache. Clear your caching plugin and CDN, hard-refresh the page, and test in a private window. Google Search can take days or weeks to pick up a new icon.

Skip the resizing.

Drop in one logo and get every size, the manifest and the HTML for WordPress.

Open the favicon generator →