WordPress Version Hide (No Plugin WP Hide Version)

If you regularly update your WordPress site, you may not need to hide WordPress versions or remove version numbers. Because with every WordPress update, developers fix known vulnerabilities. However, sometimes you don’t want to update your WordPress site to the latest version due to compatibility issues with the plugin or theme, in which case hackers try to find known vulnerabilities in your site to hack it.
Therefore, we recommend that you always keep your WordPress site up to date. How to hide WordPress version number in our article? We will explain the steps to hide the WordPress version .
How To Find The WordPress Version Of A Site?
There are many places where WordPress adds the version number to your site. In WordPress dashboard dashboard, meta section, RSS area and CSS resource extensions.
Most WordPress scripts and style sheets contain the WordPress version number. You can find the WordPress version number by viewing the page source on your site.
Your site’s RSS feed may contain your WordPress version number. To check this, type “yoursite.com/feed” in your web browser and you can see the version number under the title tag.
How to Remove WordPress Version Number?
There are several ways to remove the WordPress version number. In this article, we will show you the easiest ways to hide WordPress versions.
1. Removing WordPress version number from Meta and RSS
To remove the WordPress version number from your WordPress site, simply add the following code to your functions.php file.
1
2
3
4
|
function remove_wordpress_version() {
return ”;
}
add_filter(‘the_generator’, ‘remove_wordpress_version’);
|
Go to an appropriate section in the functions.php file and add the code.
2. Removing WordPress version number from Scripts and CSS
The above method will hide the WordPress version number from the title and RSS only. To remove the version number from CSS and source path, simply add the following code to your functions.php file.
1
2
3
4
5
6
7
8
|
//No WP Versioning From Scripts and CSS
function remove_version_from_style_js( $src ) {
if ( strpos( $src, ‘ver=’ . get_bloginfo( ‘version’ ) ) )
$src = remove_query_arg( ‘ver’, $src );
return $src;
}
add_filter( ‘style_loader_src’, ‘remove_version_from_style_js’);
add_filter( ‘script_loader_src’, ‘remove_version_from_style_js’);
|
By following two methods, you can completely hide or remove the WordPress version number from the header, RSS, CSS and scripts. Also, if you are getting errors in the current WordPress version for various reasons, you can review the article below to restore your WordPress site to a stable working version.
We hope this article helped you remove the WordPress version number. If you get an error, you can let us know by commenting.
Excellent web site. A lot of useful information here…