How to remove WordPress version number

Hi friends, hope you are doing good. This is a quick tutorial about WordPress security. There are lots of aspect to protect your WordPress based website from attacker/hackers, in this tutorial I will explain one from them.

How to remove WordPress version number? If you are using WordPress websites, then make sure you have removed version number from your WordPress websites. It may be hackers/attackers will hack your website via known weakness’s of that release which you are currently using. One thing more always keep your website to updated to latest WordPress version.

How to remove WordPress versions from website

Now you have a question how to remove WordPress version number from websites. This is very easy to remove version number from WordPress webiste. Copy below code and paste at the end of the functions.php file of your current theme. Below code will remove version number from your WordPress.

1

2

3

4

5

6

7

8

9

<?php

// Remove the version number of WP

remove_action('wp_head','wp_generator');

?>

Also make sure to delete readme.html from root directory of your website because of it also contains the version number. Readme.html file look like below screenshots.

Over to You

Do you like & share this article with your friends, and don’t forget to follow us on Facebook and Twitter to learn cool WordPress tutorials.

About: Prem Tiwari

Prem Tiwari is the founder of freewebmentor.com and is a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby.
View all posts by Prem Tiwari