Quick & Easy WordPress Version Number Removal (Step by Step)
How to Remove WordPress Version Number for Security (Step by Step)?

WordPress is one of the most popular content management systems, but its popularity also makes it a frequent target for hackers. By default, WordPress displays its version number in your site’s source code. While this may seem harmless, it can expose your site to unnecessary risks if attackers know which version you’re running.
The good news is that hiding your WordPress version number is quick and easy. In this guide, we’ll show you step by step how to do it.
Why Hide the WordPress Version Number?
Because WordPress is one of the most widely used web applications in the world, it naturally holds the title of being the most frequently searched for vulnerabilities. There are software programs that automatically scan source code.
Security Risks: If you are running an outdated WordPress version, attackers can exploit known vulnerabilities once they detect it.
Cleaner Source Code: Removing unnecessary meta information keeps your site’s code lean.
Professionalism: It’s a simple step that shows you care about your site’s security setup.
The WordPress version can be easily identified. Now, let’s get to the main problem: when users create custom themes or other custom plugins update their WordPress version, their plugins or sites may stop working. In such cases, they can’t update their WordPress version at all. This opens the door to security vulnerabilities. The presence of an outdated WordPress version will make your site a target.
We recommend that WordPress site owners use the latest version. Every updated version addresses a security vulnerability.
Now, let’s begin the steps necessary to easily remove your WordPress version.
Step 1: Check if Your WordPress Version is Visible
Now let’s see what the WordPress version looks like in your source code:
Open your website in a browser.
Right-click and select View Page Source.
Search (CTRL + F) for
generator
.If you see something like this:
<meta name="generator" content="WordPress 6.5.3" />
then your WordPress version is publicly visible.
Step 2: Hide WordPress Version with a Simple Code Snippet
The quickest method is to add a small code snippet to your theme’s functions.php file or a site-specific plugin.
Add this code:
// Remove WordPress version number
function remove_wp_version() {
return '';
}
add_filter('the_generator', 'remove_wp_version');
This removes the version meta tag from your site’s HTML source.
Step 3: Hide Version Number from Scripts and Styles
Even after removing the generator tag, WordPress may still append the version number to your CSS and JavaScript files. To fix this, add the following code:
// Remove WordPress version from scripts and styles
function remove_version_from_scripts($src) {
if (strpos($src, 'ver=')) {
$src = remove_query_arg('ver', $src);
}
return $src;
}
add_filter('style_loader_src', 'remove_version_from_scripts', 9999);
add_filter('script_loader_src', 'remove_version_from_scripts', 9999);
This ensures your theme and plugin files don’t reveal the version number.
Step 4: Use a Security Plugin (Optional)
If you prefer not to edit code, you can use a WordPress security plugin to hide the version number automatically. Some popular options include:
iThemes Security
Sucuri Security
All In One WP Security & Firewall
These plugins also provide extra protection such as malware scanning, firewall rules, and brute-force prevention.
Step 5: Keep WordPress Updated
While hiding your version number improves security, it is not a replacement for regular updates. Always:
Update WordPress to the latest version.
Keep plugins and themes updated.
Regularly back up your site.
The Easiest Way to Quickly Hide WordPress Version Number
It will allow you to remove malware in the simplest way possible, without fiddling with code, using a plugin. We recommend this method for all users. It’s completely risk-free and easy.
First, you download the Suciri plugin, or you can install it by searching for Suciri in the plugins section. The full name of the plugin is Sucuri Security – Auditing, Malware Scanner, and Security Hardening.
👉 Go to the Plugins menu, select “Add New,” then search for “Sucuri Security” in the search box.
For more information about WordPress, please click on the link 👉 Wordpress