Dukeo » WordPress » Hide WordPress Version: How To Do This Right

Hide WordPress Version: How To Do This Right

Steven 4 responses WordPress

WordPress updates are generally fixing some security bugs which are discovered from version to version. A lot of hackers are using some automated ways to check the WordPress version located between the <head> and </head> HTML tags of your blog.

Hiding the WordPress version of your blog is essential especially if you do not upgrade WordPress every time WordPress is updated.

To hide WordPress version from your pages head, you need to paste the following code in the functions.php file of your WordPress theme:

remove_action('wp_head', 'wp_generator');

If you enjoyed this article,
Get email updates

Join for Free »


  1. Rabeel Dennis

    WordPress is facing some serious issues with its security, thus your information is very helpful.

  2. Three Property

    This is a very useful feature and is also a great way to protect against exploits.

  3. Classifieds

    I copied above code in my functions.php file. Thank u for sharing this information.

  4. Natalie

    Thanks for this. My wordpress blog was hacked unfortunately 3 times and it left me with a lot of task to fix it and find the virus. This will help.