WordPress Security Tip: Remove Generator Meta Tag (wp_generator)

Sometimes when a security hole is found in WordPress, the cyber-baddies will target specific versions of WordPress that are vulnerable to the exploit. There’s no easier way for them to see which version a site is running, than by looking for the “generator” meta tag, which is added by the wp_head() function. This tag specifies the WordPress version in it’s content attribute.

It looks like this:

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

To remove this meta tag, simply add the following line to your functions.php file in your theme:

remove_action('wp_head', 'wp_generator');

One Response to “WordPress Security Tip: Remove Generator Meta Tag (wp_generator)”

  1. thank bro, it’s realy help me to hide my WP version….