treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Remove WP Generator Meta Tag

Last updated on:

It can be considered a security risk to make your wordpress version visible and public you should hide it.

Put in functions.php file in your theme:

remove_action('wp_head', 'wp_generator');
View Comments

Comments

  1. S
    Permalink to comment#

    this so doesn’t work.

  2. Permalink to comment#

    It works fine for me. Thanks Chris.
    Btw, for those who are obsessed with high level of security, this plugin could be of some help.

    Secure WordPress

  3. Thank you Chris it work fine for me

  4. Permalink to comment#

    Wow, this works like a charm. It has been removed on all pages.

    I did not think that removing page generator is just so easy like this.

    Thanks for sharing.

  5. Thank you Chris it work fine for me, nice tips :)

  6. Permalink to comment#

    Very nice works perfectly!
    Thanks for sharing.

  7. And that snippet of code still works like a champ, today.

    One thing I remember from a few years ago when trying to remove the WP version generator was the specific theme I was using (apologies for not remembering which one it was) actually had some WP Version generator code in the <head> section of the theme’s header.php files. So, not only was I getting two WP version lines in the output code, this type of version “de-generator” only removed one of them. About pulled my hair out trying to solve the challenge! Finally did, however.

  8. Hi Chris, I’m the one that tweeted you :)

    Thanks for the code, I was trying to edit the wp_head(); function !! :D

    Thanks again

    Connor

  9. Thank you so much for sharing my friend this works perfectly

  10. Thanks, it works for me after many and many issues ;)

  11. Brian
    Permalink to comment#

    Ok. Why is this so important? All they need to do is type in wp-admin after the url to know its a WP site or administrator and viola it’s Joomla!

  12. Permalink to comment#

    Excellent, it’s working for me !

  13. FanaticWeb
    Permalink to comment#

    Doesnt work for WP 3.5 though..

    • steffi
      Permalink to comment#

      Yes, it works with WP 3.5.1, at least with the Twentyeleven theme.

      Thanks Chris!!

  14. Is there any alternative?

  15. qammar
    Permalink to comment#

    Yes, it is working, Thank you Chris.

Leave a Comment

Use markdown or basic HTML and be nice.