Remove WordPress Version – Hide Generator Meta Tag

Beskrivning

WordPress tells everyone which version you are running. It prints a meta tag in
your page source:

<meta name="generator" content="WordPress 6.9" />

and it appends the same version to every stylesheet and script URL:

style.css?ver=6.9

Anyone can read it, including automated scanners looking for sites running a
version with a known vulnerability. This plugin removes all three.

What it removes

  • The generator meta tag from your page source
  • The version string from stylesheet URLs
  • The version string from script URLs

Each one is a separate switch. All three are on from the moment you activate it.

Why hide the WordPress version

Scanners fingerprint sites by version, then try exploits for that version. Hiding
it will not patch anything, so keep WordPress updated regardless. What it does is
stop your site appearing in the results when someone searches for every site
running a specific vulnerable release.

Removing the version from asset URLs has a second effect: proxies and CDNs cache
those files more predictably when the URL stops changing on every core update.

Settings

One screen, three checkboxes, under Settings then Generator Remover. Nothing is
written to your theme and no files are edited. Deactivate the plugin and
WordPress puts everything back immediately.

Installation

  1. In your WordPress admin, go to Plugins then Add New, and search for
    ”Remove WordPress Version”.
  2. Click Install Now, then Activate.
  3. That is all. All three options are on immediately. To change them, go to
    Settings then Generator Remover.

To install manually instead, upload the plugin folder to
/wp-content/plugins/ and activate it from the Plugins screen.

Vanliga frågor

How do I hide the WordPress version?

Activate the plugin. All three options are on by default, so the generator meta
tag and the version strings on your CSS and JavaScript files are removed straight
away. To check, view the source of your home page and search for ”generator”.

How do I remove the generator meta tag only?

Go to Settings, then Generator Remover, and untick the two version options. Leave
”Hide WP Generator Version Meta” ticked and save.

Does hiding the version actually make my site more secure?

It removes one signal that automated scanners use to pick targets. It does not
patch anything. Treat it as one small step, and keep WordPress, your theme and
your plugins updated.

Will removing ?ver= from my CSS and JS break caching?

No. It usually improves it, because the URL stops changing every time WordPress
updates. If you use a cache plugin that adds its own version or cache-busting
string, that keeps working.

Does this affect my SEO?

The generator tag is not a ranking factor, so removing it changes nothing on its
own. Shorter, stable asset URLs are marginally friendlier to caches, which helps
page speed.

My theme still shows the version somewhere else

Some themes and plugins print their own version tags. This plugin removes the
ones WordPress core adds. If you still see a version after activating it, it is
coming from your theme or another plugin.

Does it work on multisite?

Yes. Settings are per site, so each site in the network has its own.

Recensioner

Läs alla 2 betyg

Bidragsgivare och utvecklare

”Remove WordPress Version – Hide Generator Meta Tag” är programvara med öppen källkod. Följande personer har bidragit till detta tillägg.

Bidragande personer

Ändringslogg

2.1.1

  • Rewrote the plugin listing so people searching for ”remove WordPress version”
    or ”hide generator meta tag” can find it. No change to how the plugin works.
  • The plugin is now called Remove WordPress Version – Hide Generator Meta Tag.
    Your settings, and the plugin folder, are untouched.

2.1.0

  • Fixed: the plugin did nothing on a fresh install. Default settings were never
    written, because the activation hook was registered from inside the class
    constructor and so never ran. All three options now default to on, and the
    defaults are seeded properly on activation.
  • Fixed: settings checkboxes always rendered as ticked and could not be
    switched off. The saved value is now read instead of merely testing whether
    the key was present.
  • Fixed: unticking a box now persists. Saved settings are validated through a
    sanitize callback that records each switch as 1 or 0.
  • Fixed: version strings were left on asset URLs that begin with ”ver=”, and
    unrelated arguments ending in ”ver=” could be stripped by mistake.
  • Tested up to WordPress 7.1. Declared a minimum of PHP 7.0.
  • Note: WordPress script modules, used by some block themes, carry their
    version in a URL that plugins cannot filter. Those few URLs keep their
    version string. Classic stylesheets and scripts are handled as before.

2.0.1

  • Minor fixes.

2.0.0

  • Settings screen added for enabling and disabling each option.