Finally, Here is a sure shot way to remove WordPress meta Generator Tags

Most WordPress themes add a meta generator tag to the code. This tag is used to get the statistics of how many sites and using which WordPress versions. It looks like this in the browser:

WordPress Meta Tags

The bad thing about leaving the tags there is that, any potential hacker can easily identify which version you are using. From another angle, if someone manages to find a security glitch in any WordPress version, he would be able to search for all blogs using that particular version.

One way that used to work was by deleting the tag from the theme. Open up header.php and remove this line:

<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />

I have found that removing this doesn’t fix this often. One sure shot way that always work is using functions.php to add a little code:


<?php remove_action('wp_head', 'wp_generator'); ?>

If you do not have a functions.php in your theme, make one. Make sure this line is above all the code in the file. I am yet to see a case where this fails.

You could use this plugin instead.

Well, hackers are smart people, removing this tag wont make your site super secure, but it would be a little step. Another step would be renaming the default user-name admin to something else, here are three ways to do it.

Related: 13 Tags to Remove from your WordPress Theme

Awesome WordPress Themes!

You May Also Like To Read:

  1. Easily Learn WordPress Functions Using Inbuilt Documentation Lookup
  2. Remove Admin from Recent Comments List (No Plugin)
  3. Fix WordPress Capital P Dangit. What is it anyway?
  4. Make a Full Width Page For Your WordPress Theme
  5. How To Make Your Theme WordPress 3.0 Compatible

This entry was posted in WordPress and tagged , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

For More Like, "Finally, Here is a sure shot way to remove WordPress meta Generator Tags"
Grab the Feed or,

2 Comments

  1. Posted March 10, 2010 at 15:22 | Permalink

    Seems to be an security issue. Thanks for sharing

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting

  • Get Free Updates

Home · Archives · About · Contact · Advertise · Hire Me · RSS
© 2006 – the end of time, Arun Basil Lal. Powered by WordPress, H2O and an Awesome Bunch of Friends.