Skip navigation
Documentation

Duo for WordPress - Legacy Plugin

Last Updated: February 28th, 2024

Duo's WordPress plugin enables two-factor authentication for WordPress logins, complete with inline self-service enrollment and Duo Prompt. The code is open-source and available on GitHub.

Support for the traditional Duo Prompt experience and Duo Prompt delivery via iframe ended on March 30, 2024.

See the update instructions for WordPress to update an existing deployment of the iframe-based WordPress software to the latest release. Authenticating once with the updated Duo software is a required step before you can enable the Duo Universal Prompt for your existing WordPress application.

Please visit the Duo Universal Prompt Update Guide for more information about the traditional Duo Prompt end of support.

Walkthrough Video

 

First Steps

  1. Sign up for a Duo account.
  2. Log in to the Duo Admin Panel and navigate to Applications.
  3. 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.

Treat your secret key like a password

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 Duo Universal Prompt provides a simplified and accessible Duo login experience for web-based applications, offering a redesigned visual interface with security and usability enhancements.

Universal Prompt Traditional Prompt
 Duo Push in Universal Prompt  Duo Push in Traditional Prompt

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 is a three-step process:

  1. Install an update for the WordPress application, which implements a redirect to Duo during authentication to support the Universal Prompt.
  2. 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 shows the traditional Duo prompt in a redirect instead of an iframe.
  3. From the Duo Admin Panel, activate the Universal Prompt experience for users of that Duo WordPress application. Once activated, all users of the application see the Duo Universal Prompt in a redirect.

New WordPress Applications

If you're configuring Duo for WordPress for the first time now, we recommend installing the updated Universal Prompt application for WordPress instead of the legacy application described on this page, so your users can experience the Universal Prompt as soon as you finish the Duo configuration steps.

Existing WordPress Applications

WordPress needs a software update installed before you can activate the Universal Prompt experience. The "Universal Prompt" section reflects this status as "Update Required" today.

Universal Prompt Info - Update Required

To update your current WordPress Duo application to a newer version so that you can activate the Universal Prompt experience, follow the update directions for the Universal Prompt.

You **must** perform a Duo 2FA authentication after performing the required update. This authentication will not yet show the Universal Prompt, but will update the status of that application in Duo's service to unlock the Universal Prompt activation control so you can then turn it on for the application. Your users continue to see the current Duo prompt experience until you apply the update and authenticate using the updated application, and then activate Universal Prompt for that application.

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

  1. Log in to your WordPress Dashboard as an administrator.

  2. Navigate to PluginsAdd New in the left navigation bar. Then search for "Duo Security" and click Install Now for the Duo Two-Factor Authentication plugin.

    Plugin Search

    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 PluginsAdd 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.

    Upload Plugin
  3. Click Activate Plugin after installing the Duo plugin:

    Activate Duo Plugin
  4. After activation, click Settings to configure the plugin.

    Configure Duo Plugin
  5. 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.

    Configure Duo Plugin Main Settings

    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.

Duo Authentication Prompt

Configure Allowed Hostnames

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

See the instructions for migrating to the v2 plugin with universal prompt support.

Network Diagram

  1. WordPress connection initiated
  2. Primary authentication
  3. 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.
  5. WordPress receives authentication response
  6. WordPress session logged in