How to Disable Emojis in WordPress
Reading Time: 2 min, 21 sec
WordPress comes with built-in support for emojis. This feature was added back in version 4.2 to make sure emojis work well even in older browsers. While it sounds useful, many website owners do not really need emojis loading on every page.
The problem is that WordPress adds extra scripts and styles just for emojis. These files load on the front-end as well as in the admin area. If you are not using emojis, this simply increases the number of HTTP requests and slightly affects your website’s performance.
Best WordPress Hosting
Bluehost is one of the best and secure WordPress hosting providerThe good news is that you can easily disable emojis in WordPress. In this detailed article, I will show you how to disable Emojis in WordPress.
Why Disable Emojis in WordPress?
Here are some common reasons why website owners prefer to disable emojis:
- Performance: Disabling unnecessary scripts reduces page load time.
- Cleaner code: It prevents extra JavaScript and CSS from being added to your pages.
- Less clutter: You will not see the emoji option in the TinyMCE editor.
If you are not using emojis in your content, there is no need to keep this feature enabled.
Method 1: Disable Emojis Using a Plugin
The easiest way is to use a plugin. There are lightweight plugins like Disable Emojis (GDPR friendly) that remove all the extra emoji code from WordPress.
- Go to Plugins > Add New in your WordPress dashboard.
- Search for Disable Emojis (GDPR friendly).
- Install and activate it.
That’s it. The plugin will take care of everything. No configuration is needed.
Method 2: Disable Emojis with Code
If you do not want to use a plugin, you can disable emojis by adding code to your theme’s functions.php file or in a site-specific plugin.
Here is the code you need to add:
function twg_disable_emojis() {
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('admin_print_scripts', 'print_emoji_detection_script');
remove_action('wp_print_styles', 'print_emoji_styles');
remove_action('admin_print_styles', 'print_emoji_styles');
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');
// Disable TinyMCE emojis
add_filter('tiny_mce_plugins', function($plugins) {
return is_array($plugins) ? array_diff($plugins, ['wpemoji']) : [];
});
}
add_action('init', 'twg_disable_emojis');
This snippet removes all emoji-related scripts, styles, and filters. It also disables the emoji button in the TinyMCE editor.
Method 3: Disable Emojis with a Performance Plugin
Some performance optimization plugins like Perfmatters and WP Rocket also have an option to disable emojis. If you are already using one of these plugins, you can simply enable that setting instead of adding extra code.
Conclusion
Emojis are fun, but most websites do not need them. By disabling emojis in WordPress, you reduce unnecessary scripts, improve performance, and keep your code clean. You can either use a plugin or add a simple code snippet depending on what you prefer.
If you are focused on speed optimization, this is a small but effective tweak you should definitely consider.