Disable 2FA for Admin

User
Prevent 2FA for wordfence for particular admisttrator
Assistant
Wordfence doesn't provide a built-in setting to *directly* disable 2FA for a specific administrator from the dashboard. However, there are a few **workarounds** depending on your scenario:

### ✅ Option 1: **Remove 2FA for that admin manually**

1. Go to **WordPress Dashboard > Wordfence > Login Security**.
2. Click the **"Users"** tab.
3. Find the user you want to disable 2FA for.
4. Click **“Deactivate”** under their 2FA status.

This disables 2FA for them (until they set it up again).

### ✅ Option 2: **Exclude them using a code snippet**

If you want to prevent 2FA setup entirely for a specific user (e.g., by username or ID), you can hook into the `wordfence_ls_require_2fa` filter:

add_filter('wordfence_ls_require_2fa', function ($require_2fa, $user) {
    // Replace 'admin_username' with the actual username
    if ($user && $user->user_login === 'admin_username') {
        return false; // Don't require 2FA for this user
    }
    return $require_2fa;
}, 10, 2);

👉 Add this to your theme's `functions.php` or a custom plugin.

### ✅ Option 3: **Use roles to manage 2FA (less specific)**

If that user can be assigned a different role (e.g., a custom admin role), you could **set up Wordfence to not require 2FA** for that role only under:

**Wordfence > Login Security > Settings > 2FA Roles**

But this works only if role-level control is okay for your setup.

Let me know your exact goal — are you trying to temporarily disable it, avoid setup prompts, or prevent enforcement entirely?

Leave a Comment

Your email address will not be published. Required fields are marked *