Custom Login URL
Hide wp-login.php and set a custom login slug.
Last updated Feb 3, 2025
Why Change Your Login URL?
By default, WordPress uses /wp-login.php and /wp-admin for login. Since every WordPress site uses these URLs, automated bots constantly scan them for vulnerabilities.
Changing your login URL:
- Eliminates automated bot traffic to your login page
- Reduces server load from brute force attempts
- Adds an extra layer of obscurity
Note
Custom login URLs are "security through obscurity" — they reduce automated attacks but won't stop a determined attacker. Always use strong passwords and 2FA as your primary protection.
Setting Up Custom Login URL
- Go to ArmorPro → Login
- Enable Custom Login URL
- Enter your desired login slug (e.g.,
my-secret-login) - Click Save Changes
Your new login URL will be: https://yoursite.com/my-secret-login
Choosing a Good Slug
- Do: Use something memorable but not obvious
- Do: Use lowercase letters, numbers, and hyphens
- Don't: Use "login", "admin", "secure", or similar obvious words
- Don't: Use your name or business name
Good examples: portal-2024, access-panel, team-entry
What Happens to wp-login.php?
When custom login URL is enabled:
/wp-login.phpreturns a 404 error/wp-adminredirects to the custom login URL (when not logged in)- All login links in WordPress automatically use the new URL
- Password reset links work normally
Caching Considerations
ArmorPro adds no-cache headers to the login page to prevent caching plugins from caching it. However, you may need to:
- Clear your caching plugin's cache after changing the URL
- Clear server-level cache (Varnish, nginx, etc.)
- Clear CDN cache (Cloudflare, etc.)
- Exclude the login URL from caching rules
Important Notes
Bookmark Your New URL
After changing your login URL, bookmark it immediately. If you forget it, you'll need FTP access to disable the plugin.
Update Team Members
Make sure all users who need to log in know the new URL.
Plugin Compatibility
Some plugins hardcode links to /wp-login.php. If you find broken login links after enabling this feature, check the plugin settings or contact the plugin author.
Troubleshooting
Can't access login page
If you can't reach your custom login URL:
- Clear all caches (browser, plugin, server, CDN)
- Go to Settings → Permalinks and click Save (flushes rewrite rules)
- If still not working, use FTP to rename the plugin folder temporarily
Forgot the custom URL
- Connect via FTP/SFTP
- Navigate to
/wp-content/plugins/ - Rename
armorprotoarmorpro-disabled - Log in at
/wp-login.php - Rename the folder back and check your settings