Aug
10
2009

Remove the WordPress Generator


WordPress automatically places a line of text between your <head> tags which states the version you currently have installed. I have read that it is there for statistical reasons which is all fine and dandy, but sometimes showing off which version of WP you are using lets hackers know exactly what vulnerabilities your site has.

For security reasons, I suggest removing the generator, and doing so only takes one line of code.

The WordPress generator line looks like this:

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

To get rid of it, open up your functions.php file. It is located in your theme’s folder. If there is no functions.php file, create one and just add the following code.

remove_action('wp_head', 'wp_generator');

Be sure to place it between <?php><?> tags.

If you liked this, please share it.

Tags: , , , , , , , , , , , , , , , , , , , , ,

Short URL: http://bit.ly/buytCA

Discussion 7 Comments

  1. Queue on August 15, 2009 at 8:22 pm

    As the little comment next to (or close to it) may state, they highly recommend you leave that there. It makes statistics a lot easier for them.

  2. oes tsetnoc on September 21, 2009 at 8:02 am

    oh thanks for this. I will try this out so that I won’t be easily detected which version of wp I’m using. :)

  3. Themes on December 13, 2009 at 7:33 am

    Can hackers still detect what version of WP you use w/ the WordPress Generator removed?

    • c.bavota on December 14, 2009 at 1:07 pm

      Removing the WP generator will make it more difficult for hackers to figure out which version you have. Also, always make sure to upgrade to the latest version of WP and never use “admin” as your admin username.

  4. Eddie Downs on February 2, 2010 at 9:23 am

    I think WP developers always added new security for each of WP new releases. But i want to try this, thanks for the sharing.

  5. Earlene Lever on June 12, 2010 at 12:03 am

    I support this matter 100% there never was requirement for this many, many years ago, 100% natural is more preferable, Keep this world we live in natural and organic. Happy earth day

  6. Winthrop Null on July 20, 2010 at 10:25 pm

    How can it affect any work of the wordpress?

Leave a Reply

Your email address will not be published. Required fields are marked *

*


To enter code in the comment box, please place it between <pre lang="php"> </pre> tags. You don't have to convert any characters to their hex/HTML code. Just add your code the way you would to any code editor.