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.
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.
oh thanks for this. I will try this out so that I won’t be easily detected which version of wp I’m using.
Can hackers still detect what version of WP you use w/ the WordPress Generator removed?
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.
I think WP developers always added new security for each of WP new releases. But i want to try this, thanks for the sharing.
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
How can it affect any work of the wordpress?