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.
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
On this page
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?
- Open your site
in a private window.
- View source
(Ctrl+U or Cmd+Option+U) and search for
generator. - Write down each tag
and its
contentvalue. - 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.
Each plugin does it its own way. The safest method is the plugin's own setting or documented filter. Search its options for "generator" or "meta tag" first.
- Slider plugins often have a setting or filter in the global settings. Test before using any snippet found online, since filter names change between versions.
- Page builders (WPBakery, Elementor, Divi) typically add a generator tag or body class. Look for a toggle in the builder's settings.
- Multilingual plugins (WPML and similar) may print a tag with plugin and version. Check current documentation.
Snippets that call plugin internals, such as removing an action from an object in a global variable, break whenever the plugin is refactored.
Package the snippet so it survives theme changes:
<?php
/**
* Plugin Name: Hide Generator Tags
*/
remove_action( 'wp_head', 'wp_generator' );
add_filter( 'the_generator', '__return_empty_string' );Activate it from the Plugins screen and deactivate to undo. A comment saying why it exists helps whoever maintains the site next.
What else leaks the version?
| Place | Notes |
|---|---|
?ver= in script and style URLs | Used 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 root | Many hosts delete them during updates, but check |
Plugin readme.txt files | Reveal versions to anyone who requests them |
| REST API and public feeds | Block 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?
- Take a backup
- Add the code
on staging, or in a small plugin you can disable.
- Reload the homepage
and check the source.
- Open a feed
such as
/feed/and check the generator element. - Test plugins
that depend on platform tags, such as some SEO or analytics tools.
Which tag comes from where?
| Tag source | Best way to remove |
|---|---|
| WordPress core | wp_generator action and the_generator filter |
| WooCommerce | Usually covered by the same filter; verify in source |
| Slider plugins | The plugin's global setting or documented filter |
| Page builders | A toggle in the builder's settings |
| Multilingual plugins | Current 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.
Updates, monitoring and a firewall from engineers on call.
For more, see our support team and security service.
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 answerHow 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 answerCan 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 answerWill 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 answerHow 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 answerShould 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 answerWhat 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 answerHow 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 answerDoes 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 answerIs 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 answerKeep reading
Want an engineer on it?
Tell us what is wrong in plain words. A person reads it, today.