Remove WordPress generator from head source

I always recommend removing the WordPress generator from the source of your head. WordPress by default will include the current version of WordPress in the header.

While this can be useful for knowing what WP version you are running compared to the current version available from WordPress.org, it can also give hackers and bots an idea of your install version you are running, so they can adopt any security holes known for that particular version. While WordPress is generally very secure, it still helps to do what you can to combat spam and hacking.

A simple snippet in your functions.php file will remove this line from the HTML source:

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

I always recommend using the latest version of WordPress as standard for the latest functions, security and bug fixes.

Useful post? Share it

Leave a Reply

Your email address will not be published.