Skip to content

How to add a favicon in WordPress

WordPress calls the favicon a “Site Icon”. Upload one 512×512 px square image and WordPress generates the tab icon, Apple touch icon and Android icon for you.

Steps

  1. Make your icon with the generator above and unzip the package.
  2. Classic themes: go to Appearance → Customize → Site Identity → Site Icon. Block themes: open Appearance → Editor, select the Site Logo block and use its “Use as site icon” option, or go to Settings → General → Site Icon on recent WordPress versions.
  3. Upload android-chrome-512x512.png and click Publish (or Save).
  4. Open your site in a private window to see the new icon; normal tabs may show the cached one for a while.

File to use: android-chrome-512x512.png (exactly 512×512, the size WordPress asks for). Make it with the favicon generator (free, no signup).

Code

Optional: also serve the SVG and .ico (add to your child theme’s functions.php after uploading the files to the site root)

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

Good to know

  • WordPress’s Site Icon must be at least 512×512 px and square. From it, WordPress outputs 32×32 and 192×192 icon links, a 180×180 apple-touch-icon and a 270×270 Windows tile image.
  • WordPress does not create favicon.ico. Upload the favicon.ico from the package to the site root (next to wp-config.php) so bots requesting /favicon.ico get an icon.
  • Favicon plugins are unnecessary on current WordPress unless you want an SVG or dark-mode icon.

Check it worked

Run the favicon checker on your live URL to confirm every icon loads and Google has a usable size. If the old icon keeps showing, see favicon not showing. The full tag-by-tag explanation is in how to add a favicon.

Other platforms: Next.js · Shopify · Squarespace · Wix · React · Webflow · Astro · Django

Questions people ask

What size should a WordPress favicon be?

Upload a square image of at least 512×512 pixels as the Site Icon. WordPress resizes it to 32, 180, 192 and 270 px automatically.

Why isn’t my WordPress favicon showing?

Usually the browser cache, a caching plugin or CDN serving old HTML, or a theme that hard-codes its own favicon link. Clear the caching plugin, test in a private window, and view the page source to check which icon links are actually output.

Can I use an SVG as the WordPress Site Icon?

Not through the Site Icon setting, which accepts raster images. Upload favicon.svg to the site root and add a link tag with a small snippet or a header-code plugin, keeping the PNG Site Icon as the fallback.