less than 1 minute read

Every time you login to your WordPress Dashboard, you should install any updates it says are available (Dashboard -> Updates). There are automated programs that look for older, exploitable versions of WordPress for them to hack, so you want to make discovering the version number of your WordPress as difficult to find as possible. When on your website, if you right click and choose “View Source” you’ll notice some code that says:

<meta content="WordPress 3.4.2" name="generator" />

Go into Appearance -> Editor and look for functions.php. Add the following code before the ?> ending:

// remove version number from head & feed
function disable_version() {
    return '';
}
add_filter('the_generator', 'disable_version');
remove_action('wp_head', 'wp_generator');

now save changes, and reload the page. When you View Source now, it should now be gone.