GetSocial

  • Blogging
  • Freebies
  • Freeware
  • How-To
  • Make Money Online
  • Mobile



  • How to Remove WordPress Meta Generator tag





    I was reading an excellent post How to Stop Your WordPress Blog Getting Hacked. In that, the author has listed out different ways on how you can stop your WordPress Blog getting hacked.

    The second point in that post is to Remove Meta Generator Tag”. This tag reveals the WordPress Version you are using. This is the reason to remove that tag.

    As instructed, i headed to header.php of my current theme and looked for the following line to remove it.

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

    I was surprised to see that line was not there but, it was getting generated when i view the source of my Blog.

    I then found a way to Remove WordPress Meta Generator tag.

    If you look the contents of header.php carefully, you will find a function call wp_head() just before tag. This is the function which is adding WordPress Meta Generator Tag.

    Our aim is to remove that tag from getting generated by wp_head() function.

    Following steps are to remove meta generator tag in wordpress:-


    1. Login into your wordpress as administrator privilege
    2. Go to Appearance -> Editor and click on the file functions.php
    3. Add this line before the line with ?> (make sure you are not adding it in any function) and click Update
    4. remove_action(’wp_head’, ‘wp_generator’);
    5. If you don’t find functions.php, then you need to create one with the content below and upload to your theme folder:-
    6. <?php remove_action(’wp_head’, ‘wp_generator’); ?>
    7. Save the file.
    8. Clear the cache if you using any caching plugin, Load your blog and check the source code.

    I hope the above steps helped you to remove WordPress Meta Generator Tag.

    You may want to read more WordPress tweaks and hacks:

    How to Beautify Code samples in your post using Syntax Highlighter

    How to implement Threaded Comments in WordPress Themes

    How to Add categories to Nav Bar

    How to add Comment Link in Single Post – WordPress

    How to Add WordPress pages to Nav Bar

    IMPORTANT: This blog welcomes Guest Bloggers, Writers to also contribute by writing Guest Posts and also Make Money!. Check out our Revenue Sharing Program

    For Further Reading:

    1. Wordpress Fatal error: Allowed memory size of xxx bytes exhausted (Solved) – PHP Error
    2. How to Add Wordpress pages to Nav Bar
    3. How to add Comment Link in Single Post – Wordpress
    4. How to Add categories to Nav Bar
    5. How to implement Threaded Comments in Wordpress Themes
    6. How to Beautify Code samples in your post using Syntax Highlighter
    7. Facebook Timeline introduced to all users
    8. Use What Do You Love (WDYL) to search in all Google Services at one go
    Posted under: How-To, Wordpress
    2059 readers are already subscribed to this blog! Why don't you be one of them? Subscribe to this blog via your favorite RSS feed reader or by entering your email address on the form below:








    28 Comments

    1. Sire says:

      Hey Nihar, I read the very same post. It was pretty good wasn’t it? I followed several of the steps and will get to some of the other ones later.

      Sires last blog post..A Twitter Service You

    2. Lyndi says:

      I do not have the WP version showing in my code but I also do not have the code you mentioned in my functions.php. Somehow I managed to get rid of this in some other way. My problem is that I just cannot remember how I did it. Strange but true.

      Lyndis last blog post..Widgets Reset

    3. Pallab says:

      Thanks a lot for writing this. I was aware of this, but being as lazy as I am..I just kept putting if off. Getting rid of that tag right now.

      I guess being hacked once didn’t teach me a lesson.

      Pallabs last blog post..F.lux – Calibrate Your Display to the Time of the Day

    4. Hi there,

      thanks for the information. I know this is off topic, but I have given you an award. Please go and see what award you have received from me.

      Thanks again :)

      George Serradinhos last blog post..Funny – iBoob from Apple

    5. Ricky says:

      @Nihar
      You always come up with something new.i didnt know about this thing.I should get rid of this code asap.

    6. Well I am using a plugin for this thing. I know this method but it is not working always.

      Tech @ InkAPoints last blog post..Google Translate

    7. dug says:

      i love how easy it is to alter wordpress with a few simple clicks. thanks for being so helpful.

      dugs last blog post..untitled.jpg

    8. Used Tires says:

      It helps to keep away the amateur hackers, who may be using the version number for a simple hack…. but ultimately…. if a good hacker comes along… this modification won’t stop them. I am just saying… because I am now in my 3rd year at College for Software Engineering, and I learned alot from my professors, not about hacking… but in regards that no system is ever 100% secure. I mean this comment in a good way.

      Till then,

      Jean

    9. Atul says:

      I be soon get rid of it

      Atuls last blog post..Different Stages of Love

    10. [...] How to avoid Hotlinking of file and images using .htaccess hack [...]

    11. [...] turned off, ask yours if this is red. 5. That the WordPress ID metatag has been removed, learn how to remove it here. 6. The Admin user has been removed (Add your own user, grant it “admin” rights and [...]

    12. mirza says:

      very effective solution

    Leave a Reply

    CommentLuv badge

    Notify me of followup comments via e-mail. You can also subscribe without commenting.

    page counter
    NiharsWorld on Twitter NiharsWorld on Facebook NiharsWorld RSS Feed