![]()
WordPress includes emoji support that can add detection code, styles, editor integration, resource hints, and—in some situations—external image requests to a site. You can Disable WordPress Emojis safely and reversibly by removing the related WordPress hooks and filters with a small PHP snippet, then checking the public site and editor to confirm the result. The amount of improvement depends on the page and visitor environment: detection code or a DNS-prefetch hint is not automatically a separate HTTP request, and an external emoji image request may not occur on every visit.
This change removes WordPress emoji support infrastructure; it does not remove emoji characters from posts or stop a visitor’s operating system or browser from displaying ordinary emoji characters. The guide explains what the snippet changes, where to install it so theme updates do not erase it, and how to verify its effects using page source and browser developer tools. Test on staging when possible, or take a current backup first, so you can remove the snippet and restore the previous behavior if an editor feature or site component does not work as expected. Before starting, make sure you have:
- A WordPress 6.x site and administrator access.
- PHP 8.0 or later recommended; confirm the PHP version used by your host.
- A current site backup or a staging copy for testing.
- Access to a child theme functions.php file or a site-specific plugin.
- Browser developer tools for inspecting page source and the Network panel.
- A way to purge WordPress, hosting, CDN, and browser caches if your site uses them.
Step 1: Understand what WordPress emoji support adds
Before changing anything, identify the different parts of the feature. WordPress emoji support is more than a single front-end file: core can add browser detection code and styles, connect the classic editor to its wpemoji TinyMCE plugin, and convert emoji characters in content handled by feeds or email. The exact output can vary with the WordPress version, configuration, and the content being displayed.
The detection code checks whether the visitor environment can display emoji characters natively. When a character needs a fallback, WordPress may use an image instead. The related styles control how those fallback images are displayed. Editor integration is separate from the public page: removing it can affect the classic editor even if a visitor never sees an editor-related asset.
Core can also add a DNS-prefetch resource hint for the emoji image host. This hint asks the browser to prepare for a possible connection; it is not itself a download of an emoji image. Likewise, detection code or styles included in a page do not automatically represent additional HTTP requests. An external image request is conditional: it depends on whether fallback handling is needed and whether the page contains relevant characters.
Disabling the WordPress conversion and detection features does not delete emoji characters from posts, comments, feeds, or email. In most current browsers and operating systems, ordinary emoji characters can still appear using the visitor device’s native font and rendering. Appearance can differ between platforms, so compare the same content on the devices your audience uses.
Think of this as removing WordPress-specific support infrastructure, not removing every emoji-related possibility from the web page. Test the change on staging or after creating a current backup, and verify both the public site and the editor. If a feature behaves unexpectedly, removing the snippet and clearing caches provides a straightforward rollback.
Step 2: Choose a safe place for the code
Pick the installation location before adding the optimization. The best option depends on whether you want it to remain active if you change themes. In either case, keep a backup and add the code only to a file or plugin you control; a mistake in PHP can cause an error that makes the site unavailable until corrected.
Use a site-specific plugin for a lasting change
A small site-specific plugin is the most portable choice when the change should stay active across theme changes. Using your hosting file manager or SFTP, create a dedicated folder inside wp-content/plugins/ and a PHP plugin file inside that folder. Add the required plugin header, then place the emoji-removal snippet in the file. Avoid putting unrelated customizations in the same plugin unless you intend to manage them together.
In the WordPress dashboard, open Plugins → Installed Plugins and activate the new plugin. To roll back, deactivate it there; the code will stop running without changing your theme. If you cannot access the dashboard after a PHP error, use your host file manager or SFTP to rename the plugin folder temporarily.
Use a child theme when the change belongs to the theme
If the behavior is specifically tied to your active theme, add the snippet to the child theme functions.php file. Use a child theme rather than editing the parent theme, so a theme update does not overwrite your change. If the file already begins with <?php, do not add another PHP opening tag.
Do not edit WordPress core files or the parent theme directly: updates can replace those edits, and core changes are especially difficult to maintain. Keep a note of the file and location you changed so you can remove the snippet cleanly if testing reveals an issue.

Pro Tip
Did you know: You can Preload Resources in your site’s head to load fonts and critical assets sooner, improve page speed, and create a smoother experience for visitors across devices.
Step 3: Disable WordPress Emojis with a PHP snippet
Add this snippet to the active child theme functions.php file or your site-specific plugin. It removes WordPress emoji detection scripts and styles from the front end and admin, disables emoji conversion for feeds and email, removes the classic editor plugin, and filters the emoji SVG DNS-prefetch hint. It leaves unrelated resource hints intact.
function pnet_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' );
add_filter( 'tiny_mce_plugins', 'pnet_disable_emojis_tinymce' );
add_filter( 'wp_resource_hints', 'pnet_disable_emojis_dns_prefetch', 10, 2 );
}
add_action( 'init', 'pnet_disable_emojis' );
function pnet_disable_emojis_tinymce( $plugins ) {
if ( ! is_array( $plugins ) ) {
return $plugins;
}
return array_diff( $plugins, array( 'wpemoji' ) );
}
function pnet_disable_emojis_dns_prefetch( $urls, $relation_type ) {
if ( ! is_array( $urls ) || 'dns-prefetch' !== $relation_type ) {
return $urls;
}
$emoji_svg_url = apply_filters(
'emoji_url',
'https://s.w.org/images/core/emoji/2/svg/'
);
return array_diff( $urls, array( $emoji_svg_url ) );
}
The main callback runs on init and removes only WordPress emoji-related hooks. The TinyMCE filter removes wpemoji while retaining the existing plugin list, including when it is not an array. The resource-hints filter checks the relation type and emoji URL, then returns other hints unchanged. See the WordPress resource hints filter reference for the hook arguments.

Pro Tip
Step 4: Verify the front end, editor, and remaining requests
First, purge the WordPress page or object cache, your hosting cache, and any CDN cache. Then open a representative page in a private browser window to reduce the chance that a previous visit or browser cache affects the result. If possible, record a baseline before installing the snippet and repeat the same checks afterward.
Inspect the page output
Use View Source or the browser developer tools Elements panel to look for WordPress emoji detection code, emoji-related styles, and the emoji SVG DNS-prefetch hint. Depending on the WordPress version and optimization setup, names and output can vary; search source for terms such as wpemoji or emoji and compare against your saved baseline. Confirm that unrelated styles, scripts, and resource hints are still present.
Check actual network requests
In DevTools, open the Network panel, enable Disable cache, reload the page, and filter the request list for emoji. A missing detection script or DNS-prefetch hint does not prove that a separate request was removed: those can be inline code or connection hints. Fewer requests are measurable only if the page previously caused an external emoji asset to load. Compare the same URL, browser, cache state, and test conditions before and after; do not attribute every load-time change to this snippet.
Test the editor and emoji rendering
Check the post editor and relevant admin screens, especially if you use the classic editor, then preview content containing ordinary emoji characters. Those characters should generally continue to render using the visitor device’s native fonts and browser support, though their appearance can vary by platform. If an editor feature or display behaves unexpectedly, remove or deactivate the snippet, clear caches, and retest.

You might also like:
Step 5: Resolve common errors
Most problems come from a misplaced snippet, stale cached output, or assumptions about how WordPress handles emoji. Work through these checks before changing other performance settings. If the site becomes unavailable after a PHP error, use your host file manager or SFTP to remove the snippet or deactivate its plugin, then restore your backup if needed.
Fix PHP errors
Check for a missing semicolon, mismatched braces, a misspelled function name, or Markdown fences accidentally pasted into the PHP file. If the error began immediately after installation, temporarily remove or deactivate the code to restore the site, correct the problem, and test again. Avoid making further edits directly on a live site when a staging copy is available.
Confirm the snippet is active
If nothing changes, verify that the code is in the active child theme or that the site-specific plugin is activated. Look for duplicate snippets in a code-management plugin or another customization file; conflicting callbacks can make results difficult to interpret. Purge WordPress, hosting, and CDN caches, then retest in a private browser window with the browser cache disabled.
Troubleshoot the editor filter
If the classic editor still loads emoji support, check that the TinyMCE filter is registered inside the main callback and that the callback is not misspelled. The filter should remove only wpemoji from an array of plugins. If the input is not an array, returning the original value avoids an invalid result and preserves behavior supplied by other code.
Inspect remaining resource hints
If a DNS-prefetch entry remains, inspect its actual URL and relation type in the page source. A theme or plugin may add its own hint, or WordPress may use a filtered emoji URL that differs from the expected value. Keep unrelated DNS-prefetch entries: removing every hint can affect other services and does not solve a targeted emoji issue.
Interpret rendering and performance results
If emoji appearance changes, compare the same character across browsers and operating systems. Native rendering depends on the visitor’s device and font; removing WordPress conversion support does not remove the character itself. If an audit shows no measurable improvement, the tested page may not have generated an external emoji-image request before the change. Keep the snippet only if removing the WordPress-specific output is useful, and judge request changes in DevTools rather than from a score alone.
You might also like:
Conclusion: Keep the change measured and reversible
The pnet_-prefixed snippet removes WordPress emoji-related actions from the public page and admin, disables the classic editor emoji plugin, removes emoji conversions for feeds and email, and filters the emoji SVG DNS-prefetch hint while preserving unrelated resource hints. It changes WordPress support infrastructure, not the emoji characters stored in your content. Visitors can generally continue to see ordinary emoji through their browser and operating system, although the appearance can differ between devices. Keep a backup and record whether you placed the snippet in a site-specific plugin or a child theme file. That small note makes later review easier and gives you a clear route to reverse the change if an editor, plugin, or content workflow depends on the removed behavior.
After adding the code, purge relevant caches and compare the same page under the same browser and cache conditions. Use page source to check for the removed WordPress output, then use the DevTools Network panel to confirm whether an actual emoji asset request disappeared. The detection code and resource hint are not, by themselves, separate image downloads, and a page may never have requested an external emoji image in the first place. Treat request reduction as a result to verify, not a guaranteed performance gain; assess the rest of the page independently rather than attributing every score or timing change to this adjustment. If the test reveals a problem or no worthwhile benefit, deactivate the plugin or remove the snippet, clear caches, and retest. Applied selectively and checked in the browser, **Disable WordPress Emojis** is a modest, reversible way to trim unnecessary WordPress output where it is actually present.