Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Protecting WordPress login page

You can make it so no one can register by clicking off “Anyone can register” in your Admin.

Furthermore, you can choose a really good password, install a login lockdown plugin and enable logins over https. In most cases this is secure enough.

If your really paranoid you can allow access to only your IP by using .htaccess.

<Files wp-login.php>
    order deny,allow
    deny from all
    allow from 11.11.111.111 (your IP)
</Files>

To do a re-direct you can try something like this in your .htaccess.

RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_HOST} !^127\.0\.0\.1 (Your IP)
RewriteCond %{REQUEST_URI} !/wp-login\.php$ 
RewriteRule .* http://www.yourhomepage.com [R=403,L]
# 403 is a "forbidden", you can change this to another status code

Related Posts:

  1. Is there any way to rename or hide wp-login.php?
  2. Increase of failed login attempts, brute force attacks? [closed]
  3. How to fake a WordPress login?
  4. Brute force attack?
  5. Receiving “This content cannot be displayed in a frame” error on login page
  6. Websites defaced by uploading script using theme editor
  7. Make wordpress admin failed login attempt return 401
  8. WordPress login urls
  9. Store brute-force IP addresses
  10. How to create a private login page for admin.?
  11. WordPress Security – How to block alternative WordPress access
  12. wp-admin folder, brute force, and password protection
  13. Sniffing wordpress user’s credentials
  14. disable site_url redirect in wp-login.php
  15. Does WordPress (or a plugin) reveal login credentials to admin?
  16. Is wp_login_form secure on a non secure page?
  17. WordPress login security
  18. Why isn’t the login page rate limited by default?
  19. How can I password protect a WordPress site without requiring users to log in?
  20. Input sanitation
  21. How to Prevent Brute Force Attack on WordPress
  22. Advice on redirect to lock site from unauthorized users
  23. Where is the php file, that does the checks for login information?
  24. Error on WordPress Login
  25. Access log “POST /wp-login.php HTTP/1.0” 400
  26. force login loophole
  27. I need to find which is the file that checks the DB for correct login (username, password)
  28. How to create separate login for authors/moderators/subscribers?
  29. How to invalidate `password reset key` after being used
  30. Site is not loading after relogin attempts on SSL
  31. Some crawlers/bots attempting to login with very good guesses. How?
  32. Hide wp-login.php but not the widget
  33. How login is possible, if I deny login page via nginx?
  34. Custom login form
  35. Adding extra authentication field in login page
  36. How to check in timber if user is loggedin?
  37. Stop WordPress from logging me out (need to keep me logged in)
  38. Customize wp_new_user_notification_email()
  39. Need to execute a cron job
  40. Masking logout URL
  41. How can I retrieve the username and password from my WordPress installation?
  42. User Directory without a Plugin
  43. Pre checking condition before login
  44. Custom Connect to Facebook, problem logging in/logging out
  45. Redirect after empty login username and password
  46. WordPress Login page trashed
  47. Are there ways of logging in that bypass wp-login.php altogether?
  48. Change Favicon on Login Screen?
  49. Admin username and password
  50. Customizing the WordPress login form
  51. How to display username and password after registration
  52. How to integrate external user tables with WP?
  53. WordPress as webapp login session
  54. replace wp-login.php login forms via a hook & use custom forms with wp-login form validation
  55. How can I add a login/logout link in the sub-nav of my website?
  56. Odd login issue that needs manual page refresh on some devices
  57. WordPress asking for login on public pages on localhost
  58. Session Experies and Get Logged Out Within Few Minutes
  59. 404 redirect wp-login and wp-admin after changing login url [closed]
  60. Two factor authentication
  61. Login form doesn’t log in
  62. Redirect wp-login
  63. Show reCaptcha on Custom Frontend Login & Register Form [closed]
  64. Problems with is_user_logged_in() | Function in WP
  65. Is the login encrypted before it is sent? If so how to do I encrypt it the same way?
  66. What speaks against using a custom login.php / register.php to wordpress?
  67. Login fail with no error
  68. WordPress login doesn’t work when using preview domain
  69. Prevent Subscriber Role to login
  70. How to check if user is logged into wordpress on non-wordpress pages
  71. How to authenticate a user with an external webservice
  72. Login user using wp_signon and WP_User object
  73. Log in with email but no password
  74. Login form not saving values when login incorrect
  75. Abnormal activity at url /my-account/add-payment-method/
  76. Blacklist and Whitelist on login
  77. How to add custom authentication to wordpress login and register
  78. Link Users to external login db
  79. Change WordPress Login URL to External URL
  80. User does not exist
  81. WordPress login is now working, it just refresh the page and nothing happens.
  82. is_logged_in not working after login
  83. wp_signon() does not authenticate user guidance needed
  84. How to login to wordpress via Cpanel
  85. Redirect to previous page after login
  86. How to password protect pages in WordPress
  87. User account activation links are lacking query strings
  88. Creating login for client / customer that will take them to customized part of site
  89. wp-login.php just refreshes the form fields
  90. Login just resets/reset password link also does not work
  91. WP login pages redirect to homepage (cannot login)
  92. How to place wp-login.php in page or page template?
  93. Adding A Login Fail Notice
  94. Give user some feedback when they land on custom login page
  95. Trouble logging in and/or changing password
  96. How to put Login, Register and newsletter widget on the same page?
  97. Creating Custom Login Form Where Password Field is Dropdown Menu
  98. Browser Caching for Logged in Users
  99. how to login admin by using ip address
  100. Profile Builder Plugiin – how to add customize Login form fields?
Categories login Tags login, security
Change or update WordPress loop based on dropdown selection
Save metadata as a timestamp, display as a “pretty” date

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress