Fill in the form below to make an enquiry or find my contact details on my contact page.

  • This field is for validation purposes and should be left unchanged.

Freelance WordPress Developer

Remove publicly displayed version of WordPress is another anti-hack

Another anti-hack hack is this handy security obscurity snippet that will hide the version of WordPress you’re using this hidden process makes it harder for hackers to exploit security issues and holes in older versions of WordPress.
By default, WordPress leaves this option on your site for the sake of tracking and updating. Sometimes this option might be lead to a security leak on our WordPress site just in case if we are not running the most updated version of WordPress.
The code below will remove the version from the code source and also from the WordPress RSS feed. We just need to add this code snippet to your WordPress theme’s functions.php file.

Remove Publicly Displayed Version of WordPress code snippet:

 * Remove the WP version for extra WordPress Security
if ( ! function_exists( 'ns_remove_wp_version' ) ) {
function ns_remove_wp_version() { 
 return ' '; 
add_filter( 'the_generator', 'ns_remove_wp_version' ); 

NOTE: The only way to ensure your site is secure is to maintain the site and up-to-date WordPress to the latest version, and also to have a strong username and password.

Read more here about WordPress codex “File Header”

Thank you for seeing my code snippet and feel free to share and comment :). Do you have a code snippet and you want to see it published on my site? I will be more than happy to do it please send me a message (here)



Hi, I'm a Freelance Web Developer and WordPress Expert based in London with a wealth of website development and support experience. I am great at problem solving and developing quick solutions.