Last Updated: February 25, 2016
·
3.34K
· randy

Remove WordPress version info from meta data

You should be proud that your site is powered by WordPress and there’s no need to hide that information. However disclosing the full WP version info in the default location (page header meta) is not wise. People with bad intentions can easily use Google to find site’s that use a specific version of WordPress and target them with 0-day exploits. Place the following code in your theme’s functions.php file in order to remove the header meta version info:

function remove_version() {
return '';
}
add_filter('the_generator', 'remove_version');

1 Response
Add your response

how about using remove_action('wp_head', 'wp_generator'); ?

over 1 year ago ·