{"id":157666,"date":"2022-05-26T14:24:02","date_gmt":"2022-05-26T14:24:02","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/head-trimmer\/"},"modified":"2026-06-05T14:56:34","modified_gmt":"2026-06-05T14:56:34","slug":"head-trimmer","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/head-trimmer\/","author":18824119,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.5","stable_tag":"1.0.5","tested":"7.0","requires":"5.9","requires_php":"7.2","requires_plugins":null,"header_name":"Head Trimmer","header_author":"John Dalesandro","header_description":"Customizable plugin to selectively remove WordPress version information, feeds, shortlinks, xmlrpc, emoji support and other miscellaneous extras from the HEAD element.","assets_banners_color":"11131b","last_updated":"2026-06-05 14:56:34","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/johndalesandro.com\/projects\/head-trimmer\/","header_author_uri":"https:\/\/johndalesandro.com\/","rating":0,"author_block_rating":0,"active_installs":20,"downloads":3279,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"dalesandro","date":"2022-05-26 14:28:07"},"1.0.1":{"tag":"1.0.1","author":"dalesandro","date":"2022-06-01 14:07:56"},"1.0.2":{"tag":"1.0.2","author":"dalesandro","date":"2022-06-03 15:05:57"},"1.0.3":{"tag":"1.0.3","author":"dalesandro","date":"2022-10-26 14:31:01"},"1.0.4":{"tag":"1.0.4","author":"dalesandro","date":"2025-12-22 23:42:50"},"1.0.5":{"tag":"1.0.5","author":"dalesandro","date":"2026-06-05 14:56:34"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3562486,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3562486,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3562486,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3562486,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2740794,"resolution":"1","location":"assets","locale":"","width":1705,"height":1569}},"screenshots":{"1":"Head Trimmer admin settings screen."}},"plugin_section":[],"plugin_tags":[4657,3195,683,3511,600],"plugin_category":[54],"plugin_contributors":[210696],"plugin_business_model":[],"class_list":["post-157666","plugin","type-plugin","status-publish","hentry","plugin_tags-clean","plugin_tags-head","plugin_tags-meta","plugin_tags-remove","plugin_tags-security","plugin_category-security-and-spam-protection","plugin_contributors-dalesandro","plugin_committers-dalesandro"],"banners":{"banner":"https:\/\/ps.w.org\/head-trimmer\/assets\/banner-772x250.png?rev=3562486","banner_2x":"https:\/\/ps.w.org\/head-trimmer\/assets\/banner-1544x500.png?rev=3562486","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/head-trimmer\/assets\/icon-128x128.png?rev=3562486","icon_2x":"https:\/\/ps.w.org\/head-trimmer\/assets\/icon-256x256.png?rev=3562486","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/head-trimmer\/assets\/screenshot-1.png?rev=2740794","caption":"Head Trimmer admin settings screen."}],"raw_content":"<!--section=description-->\n<p><strong>Head Trimmer<\/strong> gives you granular control over what WordPress automatically outputs in the HEAD element of every page. Each option is independent; enable only the removals that make sense for your site.<\/p>\n\n<p>Removing unnecessary HEAD elements reduces page weight, eliminates potential security signatures such as the WordPress version number, and keeps your generated source code clean.<\/p>\n\n<p>All settings are opt-in. Nothing is removed until you enable it on the Admin -&gt; Settings -&gt; Head Trimmer screen.<\/p>\n\n<p>Removal options include:<\/p>\n\n<ul>\n<li>WordPress Version (generator meta tag)<\/li>\n<li>WordPress Version from Script and Style URLs<\/li>\n<li>All Other Version Signatures from Script and Style URLs<\/li>\n<li>Shortlink<\/li>\n<li>Shortlink from HTTP Response Headers<\/li>\n<li>Canonical<\/li>\n<li>Relational Links for Posts Adjacent to Current Post<\/li>\n<li>RSS Feeds (removes head links and disables feed endpoints)<\/li>\n<li>Really Simple Discovery Link for xmlrpc (rsd_link)<\/li>\n<li>Windows Live Writer Manifest File Link (wlwmanifest_link)<\/li>\n<li>oEmbed Discovery Links<\/li>\n<li>REST API Link and REST API Link Header<\/li>\n<li>Emoji Support<\/li>\n<li>Global Styles and SVG Filters (duotone filters)<\/li>\n<li>Gutenberg Block CSS Styles (or optionally set 'should_load_separate_core_block_assets' to load block styles only when needed)<\/li>\n<li>Classic Theme CSS Styles (classic-theme-styles)<\/li>\n<li>DNS Prefetch for \/\/s.w.org<\/li>\n<li>DNS Prefetch for Google Fonts \/\/fonts.googleapis.com<\/li>\n<li>jQuery<\/li>\n<li>JavaScript Import Map (added in WordPress 6.5)<\/li>\n<li>Interactivity API (added in WordPress 6.5)<\/li>\n<li>Image Auto Sizes Styles (added in WordPress 6.7)<\/li>\n<li>Speculation Rules (added in WordPress 6.8)<\/li>\n<li>Comment Reply Script (loads only on singular posts and pages where comments are open)<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Install Head Trimmer through the WordPress.org plugin repository or by uploading the .zip file using the Admin -&gt; Plugins -&gt; Add New function.<\/li>\n<li>Activate Head Trimmer on the Admin -&gt; Plugins screen.<\/li>\n<li>Customize settings on the Admin -&gt; Settings -&gt; Head Trimmer screen.<\/li>\n<\/ol>\n\n<p>Uninstall\n1. Deactivate the plugin on the Admin -&gt; Plugins screen. All plugin files and settings will be retained.\n2. Delete the plugin on the Admin -&gt; Plugins screen. This deletes both the plugin files and all plugin settings stored in the database.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"the%20setting%20to%20remove%20a%20particular%20element%20is%20checked.%20why%20do%20i%20still%20find%20the%20element%20in%20the%20source%3F\"><h3>The setting to remove a particular element is checked. Why do I still find the element in the source?<\/h3><\/dt>\n<dd><p>Please verify settings for other installed plugins which may re-add an element. As an example, various SEO plugins may include an option to add the canonical or relational links.<\/p><\/dd>\n<dt id=\"i%20set%20the%20option%20to%20remove%20the%20wordpress%20version%20number%20from%20scripts%20and%20styles.%20why%20do%20i%20still%20find%20version%20numbers%20in%20script%20and%20style%20urls%3F\"><h3>I set the option to remove the WordPress version number from scripts and styles. Why do I still find version numbers in script and style URLs?<\/h3><\/dt>\n<dd><p>Head Trimmer removes the installed WordPress version number from script and style URLs. It does not remove version numbers generated by other plugins such as caching and optimization plugins.<\/p><\/dd>\n<dt id=\"i%20enabled%20%22remove%20interactivity%20api%22%2C%20%22remove%20javascript%20import%20map%22%2C%20%22remove%20image%20auto%20sizes%20styles%22%2C%20or%20%22remove%20speculation%20rules%22%20and%20something%20on%20my%20site%20broke.\"><h3>I enabled \"Remove Interactivity API\", \"Remove JavaScript Import Map\", \"Remove Image Auto Sizes Styles\", or \"Remove Speculation Rules\" and something on my site broke.<\/h3><\/dt>\n<dd><p>These options may break blocks or plugins that rely on the WordPress Interactivity API, ES module imports, or automatic image sizing. For example, the navigation block depends on the Interactivity API. If you experience issues, uncheck the relevant options on the Admin -&gt; Settings -&gt; Head Trimmer screen.<\/p><\/dd>\n<dt id=\"will%20removing%20these%20elements%20break%20my%20site%3F\"><h3>Will removing these elements break my site?<\/h3><\/dt>\n<dd><p>Most elements Head Trimmer can remove are informational or legacy features that modern sites do not need. However, some options such as Remove jQuery, Remove Interactivity API, Remove JavaScript Import Map, and Remove Image Auto Sizes Styles can break functionality if your theme or plugins depend on them. Speculation Rules is generally safe to remove as it only affects browser prefetching of internal links. Removing Canonical can negatively affect SEO on paginated archives. Removing jQuery will also prevent any scripts that depend on jQuery from loading. Review the description next to each setting before enabling it, and test after making changes.<\/p><\/dd>\n<dt id=\"does%20head%20trimmer%20affect%20the%20wordpress%20admin%3F\"><h3>Does Head Trimmer affect the WordPress admin?<\/h3><\/dt>\n<dd><p>Options that could interfere with admin functionality are automatically limited to the front end only. These include removing emoji support, block styles, classic theme styles, jQuery, and the Interactivity API. The settings screen notes which options do not affect administrative screens.<\/p><\/dd>\n<dt id=\"i%20enabled%20%22remove%20canonical%22%20and%20i%20am%20concerned%20about%20seo.\"><h3>I enabled \"Remove Canonical\" and I am concerned about SEO.<\/h3><\/dt>\n<dd><p>WordPress outputs canonical links on paginated archives such as page 2 and page 3 of post listings. Removing canonical links from these pages can result in duplicate content issues in search engines. If your site uses pagination and SEO is a concern, consider leaving this option unchecked or using an SEO plugin that manages canonical links independently.<\/p><\/dd>\n<dt id=\"i%20enabled%20%22remove%20jquery%22%20and%20scripts%20on%20my%20site%20stopped%20working.\"><h3>I enabled \"Remove jQuery\" and scripts on my site stopped working.<\/h3><\/dt>\n<dd><p>Removing jQuery also prevents any scripts that declare jQuery as a dependency from loading. This includes many theme and plugin scripts such as sliders, lightboxes, and form handlers. If you experience broken functionality after enabling this option, uncheck it on the Admin -&gt; Settings -&gt; Head Trimmer screen.<\/p><\/dd>\n<dt id=\"i%20enabled%20%22remove%20rest%20api%20links%22%20but%20the%20rest%20api%20is%20still%20accessible.\"><h3>I enabled \"Remove REST API Links\" but the REST API is still accessible.<\/h3><\/dt>\n<dd><p>This option only removes the REST API discovery links from the page source and HTTP response headers. It does not disable the REST API itself. If you need to restrict REST API access, that requires a separate approach outside the scope of this plugin.<\/p><\/dd>\n<dt id=\"i%20enabled%20%22remove%20image%20auto%20sizes%20styles%22%20and%20my%20images%20look%20smaller%20than%20expected.\"><h3>I enabled \"Remove Image Auto Sizes Styles\" and my images look smaller than expected.<\/h3><\/dt>\n<dd><p>The image auto sizes CSS fix exists to correct a rendering issue in some browsers where images using sizes=auto appear smaller than their container. Removing it may cause this visual issue to reappear. If you notice images displaying incorrectly after enabling this option, uncheck it on the Admin -&gt; Settings -&gt; Head Trimmer screen.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Adds option to remove JavaScript Import Map<\/li>\n<li>Adds option to remove Interactivity API<\/li>\n<li>Adds option to remove Image Auto Sizes Styles<\/li>\n<li>Adds option to remove Speculation Rules<\/li>\n<li>Adds option to load comment reply script only when needed<\/li>\n<li>Minor changes to improve code readability<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Adds option to remove classic themes CSS styles<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Adds option to set 'should_load_separate_core_block_assets' instead of removing Gutenberg Block CSS Styles entirely<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Minor changes to improve code readability and internationalization<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Minor changes to improve code readability and internationalization<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial Release<\/li>\n<\/ul>","raw_excerpt":"Selectively remove WordPress version information, feeds, shortlinks, emoji support, scripts, styles, and other automatically generated extras from the &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/157666","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=157666"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dalesandro"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=157666"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=157666"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=157666"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=157666"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=157666"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=157666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}