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:-
- Login into your wordpress as administrator privilege
- Go to Appearance -> Editor and click on the file
functions.php - Add this line before the line with ?> (make sure you are not adding it in any function) and click Update
- If you don’t find
functions.php, then you need to create one with the content below and upload to your theme folder:- - Save the file.
- Clear the cache if you using any caching plugin, Load your blog and check the source code.
remove_action(’wp_head’, ‘wp_generator’);
<?php remove_action(’wp_head’, ‘wp_generator’); ?>
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
Technorati Tags: meta generator, meta tag, wordpress, wordpress meta generator, How-to
|
1897 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: |
You Should Also Check Out These Posts:
- Flip text upside down using Flip Text Generator
- 5 Security Tips to Protect Wordpress Blog
- May 2009 Blog Traffic & Income statistics
- Friday Night Links Party – 15 May 2009
- Download Wordpress 2.9.1 Release


Subscribe
This is great, thank you
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’d Be Crazy To Miss Out On
@Sire, I think i discovered that post from your site only
You see, and people say that there is nothing of value to be found on my blog
Sires last blog post..Wassup Blogs You Beaut Huge Link Love Fest
@Sire, Why are you saying that?
I was only kidding Nihar, that’s why I put
at the end of the comment. Everyone knows that I occasionally come up with a good post.
Sires last blog post..Are Google’s Days Numbered?
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
@Lyndi,
It is really strange. I am gonna wait for you, If you find the reason you let me know. May be there is some other way that these two ways…
Maybe there is some differences between different versions of WodPress.
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
@Pallab,
Get rid of it. Its always good to be play safe.
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
@George,
I checked the award, Thanks for it…
Not a problem, enjoy your day
George Serradinhos last blog post..Funny – iBoob from Apple
@Nihar
You always come up with something new.i didnt know about this thing.I should get rid of this code asap.
@Ricky,
Thanks for the appreciation.
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’s Security Breach
@Tech, Oh is it. Can i know which plugin are you using?
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
@Dug, yes. It is very flexible.
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
@Used Tires, I agree with you but, one has to make sure that he/she has tried to secure the blog.
I be soon get rid of it
Atuls last blog post..Different Stages of Love
[...] How to avoid Hotlinking of file and images using .htaccess hack [...]
[...] 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 [...]