How to: Hide WordPress version

In order to secure your blog, is it a good thing to hide the meta version appearing within the <head> and </head> html tag of your blog. Since WP 2.5, the version is inserted automatically, and can’t be removed as easily at before. Except if you use that hack !

This hack isn’t hard to do at all. Just open the functions.php file from your theme and add the following line of code:

remove_action('wp_head', 'wp_generator');

On the above code, I just used the remove_action to remove the wp_generator() function, which prints out WP version. As that function will now not be executed, the WordPress version will not be visible from your source code, and potential hackers will never know which version you are using.

Related Posts

Related Posts

No related posts.

One Response

Sep 21 2011 06:51

Can I add that line code anywhere?

Trackbacks:

Leave a Comment

* Name, Email, Comment are Required