
How to Disable Emojis in WordPress
Every WordPress site loads a bit of emoji code on every page: an inline settings script, a loader, the wp-emoji-release.min.js file and some CSS. It exists so emoji show up on old browsers that can’t draw them. Every modern browser can, so on most sites it’s just extra work for the page.
I first ran into this back in 2015, when a client’s site started crashing in iOS Safari right after WordPress 4.2 added emoji support. The emoji script was scanning a huge page and running the phone out of memory. Browsers have come a long way since then, but the script still loads by default.
In this post, I’ll show you how to turn it off with a plugin or a snippet, updated for how WordPress loads emoji today. Let’s get into it.
The Quick Answer: Use a Plugin
If you don’t want to touch code, install Disable Emojis (GDPR friendly). Activate it and you’re done. There are no settings. It’s actively maintained (version 1.9.3, updated in 2026) and has 60,000+ active installs.
Many performance plugins, like Perfmatters, also have a “disable emojis” toggle, so check yours first if you already use one.
The Code: Disable Emojis Without a Plugin
Since you’re likely here for the code, here’s the full snippet. Add it to your child theme’s functions.php, a code snippets plugin, or a file in wp-content/mu-plugins/:
/**
* Disable WordPress emoji scripts and styles (front end, admin, embeds, feeds and emails).
*/
add_action( 'init', function () {
// Front end
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_enqueue_scripts', 'wp_enqueue_emoji_styles' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
// Admin
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'admin_enqueue_scripts', 'wp_enqueue_emoji_styles' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
// Embeds (when your posts are embedded on other sites)
remove_action( 'embed_head', 'print_emoji_detection_script' );
remove_action( 'enqueue_embed_scripts', 'wp_enqueue_emoji_styles' );
// Feeds and emails: leave emoji as plain characters instead of images
remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
// Classic editor (TinyMCE) emoji plugin
add_filter( 'tiny_mce_plugins', function ( $plugins ) {
return is_array( $plugins ) ? array_diff( $plugins, array( 'wpemoji' ) ) : array();
} );
} );
I tested this on a fresh WordPress 7.1.5 site with debug mode on:
- Without the snippet, the homepage loads four emoji pieces:
wp-emoji-settings,wp-emoji-loader,wp-emoji-releaseand thewp-emoji-stylesCSS. - With the snippet, there are zero emoji references in the page and no PHP notices.
Why the Old Snippets Need Updating
Most emoji snippets you’ll find online (including the one I posted here in 2015) were written for WordPress 4.2. Two things changed since then.
The styles moved in WordPress 6.4
WordPress 6.4 replaced print_emoji_styles with wp_enqueue_emoji_styles. The old function is deprecated but still hooked for backwards compatibility, so you have to remove both.
One thing worth knowing: if you only remove the new wp_enqueue_emoji_styles, WordPress falls back to the old function. I tried exactly that, and the emoji CSS still printed, along with a “print_emoji_styles is deprecated” notice. Removing both hooks, like the snippet above, avoids that.
Embeds load emoji too
When someone embeds one of your posts on their site, WordPress loads the emoji script in that embed through separate embed_head and enqueue_embed_scripts hooks. Older snippets miss these.
Some guides also add a filter to remove a DNS prefetch for s.w.org. You don’t need that anymore. Current WordPress doesn’t add an emoji prefetch, so there’s nothing to remove.
Will This Break Emoji on My Site?
No. Emoji you type in posts and comments still show up, because every modern browser and phone draws emoji natively. The only difference is they’re drawn by the visitor’s device instead of being swapped for WordPress’s image versions.
The feed and email filters in the snippet also keep emoji as plain characters in your RSS feed and site emails, instead of converting them to image tags.
How to Check It Worked
- Open your site in a private window (so a logged-in admin bar doesn’t get in the way).
- View the page source and search for
emoji. - If you only find emoji you typed in your content, you’re all set. If you still see
wp-emoji-releaseorwp-emoji-styles, clear your caching plugin and CDN cache, then check again.
If you work on WordPress sites a lot, I share more snippets like this on SmartWP.
Slap a sticker on this post
Comments
Loading comments…