WordPress has a version number on the header of your website. This version number is generated by wp_generator ( )
function whenever the wp_head ( )
hook is called. This version number should look like this:
<meta name="generator" content="WordPress 3.9.1"/>
Although this version number won’t cause any trouble to you by itself, it can help hackers find out what version of WordPress you are currently using. As a result, this will give hackers the opportunity to attack your website if you are not using the latest available release of WordPress (which is strongly suggested).
To remove the WordPress version number, you just simply place the following codes in your function.php
file in your theme.
function remove_version( ) {
return ' ' ;
}
add_filter('the_generator', 'remove_version')
remove_action('wp_head', 'wp_generator');