How to Hide the WordPress versions?

This WordPress tip is about hiding the WordPress version

0
Badge 2 Asked on May 10, 2019 in Wordpress.
Add Comment
1 Answer(s)

This WordPress tip is about hiding the WordPress version header. Imagine yourself as a hacker who wants to break into your site. A hacker’s life is made really really easy if they know what version of WordPress you are using. This is because if they know what version you are using, they can specifically try to attack your site with vulnerabilities which exist in this version.

If they don’t know the version, it would be a hit and miss attack. On the other hand, if they do know the version, they can zone in into a specific attack which is more likely to be successful.
There are two ways of hiding the WordPress version – the wrong way(s) and the right way and the wrong ways

The right way of hiding the WordPress version – DO THIS!

Add the following function to you functions.php


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

This will hide the version from all the areas of WordPress

Hiding the WordPress version – the wrong way (avoid doing this!)

The Wrong way of hiding the WordPress version will hide your version in certain areas of the site, the common areas such as the pages, but leave it exposed in other areas

Adding the following in the functions.php file – nope, don’t do that

remove_action('wp_head', 'wp_generator');

Removing the following from the header.php – also a bad idea!


Remember – this is not the only step to ensure your WordPress security. The best way to keep your WordPress hosted is to ensure that is kept updated all the time!

1
Badge 2 Answered on May 10, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.