Skip to main content

Step-by-Step Security Hardening for WordPress on a Public VPS

πŸ” Overview

This guide explains how to harden your public WordPress site using free plugins and smart configuration. It includes login obfuscation, brute-force protection, 2FA, and XML-RPC lockdown.

πŸ”§ Step 1: Hide the Default Login Page

Change the default /wp-admin or /wp-login.php to prevent brute-force login scans.

➀ Install the Plugin

Go to Plugins > Add New, and search for WPS Hide Login.

2025-05-12 18_52_23-Add Plugins β€Ή Nate Networks β€” WordPress β€” Mozilla Firefox.png

Click Activate and proceed to Settings > General to configure.

βš™οΈ Configure Login Path

Change the login path to something unique like <secret panel> and redirect unauthorized users to /404.

2025-05-12 18_54_12-General Settings β€Ή Nate Networks β€” WordPress β€” Mozilla Firefox.png

Click Save Changes to finalize the setting.

🚫 Step 2: Rate-Limit Login Attempts

Block bots and brute-force attempts using Limit Login Attempts Reloaded.

➀ Install the Plugin

Search for Limit Login Attempts Reloaded.

2025-05-12 18_55_20-Add Plugins β€Ή Nate Networks β€” WordPress β€” Mozilla Firefox.png

🚷 Skip Premium Prompts

Click β€œNo, I don’t want advanced protection” during setup:

2025-05-12 18_56_45-Limit Login Attempts β€Ή Nate Networks β€” WordPress β€” Mozilla Firefox.png

Then skip the email/cloud opt-in:

Cloud Opt-in - Skip

βš™οΈ Set Lockout Thresholds

Once installed, configure:

  • Allowed retries: 3

  • Lockout time: 20 minutes

  • Lockout escalation: After 4 fails, extend to 24 hours

  • Retry reset: 24 hours

Use REMOTE_ADDR for trusted IP origins.

πŸ”’ Step 3: Enforce Two-Factor Authentication (2FA)

Add strong login protection with time-based one-time codes using WP 2FA.

➀ Install the Plugin

Search and install WP 2FA:

2025-05-12 19_00_11-Add Plugins β€Ή Nate Networks β€” WordPress β€” Mozilla Firefox.png

πŸ› οΈ Configure Authentication Method

In the wizard:

  • Enable TOTP App (Google Authenticator, Authy, etc.)

  • Optionally enable Email fallback

⏳ Set Grace Period

Allow users a short time (e.g., 3 hours) to configure 2FA.
Choose to block dashboard access if they don’t enroll in time.

βœ‚οΈ Step 4: Disable XML-RPC

XML-RPC is often abused and rarely needed unless you're using remote publishing or Jetpack.

➀ Install the Plugin

Search for Disable XML-RPC-API by Amin Nazemi:

2025-05-12 19_05_39-Add Plugins β€Ή Nate Networks β€” WordPress β€” Mozilla Firefox.png

Activate it β€” no configuration required.

βœ… Final Notes

You’ve now:

  • Hidden your login URL

  • Enabled brute-force protection

  • Enforced 2FA

  • Disabled a major backdoor vector (XML-RPC)