Skip to content
Security

Remove meta generator tags from WordPress and plugins

How to remove generator meta tags from WordPress, WooCommerce and page builders, why it is hygiene rather than security, and how to verify the result.

By WP24×7 engineers4 min readPublished August 9, 2020Updated November 29, 2026

At a glance

A generator meta tag is a line in your page head naming the software and version, and several plugins add their own. Remove the WordPress one with two lines in a small plugin or child theme, use each plugin's own setting for the rest, then confirm in the page source and feeds. This is hygiene, not protection: updates, strong logins and a firewall matter far more.

Updated November 29, 2026 · For WordPress site owners and developers

  • For owners and developers removing generator tags from WordPress and plugins
  • Core code remove_action( 'wp_head', 'wp_generator' ) plus the_generator filter
  • Other plugins use the plugin's own setting or documented filter first
  • Honest value hygiene, not protection; no effect on SEO
  • Check page source, /feed/, and again after major updates
  • Safety back up, use a small plugin you can disable
  • Help security service and WordPress support

A generator meta tag is a line in your page head such as <meta name="generator" content="WordPress 6.x">. Several plugins add their own. Remove the ones you do not want with a hook in a child theme or small plugin, then confirm in the page source.

Why remove generator tags?

They tell anyone viewing your source, and any automated scanner, what software and version you run, which makes it cheaper to target a known weakness in an outdated plugin. Be realistic: attackers fingerprint WordPress in other ways, such as file paths, script URLs and readme.txt files, and hiding a vulnerable plugin's name will not save you whereas updating will. Use this alongside updates and hardening, not instead of them.

How do I find which tags exist?

  1. Open your site

    in a private window.

  2. View source

    (Ctrl+U or Cmd+Option+U) and search for generator.

  3. Write down each tag

    and its content value.

  4. Repeat on a shop or product page

    if you run a store, since some plugins add tags only where used.

Do this before and after the change.

How do I remove the tags?

remove_action( 'wp_head', 'wp_generator' );
add_filter( 'the_generator', '__return_empty_string' );

The first line removes the tag from the page head. The second empties the generator string everywhere WordPress prints it, including RSS feeds, which carry a <generator> element. Put it in a site plugin or child theme, never the parent theme or core files. WooCommerce adds its version through the generator filters, which the filter above covers in current releases. Check your own source to confirm. If a WooCommerce tag survives, see removing version numbers.

What else leaks the version?

PlaceNotes
?ver= in script and style URLsUsed for cache busting; the security gain from removing is small and stale assets are a real risk
readme.html and license.txt in the site rootMany hosts delete them during updates, but check
Plugin readme.txt filesReveal versions to anyone who requests them
REST API and public feedsBlock with a firewall or server rule if needed

Keep the real defenses in place: updates, backups and limited admin accounts.

How should I test the change?

  1. Take a backup
  2. Add the code

    on staging, or in a small plugin you can disable.

  3. Reload the homepage

    and check the source.

  4. Open a feed

    such as /feed/ and check the generator element.

  5. Test plugins

    that depend on platform tags, such as some SEO or analytics tools.

Which tag comes from where?

Tag sourceBest way to remove
WordPress corewp_generator action and the_generator filter
WooCommerceUsually covered by the same filter; verify in source
Slider pluginsThe plugin's global setting or documented filter
Page buildersA toggle in the builder's settings
Multilingual pluginsCurrent plugin documentation

Worked example: before and after

A store's source shows three generator tags: WordPress with its version, WooCommerce and a slider plugin. After adding the two lines in a small plugin, the WordPress and WooCommerce tags disappear from the page and from /feed/. The slider tag remains because that plugin prints it by its own method. Its global settings have an option to hide it, which is the right fix, and a second look confirms all three are gone. Recording before and after in a short note makes later updates easy to check, because an update can bring a tag back.

Is it worth doing, and does it matter for SEO?

For most sites, a little. It takes minutes and does no harm, but it sits after the work that protects a site: install updates, use unique strong passwords with two-factor sign-in, remove unused plugins, keep tested off-site backups and monitor for changes. It does not affect SEO: search engines do not use the generator tag, and some audit tools may report the platform as "unknown", which is the intended effect.

Want hardening beyond cosmetic changes?

Updates, monitoring and a firewall from engineers on call.

For more, see our support team and security service.

FAQ

Questions people ask

11 answers. Can't find yours? Ask an engineer.

Does removing the generator tag stop hackers?

No. It removes one easy label, but attackers probe for known plugin files and behavior directly. Updates, strong logins and a firewall matter far more.

Link to this answer
How do I know which plugin prints a generator tag?

View the page source, search for generator, and note the content value. The plugin name or version in that tag points to the plugin that adds it.

Link to this answer
Can removing the tag break anything?

Rarely. A few tools and some support teams use it to identify the platform, so keep a note of your own versions elsewhere.

Link to this answer
Will a plugin update bring the tag back?

It can. Plugins sometimes change how they print the tag. Check the page source again after major updates.

Link to this answer
How do I remove the WordPress generator tag?

Add remove_action( 'wp_head', 'wp_generator' ) and add_filter( 'the_generator', '__return_empty_string' ) in a site plugin or child theme, never the parent theme or core files. The second line also clears feeds.

Link to this answer
How do I remove tags added by sliders, page builders or multilingual plugins?

Use the plugin's own setting or documented filter, found in its documentation or options. Avoid snippets that call plugin internals, since they break whenever the plugin is refactored, and test before using any snippet from the web.

Link to this answer
Should I strip ?ver= from script and style URLs?

The security gain is small and the risk of stale assets is real, since the value is used for cache busting. If at all, remove only the WordPress core version and keep plugin and theme versions.

Link to this answer
What else leaks the version?

readme.html and license.txt in the site root, plugin readme.txt files, the REST API and public feeds. A web application firewall or server rule can block those requests.

Link to this answer
How should I test the change?

Take a backup, add the code in a small plugin you can disable, reload the homepage and check the source, open /feed/ and check the generator element, and test any SEO or analytics tool that depends on the platform's tags.

Link to this answer
Does it matter for SEO?

No. Search engines do not use the generator tag for ranking, so removing it neither helps nor harms visibility. Some audit tools may report the platform as unknown, which is the intended effect.

Link to this answer
Is it worth doing at all?

For most sites, a little. It takes minutes and does no harm, but it sits after updates, unique strong passwords with two-factor sign-in, removing unused plugins, tested off-site backups and monitoring.

Link to this answer

Keep reading

Want an engineer on it?

Tell us what is wrong in plain words. A person reads it, today.