Remove the WordPress Info

How to Remove the WordPress Generator

Don’t let hackers see what version of WP you are running

The WordPress generator by default places a line of code in yourtag that displays the version of WordPress that you are running. However, that presents a potential problem because you are letting hackers know what version you are running. Therefore, if there are any vulnerabilities in the version you are running, you’re at risk of being hacked.

I strongly suggest for security reasons that you remove the WordPress generator function that generates this line of code. It is very easy to do, and only requires one line of code to be added to the function.php file.

The default WordPress generator line of code looks like this:

Just open the functions.php file with your text editor located in your WordPress install folder. Add the following code and place it between the tags.

Code to add to the functions.php file:
remove_action(‘wp_head’, ‘wp_generator’);

When people look at your source code, they won’t be able to see the version of WordPress that you are using. That’s, one less thing to worry about!

Leave a Reply

Your email address will not be published. Required fields are marked *