nazly.me

Weblog of Nazly Ahmed

Nazly Ahmed

Nazly Ahmed

Web Developer. PHP Addict. Wordpress Hacker. FOSS Enthusiast. (Micro)Blogger. Photo Hobbyist. Cricket Fanatic. Husband. Dad.

If you let your website visitors know, what version of WordPress you are running, you are potentially at risk. Hackers might use this opportunity to exploit the vulnerabilities in that particular version and will try to take down your website. Though you might keep your WordPress installation up-to-date, any lapses in failing to do so may open the doors to hackers. A good security measure would be to hide the WordPress version from the HTML source. By default if the theme uses wp_head() function which is true in most cases, the chances are that the WordPress version will be displayed in your HTML source.

<meta name="generator" content="WordPress 2.8.4">

To hide/remove the above, simply include the line below in the functions.php found in your theme files.

<?php
remove_action('wp_head', 'wp_generator');
?>

It’s that simple..

Posted on 8th July 2011 22:20:34