WordPress Favicon
WordPress has a built-in favicon feature called Site Icon. This guide shows how to use it, exactly what it puts in your page, and when to switch to a code snippet instead — for example to add an SVG favicon.
Step 1 — Create Your WordPress Favicon
Generate a 512×512 PNG favicon from text, your logo, or an emoji. Download instantly, no sign-up needed.
Create Favicon Free →Method 1 — Site Icon (no code)
Site Icon is part of WordPress core (4.3 and later), so it works whatever theme you use.
- 1
Log in to WordPress Admin
Go to your site's /wp-admin dashboard.
- 2
Appearance → Customize
In the left menu click Appearance, then Customize to open the WordPress Customizer.
- 3
Site Identity → Site Icon
Click Site Identity in the left panel, then scroll to find Site Icon at the bottom.
- 4
Upload your image
Click Select Image and upload your PNG favicon (512×512 recommended). WordPress will crop and resize it automatically.
- 5
Publish
Click Publish in the top right. Hard-refresh your browser (Ctrl+Shift+R) to see the new favicon.
Using a block theme? The Customizer is hidden from the menu but still works at /wp-admin/customize.php. You can also select the Site Logo block in the Site Editor and turn on Use as site icon.
What Site Icon adds to your page
WordPress crops your upload, saves four resized copies in the media library and prints these tags in every page's <head> (view source and search for cropped- to see yours):
<link rel="icon" href="/wp-content/uploads/2026/10/cropped-logo-32x32.png" sizes="32x32"> <link rel="icon" href="/wp-content/uploads/2026/10/cropped-logo-192x192.png" sizes="192x192"> <link rel="apple-touch-icon" href="/wp-content/uploads/2026/10/cropped-logo-180x180.png"> <meta name="msapplication-TileImage" content="/wp-content/uploads/2026/10/cropped-logo-270x270.png">
| Covered by Site Icon | Not covered |
|---|---|
Browser tabs (32 px), Google Search and Android shortcuts (192 px), iPhone home screen (180 px), Windows tiles (270 px), and /favicon.ico requests (WordPress redirects them to the 32 px icon). | An SVG favicon with dark-mode colours, a web manifest for installable PWAs, and a separate apple-touch-icon with a solid background when your upload is transparent. |
For most blogs and business sites that is everything you need. Only move to Method 2 if you want something from the right-hand column.
Why Google shows the WordPress "W" logo
Since WordPress 5.4, a request for /favicon.ico on a site with no favicon.ico file is handled by WordPress itself. With a Site Icon set, it redirects to your icon. With no Site Icon, it serves the blue WordPress "W" — which Google then shows next to your search results.
The fix is simply to set a Site Icon. Then open yoursite.com/favicon.ico in a private window to confirm it shows your icon, and request indexing of the homepage in Search Console. Google updates the result icon on its own schedule, usually within a few weeks — the Google Search favicon guide covers what else it checks.
Method 2 — wp_head snippet (code)
Use this when you want files Site Icon cannot produce: an SVG favicon, a web manifest, or your own set from the generator.
Add this to your theme's functions.php or a site-specific plugin:
add_action( 'wp_head', function() {
echo '<link rel="icon" type="image/svg+xml" href="/favicon.svg">';
echo '<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">';
echo '<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">';
echo '<link rel="manifest" href="/site.webmanifest">';
} );Place your favicon files in the WordPress root directory (same folder as wp-config.php). Don't edit a parent theme's functions.php directly — the next theme update overwrites it. Use a child theme or a site-specific plugin. If the Site Icon is also set in the Customizer, WordPress prints its own icon tags too, so clear it to avoid two competing sets.
Method 3 — Header snippet plugin (no theme edits)
A plugin such as WPCode (formerly Insert Headers and Footers) lets you paste the same link tags into a Header box from the dashboard. Upload the favicon files to the site root first, paste the tags, save, and clear the Site Icon so WordPress does not print a second set.
The tags survive theme switches and updates because they are stored by the plugin, not the theme.
WordPress Favicon Not Showing?
- •Browser cache: Hard-refresh with Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac). Or test in an incognito/private window.
- •Caching plugin: Purge your caching plugin (WP Rocket, W3 Total Cache, LiteSpeed, etc.) after making the change.
- •CDN cache: Cloudflare or your host's CDN can keep serving the old icon after the plugin cache is cleared. Purge in order: plugin cache, then CDN, then hard-refresh the browser. Opening the icon URL directly shows which layer is still stale.
- •Wrong file path: Open your browser DevTools → Network → filter for "favicon". Check the exact URL being requested and verify the file exists there.
- •Theme override: Search your active theme files for an existing <link rel="icon"> tag that might be overriding your settings.
Common mistakes
- Running Site Icon and a snippet at the same time. Two sets of icon tags with different files means each browser picks a different one. Use one method.
- Uploading the full logo with the site name. At 32 px the text is a smudge. Use the symbol or an initial — the text favicon guide shows how to make one that stays readable.
- A transparent PNG as the iPhone icon. Site Icon reuses your upload for the apple-touch-icon, and iOS fills transparency with black. Give the image a solid background.
- Editing the parent theme's functions.php. The next theme update deletes your snippet. Use a child theme or a plugin.