Skip navigation

Duo for WordPress

Last Updated: October 22nd, 2020

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.

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

Duo's next-generation authentication experience, the Universal Prompt, is coming to web-based applications that display the current Duo Prompt in browsers.

Migration to Universal Prompt for your WordPress application is a two-step process:

  • Install an update from Duo for the WordPress application to support the Universal Prompt.
  • Enable the Universal Prompt experience for users of that Duo WordPress application (when the Universal Prompt becomes available).

You'll need to update WordPress to support the Universal Prompt when it's ready, but the update isn't available yet. The "Universal Prompt" section reflects this status as "Waiting on App Provider". Please contact Duo Support to request Universal Prompt support for WordPress.

In the meantime, you can use Duo with WordPress and the current Duo prompt experience.

Universal Prompt Info - Update Not Yet Available

After Duo makes the necessary software update software update available and you've installed it, you'll later return to the settings on this page to activate the Universal Prompt for your WordPress users once we've released it.

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 in-scope for Universal Prompt support.

Read the Universal Prompt Update Guide for more information about the update process to support the new prompt, and watch the Duo Blog for future updates about the Duo Universal Prompt.

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

    Plugin Search

  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.

    Plugin Search

    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

Enable Hostname Whitelisting

If you plan to permit use of WebAuthn authentication methods (security keys, U2F tokens, or Touch ID), Duo recommends enabling hostname whitelisting for this application and any others that show the inline Duo Prompt before onboarding your end-users.

Updating Duo for WordPress

To update an existing Duo plugin install to the most recent version:

  1. Log into your WordPress Dashboard as an administrator.

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

  3. 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 Plugin Updates

  4. WordPress updates the Duo plugin and reports status when complete.

    Duo Plugin Updated


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.

Network Diagram

  1. WordPress connection initiated
  2. Primary authentication
  3. WordPress connection established to Duo Security over TCP port 443
  4. Secondary authentication via Duo Security’s service
  5. WordPress receives authentication response
  6. WordPress session logged in