How To Disable Emojis In WordPress

Spread the love

Yes, I know emojis look cool but it’s actually bad for your WordPress website in terms of performance. It’s best to turn off those cute emojis in order to speed up your website. Emojis are those small icons that are used to express emotions or ideas as we see on popular social media websites like Facebook, Twitter, Instagram, and Tiktok. If you have a hobby website and don’t care about the speed, you can keep the emojis on but if you have a business website then it’s essential to turn off emojis as that will help you to increase your website speed and sales.

Disable Emojis In WordPress

So, there are two ways to accomplish this, one with the plugin and one without the plugin (don’t be afraid as it usually involves some easy coding).

1. Disable emojis with a plugin

This is the easy way to do it by installing a plugin called Disable Emojis (It’s GDPR Friendly Plugin). It’s a FREE plugin and got over 70k+ active installs at the time of writing this article. The plugin is developed by Ryan Hellyer. The plugin is soo popular that it does not have any bad reviews (there is only one one-star review).

It’s a super lightweight plugin at only 8.5kb approx. Once you install the plugin, it will remove the javascript file that is used to load these emojis on your website but some browsers have in-built support for emojis and those will still work but it won’t affect your website speed.

Now that you know how to disable emojis with a plugin. It’s best to know how to do with code as using a plugin just increases the number of plugins in the plugins tab (considering this is just to remove emojis) and if you are like me who is very picky about the numbers on the plugins tab and want to keep it low then yes you need to code these small things.

2. Disable emojis with code

This is the best way to do it by inserting a small code into the functions.php file. The code below is not mine, I got it from here and I can assure you that I have tested it and it’s working fine at the time of writing this article. Credit goes to netmagik on gist for this code.

 * Disable the emoji’s
function 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’ );
	// Remove from TinyMCE
	add_filter( ‘tiny_mce_plugins’, ‘disable_emojis_tinymce’ );
add_action( ‘init’, ‘disable_emojis’ );

 * Filter out the tinymce emoji plugin.
function disable_emojis_tinymce( $plugins ) {
	if ( is_array( $plugins ) ) {
		return array_diff( $plugins, array( ‘wpemoji’ ) );
	} else {
		return array();

Now, there are three ways to insert it into that file.

  • Going into your server backend file manager.
  • Installing a file manager plugin.
  • Using a functions inserter plugin.

If you have a VPS and can’t access the file manager of your server then you can use something like FileZilla to connect to your server. Once connected, go to your WordPress install directory > wp-content > themes > your-theme-folder > functions.php. Right-click, edit, and paste the code at the end of the file. Do you have shared hosting? You can follow the same steps without FileZilla software. Just login into your shared hosting platform and visit file manager.

Now, if you don’t want to visit your backend file manager for whatever reason. It could be a situation where you can’t log in to your shared hosting platform or FileZilla is not working for you for some reason or maybe you just don’t want the hassle to connect all that then you can use a plugin that allows you to do the same thing but browse the files inside the WordPress itself.

This plugin is called WP File Manager and what it does is that it allows you to browse the files in the backend where your WordPress is installed. It gives you an easy interface but be aware that if you edit your file like this, there could be a chance that once an error pops, you will face a white screen, and then ultimately you will have to connect to your backend and fix the error (example change or delete the code in functions.php).

There is one more way and that is to use a functions inserter plugin called WPCODE. Yes, there are more plugins in the market that do the same thing but this one I can for sure it’s the best one out there as I have been using it for a long time. This plugin has 60k+ active installs at the time of writing this article.

Wrapping Up

Once you disable the emojis completely you will see a speed difference for sure. You can confirm that emojis are removed by visiting gtmetrix and doing a speed test on your website. Visit the waterfall section of the page and you will see there is no emoji script anymore. Screenshot your before and after speed and tweet at our Twitter handle @wphexacom. We would love to know how your experience was.

Have any questions or doubts? Comment below and we will do our best to help. Share with your friends as well so they know how to remove these cute emojis and let’s make an emoji-free world together (that sounded cruel but it’s fine, we need speed. hehe!).

Related Articles