Description
Super Duper Two-Factor Login adds robust two-factor authentication to your WordPress site. Unlike many alternatives, this plugin is completely free – no hidden costs, no premium tiers, no upsells. Every feature is included from the start.
🇨🇭🇩🇪🇦🇹 Hinweis für DACH-Nutzer: Plugin und Support sind auf Deutsch (Schweiz/Deutschland/Österreich) verfügbar. Alle Texte und Einstellungen sind vollständig auf Deutsch übersetzt.
Fully translated out of the box in German (Switzerland, Germany, Austria), English, French, Spanish, Italian and Dutch – no separate language pack required.
PHP 8.2 or higher required (for security reasons)
This plugin requires PHP 8.2 or higher. PHP 8.0 and 8.1 have both reached End of Life and no longer receive security updates – running a 2FA plugin on an unmaintained PHP version would defeat its purpose. PHP 8.2 lets us use modern security primitives (immutable configuration, type-safe method handling, strict return contracts) that make the plugin harder to attack.
Don’t have PHP 8.2 yet? Most hosting providers let you switch the PHP version with a single click in the control panel (Plesk, cPanel, Hostpoint, all-inkl, Cyon, raidboxes, etc.). It usually takes less than a minute and does not require any downtime. If in doubt, ask your hoster’s support – they help with PHP upgrades for free.
Two Verification Methods
- TOTP (Authenticator App) – Works with Google Authenticator, FreeOTP+, Authy, Microsoft Authenticator, and any TOTP-compatible app. Setup via QR code or manual key entry.
- Email – Receive a 6-digit code via email on every login. No smartphone required.
Comprehensive Fallback System
- 10 Backup Codes – One-time emergency codes in case you lose your phone. Copy, download, print, or email them to yourself.
- Administrator Recovery Key – Each admin receives a personal 32-character key during setup. Works even when all backup codes are used up.
- FTP Emergency Recovery (optional, off by default) – As a last resort, an empty file created via FTP can switch 2FA off for administrators. The file name has to contain a secret token that is generated in the settings and shown once (
wp-content/.sdtfa-recovery-<TOKEN>), and it is only accepted for 15 minutes after it was created. All administrators are notified by email, both when it is used and when an invalid file shows up.
Enforcement & Trust
- Role-Based Enforcement – Require 2FA for administrators, editors, subscribers, or any role.
- Grace Period – Set a deadline so users have time to set up 2FA before enforcement kicks in.
- Hard Enforcement – Without a grace period, users must complete 2FA setup on the login page before gaining any access.
- Enforcement Areas – Choose where to enforce: admin area, WooCommerce account, checkout, or entire site.
- Trust This Device – Users can save their computer so the 2FA code isn’t required on every login. Configurable duration (1–365 days).
Integration
- WooCommerce – Adds a “Two-Factor Authentication” tab to the My Account page. Enforce 2FA for the account area and checkout.
- Shortcode – Display the user’s 2FA status anywhere with
[sdtfa_status]. - Setup Reminder – A dismissable admin notice with a “Set up now” button. No auto-popups; users open the setup flow only by clicking.
Security
- AES-256-GCM encryption for TOTP secrets at rest
- Secure HttpOnly cookies for trusted devices
- Hashed token storage (never stored in plain text)
- No external dependencies – everything runs locally in pure PHP
- No third-party API calls, no tracking, no data collection. The only HTTP request the plugin ever makes goes to your own site, and only when you click “Run live test” in the hardening section
Privacy & Hardening (optional)
-
Hide user data in REST API – Replace sensitive user fields (name, slug, link, avatar) with neutral values for unauthenticated requests. The REST endpoint stays reachable for SEO and import tools, but anonymous visitors no longer see real display names. Uses a strict whitelist that automatically drops any extra fields injected by SEO, page-builder or e-commerce plugins (Yoast, Rank Math, AIOSEO, Elementor, WooCommerce, …). Example response for an anonymous visitor on
/wp-json/wp/v2/users/1:{“id”:1,”name”:”Author”,”url”:””,”description”:””,”link”:”https:\/\/example.com\/”,”slug”:”author”,”avatar_urls”:{}}
-
Block author archives – Redirect unauthenticated visitors away from
?author=Nand/author/<slug>/to prevent user enumeration. - Disable password reset – Disable the “Lost your password?” function for administrators and/or selected roles. Useful when 2FA must be the only authentication path.
- Users list column – A clean “SDTFA” column on Users All Users that shows the real 2FA status (TOTP, Email, or off) and replaces duplicate columns added by host mu-plugins or other 2FA plugins.
Server & File Hardening (optional)
A strong login does not help when a single uploaded file can take over the whole site. This section closes that path. Every switch is optional and off by default.
- Block PHP in the uploads folder – The single most effective measure against an uploaded web shell: even if a malicious file makes it into
wp-content/uploads/, the server refuses to execute it. The plugin writes a managed rule block into the uploads and upgrade folders and leaves everything else in those files untouched. A live test drops a harmless probe file, requests it over HTTP and tells you whether your server really refuses to run it – the only way to be sure, and it covers nginx too, where .htaccess files are silently ignored. Both probe files are deleted immediately. Ready-made nginx rules are shown for servers without .htaccess support. - Reject dangerous file types – Uploads of PHP and other server-side scripts are refused before the file is stored. Every extension segment is checked, so the classic
photo.php.jpgtrick is caught as well, and files whose name starts with a dot (.htaccess,.user.ini) are refused. - Protect sensitive files – Denies public access to
debug.log,readme.html(which reveals your exact WordPress version),license.txt, database dumps, backup and editor left-overs,.env,.user.iniand version-control folders such as.git. - Block XML-RPC –
xmlrpc.phpallows hundreds of password guesses in a single request and is a popular way around login rate limits. It also powers pingback amplification attacks. The X-Pingback header and the RSD link are removed as well. - Disable the file editor – Removes the built-in plugin and theme file editors, the same effect as
DISALLOW_FILE_EDIT. Anyone who gets hold of an administrator account can otherwise write PHP straight into your site from the browser. - Disable plugin/theme installation – The same effect as
DISALLOW_FILE_MODS, so a stolen administrator account cannot install a backdoor plugin. For sites that deploy over FTP, Git or a pipeline. Both options use WordPress’ own filters instead of defining constants, so nothing in yourwp-config.phpis touched and an existing setting there always wins. - File permission report – Shows the current permissions of
wp-config.php,wp-content, uploads, plugins and themes next to the recommended values and flags world-writable paths. This is a report only – the plugin never changes permissions by itself.
Rules written to the .htaccess in your WordPress root are verified with a request to your own site afterwards. If your server rejects them, the block is removed again automatically, so a restrictive server configuration can never take your site offline.
Screenshots














Installation
- Upload the plugin via Plugins Add New Upload Plugin, or install it directly from the WordPress plugin directory.
- Activate the plugin.
- Configure the main 2FA settings under Two-Factor Login in the admin menu. Optional Privacy & Hardening features (REST user-data masking, author-archive blocking, password-reset lock-down, users-list status column) are on the same settings page.
- Optional: open Server & File Hardening on the same page, tick “Block PHP in the uploads folder”, save, and click Run live test to confirm your server really refuses to execute uploaded scripts.
- Users can set up 2FA from their WordPress profile page or WooCommerce My Account.
FAQ
-
Which authenticator apps are supported?
-
Any TOTP-compatible app works, including Google Authenticator, FreeOTP+, Authy, Microsoft Authenticator, and many others. We recommend FreeOTP+ (Android) and FreeOTP (iOS) as free, open-source options.
-
Can I store the one-time codes in my password manager?
-
Technically yes – any password manager with TOTP support accepts the manual key shown underneath the QR code. We advise against it. Two-factor authentication only works because the two factors live in different places. If your password and your one-time codes sit in the same vault, a single compromised vault hands an attacker both factors at once, and you are back to single-factor security. Keep the second factor on a separate device; a free authenticator app on your phone is enough.
-
What happens if I lose my phone?
-
You can log in using one of your 10 backup codes. If those are also gone, administrators can use their personal recovery key on the login page. As a last resort there is the FTP emergency file, but it has to be switched on beforehand under Emergency access – see the question about it further down.
-
Can I enforce 2FA for all users?
-
Yes. Go to Two-Factor Login settings and select which roles must use 2FA. You can set a grace period with a deadline, or enforce it immediately – users will then be required to complete 2FA setup on the login page before gaining any access.
-
Does this plugin work with WooCommerce?
-
Yes. It adds a “Two-Factor Authentication” tab to the WooCommerce My Account page. You can also enforce 2FA for the WooCommerce account area and checkout.
-
What is the “Trust this device” feature?
-
When enabled by the admin, users can check “Save this computer” during login. The 2FA code won’t be required again on that device for the configured number of days.
-
Are external services or images used?
-
No. Everything runs locally. QR codes are rendered in your own browser by a small bundled script, TOTP calculations happen on the server, and app store badges use local SVG files. No external images, scripts, or API calls are made. The one HTTP request the plugin can make goes to your own website: the optional live test in the hardening section requests a probe file from your own uploads folder to check whether the server executes it. It only runs when you click the button, and no third party is involved.
-
What does “Block PHP in the uploads folder” actually do?
-
Most break-ins that start with a file upload only become dangerous at the moment the server executes that file. The uploads folder is meant for images and documents – there is never a legitimate reason to run PHP in there. The plugin writes a rule block into
wp-content/uploads/.htaccess(and the same forwp-content/upgrade/) that tells the server to refuse PHP and other scripts in that directory. Existing content in those files is preserved; the plugin only manages its own clearly marked block. -
The live test says “not protected”. What now?
-
Two common causes. On nginx, .htaccess files are ignored entirely – open the “Rules for nginx” box below the test and add those lines to your server configuration (or ask your host to). On Apache, the directives may be disabled by
AllowOverride; your host can enable them or add the rules to the server configuration for you. In both cases the other options in this section (upload filter, XML-RPC blocking, file editor, plugin installation) still work, because they do not depend on .htaccess. -
Will the upload filter block files I legitimately need?
-
It blocks executable server-side scripts – PHP, Perl, Python, shell scripts, ASP, JSP and similar – plus files whose name starts with a dot. Images, PDFs, videos, ZIP archives and office documents are unaffected. If your site genuinely needs to offer one of the blocked types as a download, a developer can adjust the list with the
sdtfa_blocked_upload_extensionsfilter. -
Is it safe to switch on “Disable plugin/theme installation”?
-
Only if you update your site another way. The option blocks every install, update and delete through the dashboard – including WordPress core updates, this plugin’s own updates and automatic security updates. It is the right choice for sites deployed over FTP, Git or a pipeline, and the wrong choice for a site that relies on the update button. You can switch it off again in these settings at any time; you are never locked out of the setting itself.
-
How do I remove the rules the plugin wrote?
-
Switch the matching option off and save – the plugin removes its own block again. Uninstalling the plugin does the same. If you prefer to do it by hand, delete everything between
# BEGIN Super Duper Two-Factor Loginand# END Super Duper Two-Factor Loginin the affected .htaccess file. Nothing outside those two markers is ever touched. -
How does the FTP emergency file work, and why is it off by default?
-
It is the last rung of the recovery ladder, for the case where 2FA, backup codes and the personal recovery key are all unavailable. Switch it on under Emergency access; the plugin then shows a file name containing a secret token, exactly once. Note it down and keep it with your recovery key. In an emergency, create an empty file with that exact name in
wp-content/via FTP or your hosting file manager, and 2FA is skipped for administrators for the next 15 minutes.It is off by default because up to version 2.6.1 the plain existence of a file named
.sdtfa-recoverywas enough. That turned “an attacker can write a file into wp-content” into a way past two-factor authentication, without any code execution. The token in the file name and the 15-minute window close that; leaving the whole mechanism off closes it completely. If you never switched it on, there is nothing to do. -
Does the plugin change file permissions?
-
No. The permission report shows what is set and what is recommended, and nothing else. Changing permissions automatically is a good way to lock a web server out of its own files on shared hosting, so the plugin leaves that decision – and the actual chmod – to you or your host.
-
What does the “Privacy & Hardening” section do?
-
It bundles four optional, independently toggleable features that close common WordPress information-leak and lock-out paths. Hide user data (REST API) replaces sensitive fields (name, slug, link, avatar) with neutral values for unauthenticated requests, while keeping the endpoint reachable so SEO and import plugins still work. Block author archives redirects unauthenticated visitors away from
?author=Nand/author/<slug>/to prevent user enumeration. Disable password reset blocks the “Lost your password?” function for administrators and/or selected roles. The users-list column adds a clean “SDTFA” status indicator on Users All Users. All four features are off by default except the users-list column, which is on by default to clean up duplicate columns from other plugins. -
Why does the Users All Users page show an “SDTFA” column instead of a generic “2FA” one?
-
Some hosts and other 2FA plugins inject their own “2FA” column on the users list. When Super Duper Two-Factor Login is installed, those columns can show outdated or misleading status (for example a red ✗ even though 2FA is configured here). The plugin replaces them with a single, accurate “SDTFA” column that reads the real status from this plugin’s own user meta. If you prefer the original column behavior, you can disable this in the Privacy & Hardening section.
-
Will this plugin conflict with other 2FA plugins?
-
It is not designed to run side-by-side with another active 2FA plugin – two plugins both intercepting
wp-login.phpwill produce unpredictable results. If you are migrating from another 2FA plugin, deactivate the other one first. The “SDTFA” users-list column will hide a leftover column from a deactivated plugin only if that plugin still injects it; in normal cases the foreign column simply disappears with the foreign plugin. -
Is this plugin really free?
-
Yes, completely. There is no premium version, no upsells, and no feature restrictions. All features are available to everyone.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Super Duper Two-Factor Login” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Super Duper Two-Factor Login” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
2.6.4 – 26.08.2026
- Fixed: the setup QR code was rastered too finely to be read off the screen. The code was scaled to a fixed overall width, so every additional character in its content made the individual squares smaller – with the site logo switched on it ended up at 3 pixels per square. A phone camera pointed at a monitor, and any password manager that scans the screen, needs roughly 5 to 6. The code is now sized from its content instead and always renders at 5 to 6 pixels per square.
- Improved: the QR code is now a real image rather than a canvas element. Right-click to copy or save it works, printing it is reliable, and software that looks for a QR code on the page can actually find one.
- New: the setup screen now says plainly that we recommend a separate authenticator app on your phone – and why. One-time codes kept in the same password manager as the password collapse both factors into a single vault.
- Fixed: the FAQ claimed QR codes were generated in PHP. They are rendered in your own browser; either way nothing leaves your site.
- Compatibility: tested with WordPress 7.1, which clears the “not tested with your version of WordPress” warning.
