=== Feint Security ===
Contributors: jedfolio
Tags: security, hide wordpress, hide login, hardening, bots
Requires at least: 6.9
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.10.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Bots pick targets from the clues your site gives away. Remove the main ones, move your login page and count the bots that probe. No code, reversible.

== Description ==

Right now, a bot is reading your site. It does not know you and it does not care. In a few seconds it spots the clues every WordPress site gives away: a generator tag, a login page at a famous address, a comment signed by a plugin with its version number. Then it files your site on a list: WordPress, this plugin, this version.

You never see that moment. You see the next one: a flaw is published in that plugin, and every site on the list can be tried within hours.

**What if your site gave away fewer of those clues?**

Feint Security removes the clues bots read first, so your site stops looking like an easy WordPress target.

= In two minutes =

Activate the plugin, open Getting started, pick a mode, choose the software to imitate and turn masking on. From that moment, logged-out visitors and bots get a different site:

* The WordPress generator tag and version are gone from your pages and feeds.
* Your pages announce Joomla!, Drupal, TYPO3, PrestaShop or MediaWiki instead, with the exact tag that software prints.
* The signed comments and generator tags of plugins such as Yoast SEO, Elementor or LiteSpeed Cache disappear from the source code.
* The remote editing link (RSD) and the shortlinks WordPress adds to your pages are removed, and pingbacks are switched off.
* The Bot traps tab starts counting the bots that come looking for flaws.

You keep working as usual: while you are logged in, you see the real site.

= Hide WordPress =

The generator tag and version disappear from pages and RSS or Atom feeds. So do the remote editing link (RSD), shortlinks, the "X-Redirect-By: WordPress" header, the debugging comments recent WordPress versions add to inline scripts and styles, and their loading markers (data-wp-strategy). WordPress-specific body classes (wp-singular, page-id-12, wp-theme-...) are removed only when the stylesheets and scripts your site loads on the page have all been read and none of them uses the class.

*Why it matters:* these are the first things detection tools read, and they are markers: your pages do not need them to work.

= Look like another CMS =

Choose Joomla!, Drupal, TYPO3, PrestaShop or MediaWiki, with a version number if you wish, or type a name of your own. Your pages and feeds then carry the generator text exactly as that software prints it.

*Why it matters:* a bot that believes your site runs Joomla! tries Joomla! flaws, which your WordPress site does not have.

= Hidden login page =

Pick your own login address, such as /member-access/. First it works alongside wp-login.php. One step further, wp-login.php, the screens of wp-admin and the usual guesses (/login, /admin, /dashboard) answer logged-out visitors with your site's own "page not found", like any address that does not exist. AJAX, forms and password-protected posts keep working. Addresses already used by a page, a post or a folder are refused, with free alternatives suggested, and a page or post created later cannot take the address.

*Why it matters:* password-guessing bots aim at wp-login.php. When it answers "not found", they have nothing to try.

= Traces of the 50 most used plugins and themes =

The catalogue covers the 50 most installed plugins and themes on wordpress.org. Those that sign your pages with a generator tag, a signed HTML comment or a brand marker (Elementor, Yoast SEO, WooCommerce, LiteSpeed Cache, Site Kit, Rank Math, Jetpack, All in One SEO and others) have that signature removed; where a plugin has a setting of its own for it, that setting is used first, so the pages your cache stores are clean too. Many plugins add no such signature and only show through their file addresses, CSS classes or scripts (Contact Form 7, for example), which this plugin does not change. The Identity tab lists your active plugins and theme and tells you, for each one, what is hidden and what detection tools can still see.

*Why it matters:* "plugin X, version Y" is exactly what attack lists are built on.

= Fewer doors to knock on =

Pingbacks are disabled and their header removed. XML-RPC, an old entry point often used for password guessing, can be blocked in one click (it also cuts off Jetpack and the old WordPress mobile app, and the settings screen says so). The same level closes wp-mail.php, the address of the "post by e-mail" feature (unless you have set that feature up), as well as wp-trackback.php and wp-links-opml.php.

*Why it matters:* bots try the doors they know first. Closed doors mean less noise and fewer attempts.

= Bot traps =

Requests that only a bot makes are counted: the admin pages of the software you imitate (/administrator/ for Joomla!), probes for .env, .git, database dumps, phpMyAdmin or web shells, and visits to the WordPress addresses you closed (not from a browser that has signed in on your site before). A normal visit does not trigger a trap: only addresses that do not exist on your site are watched, and address parameters that only the imitated software uses. You see the last 30 days and the most targeted addresses. Requests that arrive at the same moment are all counted; during a flood, some may be left out rather than slow your site down, so the totals are a minimum.

*Why it matters:* you see what bots are looking for, and you see your disguise at work.

= Safe by design =

* **Tested before applied.** A new login address stays inactive until you have opened it once while logged in, so an address that does not work is never switched on.
* **A reminder by e-mail.** As soon as a new login address is in use, the administrators receive it by e-mail (the user who tested it and the site's administrator address), with the line that gets you back in if you are ever locked out. Developers can change or switch off this message with the `feint_login_mail` filter.
* **Emergency switch.** One line in wp-config.php turns every change off, even if you cannot reach your admin.
* **Nothing in WordPress core.** No core file is modified, and wp-config.php and the .htaccess file at the root of your site are never edited.
* **Admins see the real site.** Anyone who can edit posts sees the unmasked site, so the toolbar, the editor and previews keep working. Logged-in customers and members see the masked site, like visitors.
* **Fails safe.** Scripts, styles and structured data keep working as written: only comments, version numbers in file addresses and brand markers are removed, and the text of your pages (titles, articles, code examples) is left as it is. If a page cannot be processed safely, it is sent unchanged.
* **Reversible.** Turn masking off or deactivate the plugin and your site is exactly as before. Your settings stay until you delete the plugin.
* **Private.** No account, no tracking, no external call. Everything stays on your site.

= Who it is for =

Bloggers who want peace of mind. Small businesses whose site has to stay up. Online shops that cannot afford a hacked checkout. Agencies and freelancers who look after many sites and want a simple, safe baseline for each one. No code, no server file to edit, and it runs on shared hosting.

= Honest limits =

* Feint Security reduces automated targeting. It does not fix vulnerabilities: keep WordPress, your plugins and your theme up to date, and keep backups.
* No tool makes a site undetectable. A person who studies your pages can still find clues, such as CSS classes and JavaScript variables that plugins need to work.
* In this plugin, file addresses (/wp-content/, /wp-includes/) are not changed, and neither are the names WordPress gives to its own script modules. Detection tools that read them will still see WordPress, and the readme.txt of each plugin (this one included) stays readable there.
* The links that announce the REST API and oEmbed stay in your pages and headers.
* A few files of WordPress answer before any plugin is loaded, and still name WordPress when someone asks for them directly: /wp-admin/install.php, /wp-admin/upgrade.php, /wp-admin/load-styles.php and /wp-activate.php.
* The login page loses the WordPress version, its title and its "Powered by WordPress" link, but keeps the look of WordPress's form. While it stays at wp-login.php (before you move it), anyone can see it is a WordPress login.
* robots.txt keeps WordPress's own rules (Disallow: /wp-admin/), and the sitemap keeps its name wp-sitemap.xml: only the comments of plugins are removed there.
* Links WordPress e-mailed while the login was hidden (password reset, privacy request confirmation) use the hidden address or your home page: after you deactivate or delete this plugin, ask for a new link.
* Text your theme prints itself (a "Proudly powered by WordPress" footer, for example) is yours to edit.
* A page larger than 4 MB is sent as it is. To be cleaned, a page is held whole in memory before it is sent, as WordPress itself does for classic themes.
* Closed addresses answer with a copy of the "page not found" your site last sent to a visitor. Until a first visitor has asked for a missing page since your last change of settings, theme or plugins, the screens of wp-admin answer with a short "Not Found" instead, and so do all closed addresses while the maintenance mode of LightStart, Maintenance, SeedProd or CMP is on (the screens of wp-admin also during the "coming soon" mode of WooCommerce).
* If another plugin that moves the login page is active (WPS Hide Login, for example), this plugin leaves the login page to it.

= Free and Pro =

Everything above is complete in this plugin, with no licence key, quota or time limit. If you want to go further, WP Feint Pro is a separate paid plugin that includes this one and adds file address aliases that replace /wp-content/, a catalogue of 250 plugins and themes, 41 imitation profiles, two-step verification, login attempt limiting, AI crawler control and a member area to follow all your sites. Your settings carry over. Details on [wp-feint.com](https://www.wp-feint.com/).

== Installation ==

1. In your admin, go to Plugins > Add New Plugin, search for "Feint Security", then click Install Now and Activate. You can also upload the ZIP file in Plugins > Add New Plugin > Upload Plugin.
2. Open the Feint Security menu (mask icon in the admin sidebar).
3. Follow the Getting started screen. Nothing changes for visitors until you turn masking on.
4. When you save, the caches of the common cache plugins (LiteSpeed Cache, WP Rocket, WP Super Cache, W3 Total Cache and about ten others) are purged for you, and the Diagnostics tab has a button to do it again. Purge any other cache (host, CDN) from its own screen.

== Frequently Asked Questions ==

= Will it break my site? =

It is designed not to. Masking removes markers, not functions, and scripts and styles keep working as written. A body class is only removed when the stylesheets and scripts your site loads have been read and none of them uses it; if one of them cannot be read, or if a stylesheet comes from another website (other than a web font service), every class is kept. Two limits: a script loaded from another website cannot be read, and a script can build the name of a class while it runs instead of writing it. A script that goes through the classes of the page one by one is recognised (every class is then kept); for the other cases, a developer can list the classes to keep in the `feint_kept_body_classes` filter. The new login address is only enabled after you have tested it. If something still looks wrong, turn masking off: the site is back to normal at once.

= Does it work with caching plugins? =

Yes. The plugin uses the own setting of LiteSpeed Cache, WP Super Cache, W3 Total Cache and WP Fastest Cache to remove their signature comment, so the pages they store are clean. When you save the settings, the caches of the common cache plugins (LiteSpeed Cache, WP Rocket, WP Super Cache, W3 Total Cache and about ten others) are purged for you, and a button in the Diagnostics tab does it again on request; purge other caches (host, CDN) from their own screen. The new login page is never cached.

= Does it work with Cloudflare? =

Yes. Cloudflare delivers the masked pages as they are. If Cloudflare caches your HTML pages, purge its cache after changing settings so visitors get the masked version.

= Does it work with my host? =

The plugin works inside WordPress with standard hooks. It adds no server rule, edits no .htaccess file and makes no request from your server to itself, so it behaves the same on Apache, LiteSpeed and Nginx, on shared hosting (o2switch, OVHcloud, Hostinger, IONOS and others) as on a VPS. With pretty permalinks, the login address relies on the rewrite rules WordPress itself needs for your pages. If your host has its own cache, purge it after changing settings.

= Does it support multisite? =

No. The plugin is for single-site installations. On a multisite network it changes nothing.

= Does it affect SEO? =

Search engines do not use the generator tag, the technical links or the comments it removes. Your content, titles, meta descriptions, canonical links and structured data are left as they are, and so are the addresses listed in your sitemaps. One trade-off: speculative loading (WordPress 6.8 and later) is turned off while WordPress is hidden, so browsers no longer prefetch the next page on hover.

= Does it work with WooCommerce? =

Yes. The WooCommerce generator tag and signed comments are removed. The cart, checkout and customer accounts keep working, and logged-in customers see the masked shop like any visitor. WooCommerce cookies and CSS classes stay, because the shop and cache plugins rely on them.

= Does it work with Polylang or WPML? =

Yes. The login address check looks at your pages in every language. The WPML generator tag and the redirect header that names Polylang are removed. Their language cookies and classes stay, because they are needed to switch languages.

= How do I undo everything? =

Turn off the master switch in the Getting started tab, or deactivate the plugin: your site is back as it was. If you cannot reach your admin, add `define('FEINT_DISABLE', true);` to wp-config.php: every change stops and wp-login.php works again. If your login address shows your server's own "not found" page (the rewrite rules of the server were lost), open /?feint_access=your-address instead: that form needs no server rule. Deleting the plugin removes its settings (they are kept while WP Feint Pro, which uses the same ones, is installed).

= How can I check the result? =

Logged in, you see the real site, so open it in a private window. View the source code, and run a detector such as the Wappalyzer browser extension. Compare with the Identity tab: it tells you which clues are hidden and which ones stay visible, and why. Detectors that read file addresses (/wp-content/) will still report WordPress in this plugin.

= Can visitors still find my new login address? =

wp-login.php and wp-admin do not lead to it. It can still appear in login links your own pages show: the comment form when users must be registered, "Log in to Reply" links, the Meta widget and your theme's login links. Remove those links to keep the address private. The e-mails WordPress sends to people who have an account (password reset, new account) contain it, since they need it to sign in; the confirmation link of a privacy request, which can go to someone without an account, does not. One more thing to know: while wp-admin is closed, a link to an administration screen in an e-mail (to moderate a comment, for example) shows "page not found" until you have signed in at your login address.

= What does it send by e-mail? =

One message, to your own administrators only: when a new login address is in use, it is sent to the user who tested it and to the administration e-mail address of the site (Settings > General), through your site's usual mail system. Nothing is sent to anyone else, and the plugin contacts no outside service.

= Does it slow down my site? =

It adds no script, no stylesheet and no external request to your pages. The work happens on the server, in one pass over the page before it is sent, and the files it reads to check body classes are cached. With a page cache, that pass happens once, when the page is stored.

== Screenshots ==

1. Getting started: master switch and step-by-step progress (protection mode, software to imitate, login page, result check).
2. Identity: choose the software your site announces (Joomla! here) and how much of WordPress stays visible.
3. Identity: plugins and theme detected on your site, what is already hidden and what detection tools can still see.
4. Protection: move or hide the login page and close the entry points bots try first, such as XML-RPC.
5. Bot traps: requests to addresses that do not exist on your site are counted, with the most targeted ones.
6. Troubleshooting: the one-line wp-config.php switch that turns every change off if you get locked out.

== Credits ==

The icons of the settings screens come from [Lucide](https://lucide.dev) (ISC License, Copyright (c) Lucide Icons and Contributors). Some of them derive from Feather (MIT License, Copyright (c) Cole Bemis). Both licence texts are included in the file LICENSE-LUCIDE.txt.

== Changelog ==

= 0.10.0 =
* First public release.

== Upgrade Notice ==

= 0.10.0 =
First public release. Requires WordPress 6.9.
