We're blushing from our 'Excellent' TrustPilot rating →
We're blushing from our 'Excellent' TrustPilot rating →
Rated 'Excellent'

Remove WordPress emojis script without a plugin

Remove WordPress emojis script without a plugin

Since WordPress 4.2 an emojis script was added to the WordPress Core to help support displaying emojis in older browsers. The bad news is that it added another http request which, while only being 10kb in size, is an additional request which can contribute to slower load times.

Below is a simple way to remove the WordPress emojis script without using a plugin.

Before You Start

First, before you remove the WordPress emojis script, you need to do basic prep, here are some things you need to have and do:

  1. Backup your WordPress website
  2. You need SFTP/FTP access to your server files
  3. You need an SFTP/FTP Client
  4. You need a Code Editor
  5. Make a quick copy of your functions.php

Remove WordPress Emojis Script Without Plugin

Ok, now to actually removing that pesky emojis script. You just need to do the following.

  1. Open your site in your SFTP/FTP client
  2. Go to your theme folder
  3. Open your functions.php
  4. Copy your functions.php and paste in your Code Editor
  5. Add the code snippet below to your functions.php
  6. Upload and save your functions.php via your SFTP/FTP client

Backup your WordPress website

Hopefully, you are regularly backing up your WordPress website, including database and files. If not, before you go any further, I recommend that you organise a backup to be taken of your website. There are plenty of easy to use guides on how to do this online.

Open your site in your SFTP/FTP Client

I now use Transmit to access WordPress files on the website host. There are plenty of free options to choose from. It’s recommended that you use SFTP rather than FTP to access your website host files, due to the connection being encrypted. It’s similar to a HTTPS connection versus a HTTP connection, hence the ‘S’.

Go to your theme folder

After you have logged in on your SFTP/FTP Client, head to your current WordPress theme folder which is located: /wp-content/themes/theme-folder-name.

Open your functions.php

Now open your functions.php in your current theme folder. To do this you’ll need a code editor, I use Atom (and sometimes Sublime Text). Both are simple and easy to use.

Copy your functions.php and paste in a Code Editor

As a quick precaution, I would copy the contents of your functions.php file and paste it in a new tab in your text editor. If something goes wrong, you can quickly paste back the original code rather than having to restore a full backup.

Add the code below

The code below should be placed within the php tags of your functions.php file.


/* ********************************
Remove Emojis Script
******************************** */

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

Save and upload your functions.php

Now just save and upload your edited functions.php file. You’ve now removed the emojis script from your WordPress site.

FAQs

Here are some of the questions we get asked most about from this article, Remove WordPress emojis script without a plugin. We'll try our best to answer any relevant questions that get sent to us.

I'm unsure how to do this and having issues with removing the emojis script from my WordPress website.

If you're stuck, you should talk to a WordPress developer who can help you. If you're interested you could hire us to remove your emojis script.

Codesauce, and codesauce.co.uk, is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.co.uk. Some of the links on this page may be affiliate links. Codesauce may get paid if you buy something or take an action after clicking one of these links. For more information please see Disclosure.

Contact Us
Get a free no-obligation quote today