Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared Managed Cloud India
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Best lists Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Security · Guide

Does Hiding the WordPress Version Improve Security?

Short answer

Hiding the WordPress version removes a small clue for automated scanners, but it does not fix any weakness. WordPress prints its version in the generator tag, feeds, readme.html and asset URLs, and a plugin or one filter can strip it. Keep WordPress updated and add a firewall, since those are the defenses that stop attacks.

Key takeaways

  • WordPress prints its version in the generator tag, feeds, readme.html and ?ver= asset strings.
  • Hiding the version is security through obscurity: it slows scanners but fixes no weakness.
  • The the_generator filter has existed since WordPress 2.5.0 and covers pages, feeds and exports.
  • A plugin survives theme changes; code pasted into functions.php disappears on theme update.
  • Only the latest WordPress version gets security updates, so update before hiding anything.

Does hiding the WordPress version improve security?

Hiding the WordPress version helps a little, by removing a clue, but it does not fix any weakness on its own.

WordPress.org's hardening guide puts it plainly: security through obscurity is generally an unsound primary strategy, though obscuring information might help in some areas. Hiding the version sits in that second group.

A version number is not a flaw. It tells an automated scanner which release you run, so the scanner can check that release against known flaws. Removing it slows lazy scanners and clears an information-disclosure note in an audit.

The protection that holds is a patched site behind a firewall with strong logins. Hide the version after you have done that, not instead of it.

Where does WordPress show its version number?

WordPress shows its version in four places: the generator meta tag, RSS and Atom feeds, readme.html, and the ?ver= string on CSS and JavaScript files.

The generator tag sits in the head of every page, in a line that names WordPress and the version number. Anyone can see it with View Source.

The feeds carry their own generator line. The the_generator filter in WordPress covers seven output types: html, xhtml, atom, rss2, rdf, comment and export, according to the developer reference.

Asset URLs carry the version too, in strings like style.css?ver=7.1. That string exists so browsers fetch a fresh file after an update.

WPScan, the free WordPress scanner, checks whether the WordPress readme file is present on a site, as listed in its documentation. The file sits in the site root and names the release.

LeakWhat it showsHow to close it
Generator meta tagExact version in page headFilter or plugin
RSS and Atom feedsVersion in feed generator lineFilter or plugin
?ver= on CSS and JSExact build in asset URLsFilter or plugin
readme.htmlMajor version at site rootDelete the file

How do you remove the version with a plugin?

Install a plugin that strips the version from every leak at once, then check the page source to confirm it worked.

The Remove Version Info plugin on WordPress.org removes the version from the meta generator tag, the ?ver= query strings on CSS and JavaScript files, and the RSS feed generator tags. It also adds Content-Security-Policy and X-Content-Type-Options headers.

Install it from Plugins, then Add New, and activate it. Its plugin page lists the install steps: upload the file to wp-content/plugins, activate it, then open your home page and press CTRL+U to view the source.

The plugin page notes one limit: if you deactivate or uninstall it, the version information comes back. The version is hidden, not deleted from WordPress itself.

A plugin survives theme changes. The plugin page notes that code pasted into a theme file disappears when the theme is updated or changed, while a plugin works independently of the theme.

Before installing any plugin for this job, check its WordPress.org page for a recent update and a tested-up-to version that matches your WordPress release.

Remove Version Info reached version 1.2 and was last updated on 27 March 2025, according to its plugin page. A plugin that hides version data but is itself abandoned adds the very risk you are trying to remove.

How do you remove the version with code?

Add one filter that returns an empty string for the generator output, using a code snippet plugin or a small custom plugin.

WordPress filters the generator tag through the the_generator hook, which has existed since version 2.5.0. Returning an empty string from that filter empties the tag in pages and in feeds.

add_filter( 'the_generator', '__return_empty_string' );

Put the code in a code snippet plugin or a must-use plugin, not in your theme's functions.php file. Theme files are replaced on update, and the snippet would vanish with them.

Do not edit header.php to delete the meta tag by hand. Theme updates replace that file too, and the tag returns with the next update.

What about readme.html and the ?ver= strings?

Delete readme.html from your site root, and let the plugin or filter handle the ?ver= strings on assets.

The readme file is a core file that names the release, and WPScan flags it when it is present. Delete it through your host's file manager or over SFTP.

Check for it again after each WordPress update. Updates replace core files, so the file can return.

The ?ver= strings are handled by the same plugin or filter that hides the generator tag. The Remove Version Info plugin strips them from CSS and JavaScript URLs.

Removing ?ver= has a side effect worth knowing. Browsers use that string to tell a changed file from a cached one, so stripping it can leave visitors on a stale stylesheet after an update. Clear your cache after updates if styles look wrong.

Will hiding the version hurt SEO, caching or updates?

No, hiding the version does not hurt SEO or updates, but stripping ?ver= strings can cause stale cached files.

Search engines do not use the generator tag for ranking. Removing it changes nothing in search results.

Updates work the same with the version hidden. WordPress checks its own version internally, and the filter only changes what is printed in public pages.

Caching is the one area to watch. The ?ver= string is a cache-busting tool, so removing it means a changed stylesheet can keep its old URL. If a design change does not appear, clear the site cache and the browser cache.

What should you do instead of relying on hiding the version?

Update everything, use strong logins, and add a firewall, since those are the defenses that stop attacks.

WordPress.org's hardening guide states that only the latest WordPress version is maintained with security updates. Automatic updates have existed since WordPress 3.7, so turn them on for core, plugins and themes.

Most flaws live in plugins, not in WordPress itself. Patchstack counted 11,334 new WordPress vulnerabilities in 2025, and 91% of them were in plugins, with only 6 in WordPress core, according to its State of WordPress Security in 2026 report.

A firewall blocks the probes that a hidden version only slows down. Wordfence's free version includes a firewall and a scanner that checks files against more than 44,000 known malware variants. Its free Threat Defense Feed updates are delayed by 30 days.

Learn how long each release is supported in this guide to how long a WordPress version is supported.

See the usage share of each version in WordPress version usage.

How do you check that the version is hidden?

Open your home page, view the source, and search for the word generator and for ?ver=.

In most browsers, press CTRL+U to view the source, then CTRL+F and search for generator. The meta tag should be gone from the head.

Open your feed at yoursite.com/feed/ and search the source the same way. The generator line should be empty or missing.

Check an asset URL in the source. Stylesheet and script links should no longer carry a ?ver= string with your version number.

Run an outside scan for a second opinion. WPScan checks the WordPress version, installed plugins and themes, and whether the readme file is present, and its free API token allows 25 requests a day.

What mistakes should you avoid?

The main mistake is treating a hidden version as security, and skipping updates because the version no longer shows.

Avoid these four:

  • Hiding the version on an old, unpatched WordPress and calling the site secure
  • Pasting the filter into functions.php, where a theme update deletes it
  • Editing header.php by hand, which a theme update also replaces
  • Deleting readme.html once and never checking whether an update restored it

Hiding the version is one line in a hardening checklist. Pair it with the steps in the guide to set up the Wordfence firewall, and keep the site updated.

Add the headers the plugin sets by hand with the guide to add security headers.

Frequently asked questions

Does hiding the WordPress version stop hackers?

No. The version number only tells a scanner which release you run. A hidden version on an old WordPress is still open to every known flaw in that release, so updates matter far more than hiding the number.

Is it safe to remove the version number completely?

Yes, that is fine. Removing the version number is a normal hardening step, and WordPress does not need the public generator tag for anything. Your dashboard still shows the installed version to admins.

Will hiding the version break my theme or plugins?

Yes, the filter is a standard WordPress hook and does not change how pages load. The only side effect is on caching: without ?ver= strings, a changed stylesheet can stay cached, so clear the cache after design updates.

Does hiding the WordPress version affect SEO?

No. The version number is not a ranking factor, and search engines never used the generator tag. Removing it changes nothing in search results or in how Google crawls the site.

How do I remove readme.html from my site?

Delete readme.html from the site root through your host's file manager or SFTP, then check again after each WordPress update, since updates replace core files and can restore it.

Sources

  1. Hardening WordPress WordPress Developer Resources
  2. the_generator WordPress Developer Resources
  3. Remove Version Info WordPress.org
  4. Installing WPScan WPScan
  5. Patchstack Patchstack
  6. Wordfence Security WordPress.org

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

WPLegible editors

Researched from the primary sources listed above and checked against our editorial rules. About the site · How we test