WordPress Emojis

Do you want to disable emojis to speed up your WordPress Website? There are so many ways to improve the page speed of your WordPress site. One easy way to disable or remove emojis from loading.

Starting with version 4.2, WordPress included emoji icon support. And it makes an extra HTTP request to the server and makes the site load slower. Although, emojis file not more than 10 kb but it loads every page. As a result, we got a lot of extra code in the header of the site. In 90% of cases, site administrators do not use the emojis. So I’ll show you how to disable emoji WordPress using several methods.

There are many ways to disable the emojis from WordPress site. But today we will show you two ways to remove the code.

Use Plugins to Disable the Emojis

Many plugins are available in WordPress repository to disable the emojis. But the popular plugin to remove the only emojis is Disable Emojis (GDPR friendly) by Ryan Hellyer. This plugin has more than 80,000+ active installations. It is super light and only perform one action. So it won’t take extra space like other plugin.

You can found this plugin in the WordPress plugin library or you can search from the admin panel Add New plugin option. You can follow our guide to install the WordPress plugin.

After installation, the plugin starts to work automatically and does not require settings, what it does:

  • Cleans the head from emoji
  • Removes from the TinyMCE editor
  • Disconnect from CDN DNS prefetch

Other Plugins to Remove the Emojis

There are some other plugins also perform this action. Many cache plugins remove the emojis to speed up WordPress site.

These two cache plugin also disable the emojis from the header and make the WordPress site faster. Among them, our website uses the WP Fastest Cache.

Fastest Cahce to remove emojis

Use Code to Disable WordPress Emojis

If you don’t want to install an extra plugin from this task then insert the below code into your theme’s functions.php.

/**
 * Remove Emojis
 */
function plug_disable_emoji() {
  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' );
  add_filter( 'tiny_mce_plugins', 'plug_disable_tinymce_emoji' );
}
add_action( 'init', 'plug_disable_emoji', 1 );
 
/**
 * Clear tinymce
 */
function plug_disable_tinymce_emoji( $plugins ) {
  return array_diff( $plugins, array( 'wpemoji' ) );
}

You can use FTP or File manager or admin panel to insert the code. Just insert the above code below functions.php file and update the file.

I hope this article helped you to disable the Emojis in WordPress. If you like the article then stay with us for more updates regularly.

Leave a Reply