Recommended Free Tools
Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
To remove WordPress’s core generator tag, add remove_action( 'wp_head', 'wp_generator' ); in a small site-specific plugin or a child theme. This removes the generator output from the page head without editing WordPress core. It does not guarantee that every WordPress version string disappears from feeds, scripts, stylesheets, themes, or plugins.
Remove the generator tag with WordPress’s hook
WordPress runs wp_generator() on the wp_head action. The function reference documents the hook and shows the following removal example: WordPress Developer Resources: wp_generator().
<?php
remove_action( 'wp_head', 'wp_generator' );
Place this code in one of these locations:
- A site-specific plugin: best when the setting should survive theme changes.
- A child theme’s
functions.php: suitable when the behavior belongs to that theme.
Do not modify files in the WordPress core directory. Core updates overwrite those changes.
What this code actually removes
The action suppresses the core generator output added to the page head. It is the appropriate answer when your goal is specifically to remove the standard generator meta tag. It is not a universal filter for every version-bearing response.
#1 Best Overall
Why the version may still be visible
WordPress’s generator function supports more than one output format. Its official reference describes version-bearing generator output for HTML, XHTML, Atom, RSS2 and RDF: get_the_generator().
Version information can also be added independently by a theme or plugin. Asset URLs commonly include a query string such as ?ver=6.x.x on stylesheet and script URLs. Removing the head generator does not automatically remove those parameters.
Rank #2
Choose between a hook and a plugin
| Approach | Coverage | Advantages | Trade-offs |
|---|---|---|---|
| Core hook | Removes the core generator output from wp_head |
Minimal code, no additional dependency, easy to audit | Does not address feed generators, asset URL versions, or tags emitted by themes and plugins |
| Version-removal plugin | The plugin listing describes separate controls for the generator meta tag and script/style URL version strings | Settings interface and broader configured coverage | Introduces a dependency; compatibility, maintenance and coverage vary by site |
The WordPress.org listing for Remove WordPress Version – Hide Generator Meta Tag describes those controls and notes that themes and plugins may emit their own tags. It also documents a limitation affecting certain script-module URLs. Treat these statements as the plugin publisher’s description, and review the current listing and your site’s asset and caching setup before installing it. The directory’s broader meta generator category contains other plugins with different scopes and compatibility reports; those directory figures can change and do not establish security effectiveness.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Verify the public outputs after changing it
Check the outputs that matter for your site rather than assuming one hidden tag means all version information is gone.
- Open a publicly accessible page and use View Page Source (not only the browser’s live DOM inspector).
- Search the source for
generatorand confirm that the core generator meta tag is absent. - Inspect stylesheet and script URLs for
?ver=or another version parameter. - Open any feeds your site publishes and inspect their source for generator entries. The supported formats are documented in WordPress’s get_the_generator() reference.
- If a string remains, temporarily identify whether it comes from a theme, plugin, feed handler or asset-enqueue routine before changing more code.
Clear caches before judging the result
Page-cache, reverse-proxy and CDN layers can continue serving HTML generated before the change. Purge the relevant caches, then recheck an uncached or freshly fetched response. A cached page can make a correct change appear ineffective.
What version hiding does—and does not—do for security
Removing a visible version signal is a limited fingerprinting reduction. It does not patch WordPress, a theme or a plugin, and it cannot guarantee that visitors or attackers will be unable to identify the software or its version. The plugin listing itself recommends keeping all components updated: Remove WordPress Version – Hide Generator Meta Tag.
Rank #4
- Keep WordPress on a supported, current release.
- Update themes and plugins promptly, using reputable sources.
- Remove unused plugins and themes rather than merely hiding their versions.
- Use access controls, backups and monitoring appropriate to the site.
Also avoid assuming that deleting asset query strings automatically improves caching. Whether that helps depends on the cache, CDN and deployment configuration, and the sources do not establish a universal performance benefit.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Troubleshoot a version that remains
The generator tag is still in page source
- Confirm the code runs on the front end and is not inside an inactive plugin or unactivated child theme.
- Check for a syntax error or a plugin load-order issue.
- Purge page and CDN caches, then fetch the source again.
- Look for a second generator tag emitted by a theme or plugin.
Only scripts or styles show a version
Those values are asset URL arguments, not the wp_head generator output. The hook above does not remove them. Handle them only after checking why the site uses them and whether your caching system depends on them; a plugin may offer a setting for this, but compatibility must be evaluated on the individual site.
Best Value
A feed still exposes a generator
That is expected if you removed only the head action. Inspect the feed’s generating code and test the specific feed format; do not assume a front-page change applies to Atom, RSS2 or RDF output.
Bottom line
Use the documented remove_action( 'wp_head', 'wp_generator' ); hook in a site-specific plugin or child theme when you need to remove the standard WordPress generator tag. Then inspect pages, assets and feeds separately. Treat the result as information-hiding only, never as a substitute for timely WordPress, theme and plugin updates.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.

