Duo Two-Factor Authentication for WordPressLast Updated: September 10th, 2021
- Sign up for a Duo account.
- Log in to the Duo Admin Panel and navigate to Applications.
- Click Protect an Application and locate the entry for WordPress in the applications list. Click Protect to the far-right to configure the application and get your integration key, secret key, and API hostname. You'll need this information to complete your setup. See Protecting Applications for more information about protecting applications in Duo and additional application options.
The security of your Duo application is tied to the security of your secret key (skey). Secure it as you would any sensitive credential. Don't share it with unauthorized individuals or email it to anyone under any circumstances!
Duo Universal Prompt
The new Universal Prompt provides a simplified and accessible Duo login experience for web-based applications, offering a redesigned visual interface with security and usability enhancements.
Read the Universal Prompt Update Guide for more information about the update process and the new login experience for users.
Migration to Universal Prompt for your WordPress application will be a three-step process:
- Install an update provided by Duo for the WordPress application, which will implement a redirect to Duo during authentication to support the Universal Prompt.
- Authenticate with Duo 2FA using the updated application so that Duo makes the Universal Prompt activation setting available in the Admin Panel. This first authentication after updating will show the traditional Duo prompt in a redirect.
- From the Duo Admin Panel, activate the Universal Prompt experience for users of that Duo WordPress application. Once activated, all users of the application will see the Duo Universal Prompt in a redirect.
You'll need to install an update from Duo for WordPress to support the Universal Prompt, but the update isn't available yet. The "Universal Prompt" section reflects this status as "Waiting on Duo" with the activation options inaccessible. Please contact Duo Support to request Universal Prompt support for WordPress.
In the meantime, you can use Duo with WordPress and the traditional prompt experience.
After Duo makes the necessary software update available and you've installed it, you'll return to the settings on this page to activate the Universal Prompt for your WordPress users.
Universal Update Progress
Click the See Update Progress link to view the Universal Prompt Update Progress report. This report shows the update availability and migration progress for all your Duo applications. You can also activate the new prompt experience for multiple supported applications from the report page instead of visiting the individual details pages for each application.
Install and Configure the Plugin
Log in to your WordPress Dashboard as an administrator.
Navigate to Plugins → Add New in the left navigation bar. Then search for "Duo Security" and click Install Now for the Duo Two-Factor Authentication plugin.
To install the Duo two-factor plugin without using the WordPress Plugin directory, first download the Duo plugin as a zipped package from WordPress.
In the WordPress console go to Plugins → Add New and click the Upload Plugin button.
Click Choose File and select the duo_wordpress.zip package you downloaded. Click Install Now to upload Duo's plugin to your WordPress site.
Click Activate Plugin after installing the Duo plugin:
After activation, click Settings to configure the plugin.
Copy and paste your integration key, secret key, and API hostname from the Duo WordPress application you created earlier. You may select which WordPress user roles need to authenticate using Duo. For example, you may only require those users with the "Administrator" role to use two-factor authentication, or require all roles to use two-factor.
To fully secure your WordPress site Duo recommends that you disable XML-RPC. However, this will prevent use of offline Weblog clients and the WordPress mobile app.
Click Save Changes to complete configuration.
Test Your Setup
Open a new browser (or incognito window) and try to log in to your WordPress account. You should be prompted to set up your two-factor authentication. Complete the enrollment process.
If you plan to permit use of WebAuthn authentication methods (security keys, U2F tokens, or Touch ID) in the traditional Duo Prompt, Duo recommends configuring allowed hostnames for this application and any others that show the inline Duo Prompt before onboarding your end-users.
The Duo Universal Prompt has built-in protection from unauthorized domains so this setting does not apply.
Updating Duo for WordPress
To update an existing Duo plugin install to the most recent version:
Log into your WordPress Dashboard as an administrator.
If a newer version of the Duo plugin exists then you'll see a notification icon under both Home - Updates and Plugins. Click either one to view the available update.
WordPress lists the available plugin updates. Check the box next to the Duo Two-Factor Authentication plugin to select it, and then click the Update Plugins button (if you clicked the Updates navigational link in step #2), or click the update now link in the Duo plugin description (if you clicked the Plugins navigational link in step #2).
WordPress updates the Duo plugin and reports status when complete.
Need some help? Take a look at the WordPress Frequently Asked Questions (FAQ) page or try searching our WordPress Knowledge Base articles or Community discussions. For further assistance, contact Support.
- WordPress connection initiated
- Primary authentication
- WordPress connection established to Duo Security over TCP port 443 4.User completes Duo two-factor authentication via the interactive web prompt served from Duo's service and their selected authentication factor.
- WordPress receives authentication response
- WordPress session logged in