Remove WordPress version from website header

WordPress leaves us the footprint of its trace in its code for its own purposes. But sometimes this might be a security threat on your website if the WordPress is not updated to its latest.If we are running the updated version of WordPress, which most of us recommend you to do, But if for some reason you are not using the updated version.

To remove WordPress version number from your header

. Open functions.php from your theme and add the following snippets

  1. remove_action('wp_head', 'wp_generator');
  2. function amkapps_remove_version() {
    return '';
    add_filter('the_generator', 'amkapps_remove_version');