How to Hide WordPress Version Number Manually

March 6, 2024 / WordPress

In this tutorial, we will explain how to hide the WordPress Version number manually. We employ the “security through obscurity” approach to lessen potential vulnerabilities, and you can hide your WordPress version number using the following methods-

  1. By modifying the Generator Meta Tag-
    If you are adept at coding, you can manually eliminate the WordPress version number from the generator Meta tag by following these steps-

    1. Navigate to the WordPress themes directory at /wp-content/themes/.
    2. Insert the following line of code at the end of the activated WordPress theme’s functions.php file-
      remove_action(‘wp_head’, ‘wp_generator’)
  2. By employing a function that removes the version number-
    1. Navigate to the WordPress themes directory at /wp-content/themes/.
    2. Insert the following code at the end of the activated WordPress theme’s functions.php file-
      function remove_version_info() {
      return ”;
      }
      add_filter(‘the_generator’, ‘remove_version_info’);

Note- Do not modify any settings or files unless fully confident in their purpose and necessity.

Was it not easy? If you have any queries, feel free to contact our support staff at your earliest. They are available 24X7.

 

Spread the love