Originally written by Robbie Lewis, last updated Nov 18, 2022, on the Swan Retail knowledge base (SRS).
Part of: Swan eCommerce for SRS
In order to best secure your WordPress/WooCommerce website, we recommend enabling Two-Factor Authentication (2FA) and requiring it for all administrator accounts.
We use the Wordfence security plugin to implement 2FA, you can read more about Wordfence 2FA here.
Enabling 2FA on your account
Administrators can enable and disable 2FA at any time in the CMS. Once 2FA has been activated, it is a good idea to change your Wordfence settings so that 2FA is required for all administrator accounts. Any accounts that do not have 2FA activated will be locked out.
Log into WordPress as normal using your password and then go to Wordfence > Login Security
Note: If your website is a “multisite” where multiple domains are served from a single installation, then you’ll need to first go to My Sites > Network > Dashboard. From this screen you’ll be able to access Wordfence > Login Security on the menu. When you set up 2FA on a multisite, your 2FA code will work for all domains that your installation serves.
You will see a screen like below.
To use 2FA, you’ll need an authenticator app. The most convenient place to install the app is on your mobile phone. Here are the two most recommended apps to use:
Google Authenticator App
Download for Android
Download for iOS
Microsoft Authenticator App
Download for Android
Download for iOS
Once you have the app installed:
-
Click the plus icon to add a new website to your app.
-
Scan the QR code on your screen
-
Your app will begin to display a code that changes every 30 seconds
-
Type the code into the box that says “123456” and click “Activate” to complete the process
-
You will be prompted to download Recovery Codes. It is a good idea to do this and store the file somewhere safe in case you lose your phone.
You will now be prompted for a 2FA code each time you log into the website. You’ll open the app on your phone each time to get the code.
Requiring all administrator accounts to use 2FA
This step is important! Enabling 2FA for individual users will secure those accounts, but requiring 2FA for all administrators will prevent any unauthorised access to your website. Any administrator accounts that do not have 2FA activated will be locked out permanently.
To require 2FA for all administrators:
-
Log in to WordPress and go to Wordfence > Login Security
-
Click the “Settings” tab
-
Find the “Administrator” option under “2FA Roles”
-
Change the setting from “Optional” to “Required”
-
Click the “Save” button at the top of “Settings” section
Allowing an administrator to login and enable 2FA
Once 2FA is required, administrators without 2FA are locked out. You can apply a “grace period” to their account which allows them to login for X days without 2FA. We recommend that you add a 1 day grace period for the user and ask them to login and set up 2FA immediately.
To apply a grace period to a user:
-
Log in to WordPress and go to Users > All Users
-
Click the “Administrator” filter to see only administrator accounts
-
Find the account that you wish to grant access and hover your mouse over the username to reveal the actions menu. Click 2FA
-
You will be taken to the 2FA instructions or this user. You can either allow the user to activate 2FA using your computer from this screen, or you can click the “Settings” tab and set a grace period for this account.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article