Speed up your WordPress Site by removing Emojis

Posted on August 14, 2016 at 11:28 pm

Tags: ,

6 Comments

What is an Emoji? It's a small digital image or icon used to express an idea, emotion, etc., in electronic communication.

How to Disable WordPress Emojis

From 4.2 version and on WordPress supports by default the Emojis. This is a great thing if you like using them in your posts and comments but its not the best thing to do if you want to make sure your WordPress site loads as fast as possible.

Below you can see the amount of javascript which is loaded in every page of your WordPress site, called by /wp-includes/js/wp-emoji-release.min.js?ver=4.2.2

WordPress emoji source code

If you're looking to remove emoji's from your WordPress installation then you can follow one of the two ways which can be found below:

Disable Emojis using functions.php

The best way to remove emoji from your post and pages header is to add the following code to your theme or child theme(preferably) functions.php file.

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' );

Use a plugin which disables Emojis

If you don't feel comfortable messing with your theme's function.php(even though its a very simple edit) you can use a plugin instead. Ryan Helner created the Disable Emojis Plugin which lets you do just that!

Keep in mind that even though you remove emojis they can still work(without hurting your site speed performance) through browsers which have built in support for them.

Let me know through the comments if you have any questions or need any help.

Comments (6)

  1. Cyndi Reply

    August 16, 2016 at 4:24 pm

    Thank you for posting this. None of my website clients use emojis, too bad it’s in WP at all as a resource hog, in my opinion.

    1. Fix My WP Reply

      August 17, 2016 at 2:17 am

      They will probably dismiss it once they see that too many users are disabling it. I don’t like it either.

  2. Barbara Reply

    August 20, 2016 at 9:00 pm

    I noticed this script in a performance test. It’s gone, thanks for posting.

  3. Harish Reply

    July 4, 2017 at 11:09 am

    but why can’t use a plugin instead? seems working easy and fast speed

    like means https://wordpress.org/plugins/disable-emojis-littlebizzy/

    thanks for reply me……

    1. Makis Mourelatos Reply

      July 9, 2017 at 12:50 pm

      Hi Harish. As you can see I have provided both ways; the plugin and using a code snippet. The latter one is preferred because its a more lightweight as a solution that adding and activating one more plugin to your site.
      So as an answer to your questions I can say that if you care about your site PageSpeed then its better to try and find solutions through code snippets and editing your theme files instead of adding a bunch of plugins especially for simple fixes like this one.

Leave a Reply

Your email address will not be published. Required fields are marked *