How to Hide WordPress Version Number: A Complete Guide
One of the most important steps to improve your WordPress security is to hide or remove the WordPress version number. Hackers often scan websites to detect outdated WordPress versions and exploit known vulnerabilities.
If you regularly update your WordPress site, you may not need to hide the version number, since every update fixes potential security issues. However, in some cases, you may not want to update immediately due to plugin or theme compatibility. In such situations, hiding your WordPress version is highly recommended.
In this guide, we will explain how to find your WordPress version and how to hide or remove the version number step by step.
How to Find the WordPress Version of a Website?

WordPress automatically adds the version number in several places on your site. You can usually detect it in:
• The WordPress admin dashboard
• Meta section
• RSS feed
• CSS and JavaScript file extensions
You can also view the page source of your website to locate the version. Additionally, check your RSS feed by typing:
yoursite.com/feed
into your browser. You will see the WordPress version displayed under the title tag.

How to Remove or Hide WordPress Version Number
There are several methods to remove or hide the WordPress version number. Below are the easiest and most effective solutions.
Remove WordPress Version from Meta and RSS
To remove the WordPress version number from your meta tag and RSS feed, simply add the following code to your functions.php file:
// Remove WordPress version from meta and RSS
remove_action('wp_head', 'wp_generator');
This code will prevent WordPress from displaying the version number in your site’s header and RSS feed.
Remove WordPress Version from CSS and JS Files
The above method only removes the version number from the meta section and RSS feed. However, WordPress also appends version numbers to CSS and JavaScript file URLs. To hide these, add the following code to your functions.php file:
// Remove WordPress version from CSS and JS files
function remove_wp_version_strings( $src ) {
if ( strpos( $src, 'ver=' ) )
$src = remove_query_arg( 'ver', $src );
return $src;
}
add_filter( 'script_loader_src', 'remove_wp_version_strings', 9999 );
add_filter( 'style_loader_src', 'remove_wp_version_strings', 9999 );
With this code, version numbers will be completely removed from your CSS and JS sources.
Final Thoughts: Is Hiding the WordPress Version Necessary?
If you always keep your WordPress site up to date, hiding the version number is not strictly necessary, since updates automatically fix vulnerabilities. However, if you are unable to update your site immediately, removing the WordPress version number can add an extra layer of protection.
Share Post:The best security practice is still to update WordPress regularly and use trusted security plugins.