Hide WordPress version with a simple function. In general, hiding or removal of WordPress version might be a minor but still useful step to increase WordPress security and slow down WordPress vulnerability. Some potential vulnerabilities might get associated with a particular WordPress version, and by hiding the version, you are decreasing the probability of being attacked or even hacked. Just an example. If hackers got to know that a particular version of WordPress has a vulnerability, and they have a strategy to work with it, they may start scanning hundreds of WordPress website searching for that particular built. By hiding the WordPress version on your website, you can slow down the hacking experience.
How I can find the current version of my WordPress?
Open the website, do right mouse click, and press “View Page Search”. Do a search for the word “generator” on the source page to find the current WordPress version.
How to hide WordPress version and slow down WordPress vulnerability?
You just simply need to modify the “the_generator” hook by adding the code below to your theme “functions.php” file. You could add the code to the very bottom of your “functions.php” files.
Here is the code:
/* Hide WordPress Version */ function remove_version() { return ''; } add_filter('the_generator', 'remove_version');
Before:
<
meta
name
=
"generator"
content
=
"WordPress 5.1"
/>
After:
<
meta
name
=
"generator"
content
=
""
/>
Leave a Reply