← All articles

Hiding WordPress Version Does Not Stop Automated Attacks

Hiding WordPress Version Does Not Stop Automated Attacks

Hiding the WordPress version can remove a few public clues about a website, but it does not stop automated attacks. Sucuri’s security guidance says the measure is a limited extra layer, not a substitute for updates, access controls, a web application firewall or monitoring.

Security through obscurity means trying to improve security by hiding details such as the software version, folder names or login location. Hardening takes the opposite approach: making the site difficult to attack even when those details are known. Sucuri describes obscurity as harmless and sometimes useful when it sits on top of controls that address real vulnerabilities. The danger is treating it as an alternative to updating. Removing a generator tag can make a scan report look quieter while an outdated plugin remains vulnerable for months.

WordPress exposes its version in several ordinary places. The homepage may contain a generator meta tag in its HTML source. RSS and Atom feeds, normally available at /feed/, include a generator element whose URL carries the version. The web root also contains a readable readme.html file on many installations, often providing a direct way to identify the release. Core scripts and styles loaded from wp-includes commonly include a ?ver= parameter matching the WordPress version. Plugins and themes can publish their own versions through similar asset URLs. Other clues include login-page markup, the responses from REST API routes, and the set of core files present on the site.

Website owners who still want to remove some of these signals can place the changes in a child theme’s functions.php file or, preferably, a small site-specific plugin that survives a theme change. Sucuri recommends removing the wp_head action for wp_generator and applying the the_generator filter so it returns an empty string. The filter matters because removing only the page-head tag leaves feeds announcing the version.

The readme.html file can be deleted, although a core update may restore it. A server rule is more durable. On Apache, the guidance gives a .htaccess rule using Require all denied for that file. On nginx, the equivalent is a location rule that returns a 404 response. Site owners should check the syntax against their host’s documentation because control panels may manage these files.

The ?ver= parameters need more care. They help browsers and content delivery networks, or CDNs, recognise when a file has changed. Removing them can leave some visitors with an old copy of the site’s CSS, producing a broken-looking layout for some people but not others. If the parameters are removed, they should be replaced with a value that changes when the file changes, such as a file hash or modification timestamp. Otherwise, leaving them in place is safer.

Hiding the WordPress version does not stop scanning for three main reasons. First, WordPress can be fingerprinted without its version being openly displayed. Each release has known files and contents, and checking those files, endpoint behaviour, login-page markup and bundled assets can identify a small range of versions in only a handful of requests.

Second, much automated traffic does not identify the version before attacking. Mass scanners request known vulnerable paths directly, such as a plugin’s mishandled admin-ajax action, an unauthenticated REST route in a page builder or an upload handler in an abandoned gallery plugin. These requests arrive whether the site has that plugin and whether its WordPress version is visible. Dedicated WordPress vulnerability scanners also probe for plugin and theme files, then compare what they find with a vulnerability database.

Third, WordPress core is often not the weak point. Minor core releases are automatically applied on most installations, so the reported core version may already be current. Plugins and themes are more likely to be outdated, and their asset URLs and readme files can reveal their versions independently of the WordPress generator tag.

Sucuri ranks the practical priorities clearly. Update WordPress core, plugins and themes quickly, since many compromises involve a known vulnerability with an available patch. Delete unused components because a deactivated plugin remains on disk and may still be reachable. Replace abandoned software and avoid unofficial software, which can arrive with problems already installed.

Next, protect sensitive areas with multi-factor authentication, which requires an additional proof of identity beyond a password, rate limiting on login attempts and fewer administrator accounts. A web application firewall can block requests matching known exploit patterns before they reach PHP, helping cover the gap between a vulnerability becoming public and an update being installed. File integrity monitoring can identify unexpected changes to website files, while an activity log records changes by users. Tested off-site backups provide a recovery option if the site is compromised.

Limited measures can still be worthwhile. Removing version information from generator tags, restricting access to readme.html, disabling directory listing, preventing PHP errors or debug information from appearing publicly, and avoiding the exposure of administrator accounts can reduce unnecessary information. They should not take priority over patching and access protection. Renaming core WordPress directories, relying on a hidden login URL instead of rate limiting and multi-factor authentication, or stripping asset version parameters without proper cache control generally adds complexity without addressing the underlying risk. Plugins that promise to hide WordPress entirely should be treated cautiously, with their settings reviewed before activation.

For example, if a scanner reports the core version and an outdated plugin with a publicly documented vulnerability, removing the generator tag may eliminate only the first report. The plugin remains exposed, so the attack that worked before the change can still work afterward. AEU Hosting provides managed WordPress hosting secured end to end, which is relevant for site owners who want the hosting layer included in their WordPress security arrangements.

The bottom line is straightforward: hiding the WordPress version is acceptable as an additional precaution, but it is not a defence against known vulnerabilities. Keeping core, plugins and themes updated, removing unused or abandoned code, limiting administrator access, filtering malicious requests and watching for unexpected changes address the risks that version hiding cannot.

Also available in: DeutschItalianoShqip