Hiding the Meta Generator Tag in WordPress in the Header and RSS

How to hide the Meta Generator tag in the WordPress Header and RSS Feeds



If you check the source code of your WordPress blog, in the header section you will see a meta tag named ‘generator‘ directly below the title tag:

<meta name="generator" content="WordPress 4.1.0" />

The purpose of the tag is  to state the name and version  of the application tool used to create your website. The bad thing about this is that it openly declares what software and version you are using – if that software and version are out of date and subject to exploitation by a hack you are leaving yourself wide open.

In the WordPress installation folder, go to and open the functions.php file from your theme folder  or  just edit the file directly in WordPress via Appearance>Editor>functions.php – it has a onscreen title of theme functions and at the bottom of the file add this following php snippet:

// hide the meta tag generator from head and rss
function disable_meta_generator() { 
 return ''; 
remove_action('wp_head', 'wp_generator');

Update the file, and reload the home page, check the source code and you will see the generator tag for WordPress is no longer visible.  More importantly always keep your WordPress version up to date.


  1. Kami on April 27, 2021 at 7:07 pm

    How to fake meta tags generator???

  2. programmer on July 22, 2015 at 7:03 am

    The bad side of this is that people getting your feeds can’t no longer read your feeds if they make adaptations according to your software. Pretty bad for exposition.

Leave all Comment