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');
Written by Randy M. Daniel
Related protips
1 Response
how about using remove_action('wp_head', 'wp_generator');
?
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#