How to Hide WordPress Version On Header?

Hello buddies. This is the first simple and important recipe/function of WordPress. Because if your WP version is shown on header, it can be a security risk. At this post i will give you a simple code and you will change your header. You have to use this code because we can’t change it directly in header.Yes as i told i will give a short code. You will import this code to your functions.php in your theme folder. It will remove the “generator” tag form header.

Here is the Code:

remove_action('wp_head', 'wp_generator');

You can add this code before ?> in functions.php.

After that if you use Firefox, just right click on the page and click Show Page Info. As you see there is no Generator tag in this information.

Have a nice day!


Related posts:

If you enjoyed this post, make sure you subscribe to my RSS Feed
  1. Jim
    Oct 16th, 2010 at 03:12 | #1

    Clear explanation but if it is such a security risk, why arený YOU hiding YOUR WP version.

    Well, at least you have updated to the lastest one…

    Check here: http://www.wpfunc.com/readme.html

  2. Spyhunter
    Oct 23rd, 2010 at 22:31 | #2

    I hate to break the bad news but that doesn't hide the version from even the most basic attacks scripts.

    Read this to see why:
    http://apps.svpn.com/5-reasons-why-wordpress-vers…

  3. Oct 26th, 2010 at 18:04 | #3

    Hi,

    I'm looking my source code but i can not see any wp-generator meta in my theme?. How you can see this?

Comments are closed.
Highslide for Wordpress Plugin