Close Menu
    Facebook X (Twitter) Instagram
    Oixiesoft
    • Home
    • Services
      • WordPress Malware Removal
      • Fix WordPress Errors
      • WordPress Website Development
    • Articles
    • Contact
    Oixiesoft
    Home»Wordpress»How to clean up WP head-tag and improve page speed (2024 guide)
    Wordpress

    How to clean up WP head-tag and improve page speed (2024 guide)

    Editorial StaffBy Editorial StaffUpdated:January 8, 2024No Comments2 Mins Read
    Share
    Facebook Twitter LinkedIn Pinterest Email

    How to clean up WP head-tag

    Clean up WordPress header without plugin

    Do you want to remove unnecessary code from your wordpress blog header?

    When you look at your WordPress website you may have noticed a lot of source code in your <head> tag whether you want it or not such as rel=” pingback”, re=” alternative”, and WordPress version.

    However, if you are a clean WP head tag, it improves your website speed and looks like WordPress code nice.

    So you’ll require to add some remove_action functions in the function.php file to clean up your WordPress head tag.

    What are advantages?

    • Increase performance on your WordPress site.
    • Content to Code ratio increase
    • Improve search engine reads

    Overview of the full WordPress <head> Code

    Add below source code to your theme’s functions.php file:

    Give here some code of what is added to your WordPress.
    
    //Remove the generator
    
    remove_action( 'wp_head', 'wp_generator' );
    
    //Remove RSD Link
    
    remove_action( 'wp_head', 'rsd_link' );
    
    //Remove REST API link tag
    
    remove_action( 'wp_head', 'rest_output_link_wp_head', 10 );
    
    //Remove oEmbed links
    
    remove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 );
    
    //Remove REST API in HTTP Headers
    
    remove_action( 'template_redirect', 'rest_output_link_header', 11, 0 );
    
    //Remove WLW Manifest
    
    remove_action( 'wp_head', 'wlwmanifest_link' );
    
    //Remove the short link
    
    remove_action( 'wp_head', 'wp_shortlink_wp_head' );
    

    Enjoy and have fun.
    Now clean up your WordPress head tag.

    Share. Facebook Twitter Pinterest LinkedIn WhatsApp Reddit Tumblr Email
    Editorial Staff

    Related Posts

    WordPress Pharma Hack – How To Fix

    How to Set Post Expiration Date in WordPress

    How to Enqueue Scripts Using wp_enqueue_scripts Hook in WordPress

    WordPress Pharma Hack – How To Fix

    How to Set Post Expiration Date in WordPress

    How to Enqueue Scripts Using wp_enqueue_scripts Hook in WordPress

    How to Update PHP in WordPress Safely

    How to Fix Broken Permalinks in WordPress?

    Fixed Unable to Create Directory wp-content/uploads. Is its Parent Directory Writable by the Server.

    WordPress Memory Limit – How to Fix or Increase the PHP Memory Limit

    How To Fix Japanese Keyword Hack In WordPress Site?

    How to Add Bullet Points & Numbered Lists in WordPress

    How to Properly Use Heading Tags in WordPress

    How To Fix the “Missing a Temporary Folder” Error in WordPress

    How to Create a Sitemap in WordPress

    How to Disable Emojis in WordPress

    How To Turn Off The RSS Feed In WordPress

    How to Enable Customer Tracking in WooCommerce with Google Analytics

    How to Easily Add Icon Fonts in Your WordPress Theme

    How to Display Your Facebook Page Reviews in WordPress

    How to Start a Podcast (and Make it Successful) in 2024

    How To Fix “The Link You Followed Has Expired” WordPress Error

    How to remove Malware from WordPress website?

    Services
    • Web Development
    • Mobile Application Development
    • WordPress Malware Removal Service
    • Website Design
    • WordPress Development
    • Magento Development
    • Shopify Development
    • SEO Services
    Blog
    • How to Fix the Error Establishing a Database Connection
    • Ping List WordPress
    • How To Fix Japanese Keyword Hack
    • How to remove Malware from WordPress
    Hire Developers
    • Hire WordPress Developer
    • Hire Shopify Developer
    Contact Info
    • Oixiesoft Technologies
      A-40, Block A, I thum Tower, Sector 62, Noida
    • [email protected]
    • Privacy Policy
    • About Us
    • Contact Us
    © 2025 OixieSoft Technologies

    Type above and press Enter to search. Press Esc to cancel.