Remove meta name=generator content=WordPress 3.2.1

From the 2.5 version of WordPress the 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 the tag from the template file anymore.

To remove meta name=”generator” content=”WordPress 3.2.1″ or for any other version number, this now needs to be implemented via the functions file.

There are many reasons to remove this tag but i think the most important is for security reasons. Showing your WordPress version could allow hackers to exploit vunerabilities for specific WordPress versions. Most Web Hosting companies have auto install updaters which update your WordPress instals and removes vunerabilities that are found, however many do not.

Now to remove this tag, simply login to your WordPress admin area and follow the instuctions below:

1. Navigate to Design -> Theme Editor and click Theme Functions (functions.php) from the list of theme files

2. Just before the closing ?> tag, add the following:

remove_action('wp_head', 'wp_generator');

3. Now click on update and the file will be saved.

For those of you that dont 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 generator code is no longer there.

Post discussion

One Response to “Remove meta name=”generator” content=”WordPress 3.2.1″”

  • peng February 7, 2012

    great post, added it to my favorite

Leave a comment

Download Project Worksheet

Our project worksheet which goes into more details about your requirements, helping us to better understand your specific developement and design needs.
Project Worksheet

Socialize with us

We want to socialize with you, whether you are a customer, someone interested in our services or just someone that wants to hear what we have to say.

TechnoratiStumbleuponFlickrFacebookRedditDiggBloggerDeliciousTwitter

Newsletter

Our newsletter is awesome. With up to date news on our latest projects and the latest in web development. Subscribe and get the latest updates.

Login to your Umbrella Project

Login to Umbrella Web Studio and manage your project(s)