From the 2.5 version of the WordPress meta tag generator that displayed the version of WordPress you were using was removed from the template file to become a core function. This meant that you could not simply remove meta name tag generator from the from the template file any more.
To remove meta name=”generator” content=”WordPress 3.2.1″ or for any other version number, you either need to add code to your functions.php file or one of the other methods discussed below.
Benefits of removing meta name tag generator
There are many reasons to remove meta name tag. The tag itself offers no value in terms of search engine optimisation (SEO) but the most important reason to remove it is for security.
Showing your WordPress version could allow hackers to exploit vulnerabilities for specific WordPress versions. Most Web Hosting companies have auto install updaters which update your WordPress installs and removes vulnerabilities that are found, however many do not.
Now to remove this tag, simply login to your WordPress admin area and follow the instructions below:
- Navigate to Design -> Theme Editor and click Theme Functions (functions.php) from the list of theme files
- Just before the closing ?> tag, add the following:
- Now click on update and the file will be saved.
For those of you that don’t have a functions file, simply create a new file and call it functions.php and add the following code to that file:
<?php remove_action('wp_head', 'wp_generator'); ?>
Your WordPress version tag should now be removed from your site. To check this, simply visit your website and hit
ctrl + u , which shows you the source code. If all has gone well the WordPress generator code is no longer there.
If your not comfortable in doing code edits and worry that you may break your site then there is also another simple method to remove meta name tag generator.
You can install the this WordPress plugin which will give you the option to not only remove the WordPress generator tag but quite a few other default tags that are not required.
To use this option add the Meta Generator plugin via your WordPress plugin screen. Once installed hit’ activate’.
Then Navigate to -> Dashboard -> Settings -> Meta Generator and Version Info Remover and tick the options that you require. Its as simple as that.
Again as above, you can ensure that this change has been applied by going to your site and hitting
ctrl + u on your keyboard to view the source code.
If all has gone as planned then the WordPress version tag will no longer be present.
Go one step further and also remove your WLW and RSD links from your header. Unless your using windows live writer then you wont need these.
You should also update your website to use HTTPS as standard to avoid any browser error messages that may be shown to your visitors.