We talked about how to use snippets to avoid the wp-embed things in WordPress. Disable wp-emoji and wp-embed WordPress Plugin Easily Removes the Currently Loading CSS, JavaScripts and oEmbed Functions in WordPress 4.5. But, really, adding so many PHP snippets for oEmbed and Emoji together via our easy recommended way is meaningless. Furthermore, there are complex functions needed for executing the complicated action on database which is difficult via that way.
Disable wp-emoji and wp-embed WordPress Plugin
Emoji and Embed JavaScripts and CSS files load for every visitor who lands to your WordPress site. These scripts slow down page loading by minimum 1 seconds on average. Youtube, Twitter provides iframe to embed own tweet or video. Emoji is fresh new features and all scripts blocks the faster page loading. Our plugin to disable wp-emoji and wp-embed is available on GitHub.
We suggest to download the tagged release as zip from our GitHub repo and manually upload and install on your WordPress site. We are using the plugin. Our this website really became slow. There are Emoji stuffs too, rightly pointed by the other WordPress users.
---
This plugin is a slight modification of Disable Embeds Plugin by Pascal Birchler. What this plugin does:
- Remove the oEmbed REST API endpoint.
- Turn off oEmbed auto discovery.
- Disables all JavaScript related to the feature.
- Remove oEmbed discovery links.
- Remove oEmbed-specific JavaScript from the front-end and back-end.
- Remove oEmbed-specific Plugin from Tiny-MCE WordPress Editor.
- Remove Emoji specific CSS and Javascripts..
Just activate the plugin and you are good to go. If you want embeds and emoji back again, simply deactivate the plugin.
Instruction For Nginx PHP-FPM Users Using Disable wp-emoji and wp-embed WordPress Plugin
We also use Nginx PHP-FPM. You basically should first delete the enhanced cached HTML pages in case you are using W3TC Plugin from /wp-content/cache/
. Then restart the services :
1 2 3 | service mysql restart service php5-fpm restart # for PHP 5.x service nginx restart |
It is better to reboot the server. This plugin can not remove this CSS :
1 2 | style type="text/css">.wpcp{background:#f7f7f7;padding:16px 20px;border-radius:5px;line-height:20px}</style> |