# Adding Google Authenticator two-factor login to WordPress

> Add two-factor login to WordPress with the Google Authenticator plugin so users need a code from their phone as well as a password.

Source: https://helpcenter.ruachost.com/wordpress/guides/implementing-google-authentication-for-wordpress/

Adding **Google Authentication** (two‑factor authentication, 2FA) to WordPress strengthens your site’s security by requiring a time‑limited code in addition to your password. On **ruachost.com**, you can enable Google Authentication using the **Google Authenticator plugin**.

## Why Use Google Authentication?

- Protects against brute‑force login attempts.
- Adds an extra layer of security beyond passwords.
- Ensures only legitimate users can access the WordPress dashboard.

## Installing the Google Authenticator Plugin

1. **Log in to WordPress** with an administrator account.\
   ![Screenshot](https://helpcenter.ruachost.com/kb-images/df489cde18c5.webp)
2. In the dashboard, go to **Plugins → Add New**.
3. Search for **Google Authenticator**.\
   ![Screenshot](https://helpcenter.ruachost.com/kb-images/1a46eca74afe.webp)
4. Click **Install Now**, then **Activate Plugin**.

✅ The plugin is now installed.

## ⚙️ Configuring Google Authentication

1. **Edit Admin Profile.**

   - Go to **Users → Profile** (or **Edit Profile**).\
     ![Screenshot](https://helpcenter.ruachost.com/kb-images/2e06df510d3e.webp)
   - Scroll down to **Google Authenticator Settings**.
2. **Enable Authentication.\**

   - Check the **Active** box to enable Google Authentication.
   - Optionally enable **Relaxed Mode** (allows codes to remain valid for up to 4 minutes).
3. **Set Description and Secret Key.**

   - **Description** → The account name shown in the Google Authenticator app.
   - **Secret Key** → Used if you cannot scan the QR code.
   - ⚠️ Note: iPhone does not accept spaces in the description field.
4. **Enable App Password (Optional).**

   - Use only if your site requires XML‑RPC (remote publishing).
5. **Save Settings.**

   - Click **Update User** to apply changes.

## Configuring the Google Authenticator App

1. Install the **Google Authenticator app** on your mobile device (Android/iOS).
2. Open the app → Tap the **+** icon → Choose **Scan QR code** or **Enter key manually**.
3. Scan the QR code or enter the secret key from your WordPress profile.
4. A 6‑digit code will appear with a 1‑minute countdown timer.

## Logging In with Google Authentication

- On the WordPress login page, enter your username and password.
- A new field will appear asking for the **Google Authenticator code**.
- Enter the 6‑digit code from your app → Access granted.

> **Note:**
- If you lose access to your device, you may be locked out. Always keep backup codes or alternative admin access.
- Relaxed Mode is useful if you experience time sync issues.
- For more details, see the Google Authenticator plugin page.
