Family Best Time >> Electronics

The correct way to remove WordPress version number

By default, WordPress leaves footprints on your site for the sake of tracking. This is how we know that WordPress is the largest blogging platform in the world. But sometimes this footprint can be a security leak on your site if you're not running the most up-to-date version of WordPress. Because you are providing the hacker with the useful information by telling him what version you are running.

If you're running the most up-to-date version of WordPress, which we recommend you do, then you don't have to worry about this tutorial. But if for some reason you are not, then you may want to follow this tutorial.

There are many ways to remove the WordPress version number from your header. But there is only one correct way to do this.

Some sites will recommend that you open their header.php File and get rid of this code:

 

Or others will recommend you to open your functions.php and add the following function:

 remove_action ('wp_head', 'wp_generator'); 

But both ways offer you an incomplete solution. These forms will simply remove the WordPress version number from your main area. So if someone sees the source of your website, they won't be able to see the version.

But a smart hacker who knows WordPress will just go to his RSS feeds and find the version number of it there because none of the above code will remove that number..

In order to completely remove your WordPress version number from your main archive and RSS feeds, you will need to add the following function to your functions.php file:

 función wpbeginner_remove_version () return "; add_filter ('the_generator', 'wpbeginner_remove_version'); 

Adding this version will remove the WordPress version number from all the different areas of your site. Above is the correct way to remove WordPress version number.

Note:We still recommend that you update to the latest version of WordPress because it's the only guaranteed way to keep your blog secure.