Fix Guide

How to Remove the WordPress Emoji Script

February 8, 2026

WordPress automatically loads an emoji script called wp-emoji-release.min.js on every single page of your site. This script was introduced in WordPress 4.2 to ensure that emoji characters would display correctly in older browsers like Internet Explorer 10 and early versions of Android. It works by detecting whether the visitor's browser can render emoji natively. If it cannot, the script replaces emoji characters with images from the WordPress CDN at s.w.org.

The problem is that this script loads on every page, regardless of whether your content actually contains any emojis. For the vast majority of WordPress sites, this is wasted overhead.

Why WordPress Still Loads This Script by Default

WordPress values backward compatibility above almost everything else. Since there are still a small number of users on very old browsers, the core team keeps this feature enabled by default. The script consists of two parts: an inline JavaScript block that runs an emoji rendering test, and the external wp-emoji-release.min.js file that gets loaded if the test determines the browser needs help. On top of that, WordPress adds CSS styles for emoji rendering and a DNS prefetch hint for s.w.org to speed up the CDN connection.

The Real Performance Impact

While the emoji script itself is around 15-20 KB, the total cost is higher than just the file size. Here is what happens on every page load when the emoji script is active:

  • Inline JavaScript execution: The emoji detection test runs in the <head> section, which is render-blocking. The browser must execute this code before it can continue parsing the rest of the page.
  • Extra DNS lookup: The DNS prefetch for s.w.org triggers a DNS resolution that would not otherwise be needed. On mobile connections with high latency, this can cost 50-100ms.
  • Additional HTTP request: If the browser "fails" the emoji test (which is rare on modern devices), the full script file gets downloaded from the CDN.
  • CSS overhead: Extra emoji-related styles get injected into both the frontend and the admin area.

For sites focused on performance and good Core Web Vitals scores, removing this script is one of the easiest wins. It reduces your total blocking time and eliminates unnecessary network requests.

Who Actually Needs the Emoji Script

You should keep the emoji script if your site specifically targets users on very old browsers (IE 10 or earlier, Android 4.3 or below) and your content heavily relies on emoji display. In practice, this applies to almost no one. Every modern browser released since 2015 handles emoji natively through the operating system's font rendering. Even without the WordPress script, emojis will display correctly for over 99% of your visitors.

Remove the Emoji Script via functions.php

The cleanest way to disable the emoji script is to add the following code to your theme's functions.php file, or better yet, to a site-specific plugin. Each line targets a specific part of the emoji system:

/**
 * Disable WordPress emoji scripts and styles
 */
function disable_emojis() {
    // Remove the inline emoji detection script from the frontend head
    remove_action('wp_head', 'print_emoji_detection_script', 7);

    // Remove the emoji detection script from the admin area
    remove_action('admin_print_scripts', 'print_emoji_detection_script');

    // Remove emoji CSS styles from the frontend
    remove_action('wp_print_styles', 'print_emoji_styles');

    // Remove emoji CSS styles from the admin area
    remove_action('admin_print_styles', 'print_emoji_styles');

    // Stop converting emoji in RSS feed content
    remove_filter('the_content_feed', 'wp_staticize_emoji');

    // Stop converting emoji in RSS comment text
    remove_filter('comment_text_rss', 'wp_staticize_emoji');

    // Stop converting emoji in outgoing emails
    remove_filter('wp_mail', 'wp_staticize_emoji_for_email');

    // Remove the DNS prefetch for the emoji CDN
    add_filter('wp_resource_hints', function($urls, $relation_type) {
        if ('dns-prefetch' === $relation_type) {
            $urls = array_filter($urls, function($url) {
                return strpos($url, 'https://s.w.org/images/core/emoji/') === false;
            });
        }
        return $urls;
    }, 10, 2);

    // Prevent the emoji script from loading via the block editor
    add_filter('emoji_svg_url', '__return_false');
}
add_action('init', 'disable_emojis');

Alternative: Use a Plugin

If you prefer not to edit code directly, several lightweight plugins handle this for you. The most popular options are:

  • Disable Emojis (SUSPENDED): Was the go-to solution for years. Very small footprint, does exactly what the code above does. Note that this plugin has been removed from the WordPress plugin directory, but alternatives exist.
  • Autoptimize: A general optimization plugin that includes an option to remove emoji scripts under its "Extra" settings tab. If you already use Autoptimize for CSS/JS optimization, this is a convenient all-in-one approach.
  • Performance plugins: Many caching and performance plugins like WP Rocket, LiteSpeed Cache, and Perfmatters include a toggle to disable the emoji script. Check your existing plugin settings before installing something new.

What Happens to Emoji Display After Removal

Nothing bad happens. Modern browsers use the operating system's built-in emoji font to render emoji characters. On Windows, that is the Segoe UI Emoji font. On macOS and iOS, it is Apple Color Emoji. On Android, it is Noto Color Emoji. These system fonts handle all standard Unicode emoji without any help from WordPress.

The only visual difference you might notice is that emojis will look slightly different depending on the visitor's operating system. An Apple user sees Apple-style emoji, a Windows user sees Microsoft-style emoji, and so on. This is the standard behavior across the entire web and is not something specific to WordPress.

How to Verify the Script Is Gone

After adding the code or activating a plugin, you should confirm the emoji script is no longer loading. Here are three ways to check:

  • View page source: Open your site in a browser, right-click, and select "View Page Source". Search for wp-emoji. If you find no matches, the script has been removed successfully.
  • Browser DevTools: Open the Network tab in your browser's developer tools, reload the page, and filter by "emoji". You should see zero requests related to emoji scripts.
  • InspectWP scan: Run a new InspectWP scan of your site. The WordPress section will report whether the emoji script is still present. If removal was successful, the emoji script indicator will no longer appear in the report.

Check your WordPress site now

InspectWP analyzes your WordPress site for security issues, SEO problems, GDPR compliance, and performance — for free.

Analyze your site free