Updating Your Duo WordPress Integration

If you need to change your Duo integration on a live site and one where you have lost WP admin access but still have server/database access, you need to make some manual updates to the database to fix the integration.

The API host, integration and secret key are all stored in the MySQL database under the “wp_options” table in WordPress (the wp_ prefix might be different if you changed the default).

1. The first thing you need to do is get into your MySQL CLI and run a “use whateveryourdatabase_name_is;”

2. If you want to see the current integration data, run this SELECT query:

mysql> SELECT option_id,option_name,option_value FROM wp_options WHERE option_name IN('duo_ikey','duo_skey','duo_host');

| option_id | option_name | option_value                             |
|       411 | duo_host    | api-eeeee.duosecurity.com                |
|       409 | duo_ikey    | 8hCQ3ZmVfxTAgUVe]uApiH                   |
|       410 | duo_skey    | VpyuMLFThwjDwDhjEfPg6L2fKLXzwb           |

3 rows in set (0.00 sec)

3. Now that you have this information, you can easily update update each value with the new integration information from Duo:

mysql> UPDATE wp_options SET option_value="api-new.duosecurity.com" WHERE option_name="duo_host";

mysql> UPDATE wp_options SET option_value="ghdkoMVZEYdLtyXL88DFLhDhfGrCLH" WHERE option_name="duo_ikey";

mysql> UPDATE wp_options SET option_value="pjjDbTaWNhR8EDw2AVyEmCwDthbakr" WHERE option_name="duo_skey";

4. Done! Your next WP login should work immediately.

%d bloggers like this: