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



You May Also Like To Read:

  1. Remove Admin from Recent Comments List (No Plugin)
  2. Fixing Missing Excerpts Box, Post Tags Box and Custom Field Box in WordPress
  3. Easily Learn WordPress Functions Using Inbuilt Documentation Lookup
  4. Make a Full Width Page For Your WordPress Theme
  5. Custom Image and Link for Each Post using WordPress Custom Fields

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