Stop loading wp-emoji-release.min.js in your WordPress site

WordPress automatically loads this file wp-emoji-release.min.js on the front-end to help loading emojis that are part of the blogging feature of WordPress.

While this is great for the users who need it, most developers and professional websites have no need for emojis on their site. This ofcourse can be easily ignored, as it is a small file. However, it is a script that is being loaded into your WordPress site, and does factor into the loading speed of your site, no matter how little is impact can be.

Another bigger impact of this file, is the fact that it loads in the head, and speed-measurement tools such as Google Page Speed Insights or Pingdom identify it as render-blocking JavaScript. This is something you will want to address if you are concerned with site loading time, and optimizing your speed, which is a factor into improving your SEO score.

Luckily, removing this script is very easy. Add these two lines of code to a PHP file that is being loaded, such as the functions.php file in your theme. Alternatively, you can create a very simple plugin with just that code in it.

remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');

Adding this code will remove wp-emoji-release.min.js and stop it from loading on your WordPress site. Again, do this only if you you’re not using emojis on your blog!

Leave a Reply