Title: Password Protect wp-login.php
Last modified: August 30, 2016

---

# Password Protect wp-login.php

 *  [RBX](https://wordpress.org/support/users/rbx/)
 * (@rbx)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/password-protect-wp-loginphp/)
 * I’ve been trying to password protect wp-login.php using .htaccess rules. I’ve
   tried the method prescribed [here](https://codex.wordpress.org/Brute_Force_Attacks#Password_Protect_wp-login.php)
   but I’m getting errors about improper redirection.
 * I generated my .htpasswd file (username:test), and replaced **require user mysecretuser**
   with **require user test**.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/password-protect-wp-loginphp/#post-6896284)
 * [https://codex.wordpress.org/Brute_Force_Attacks#Password_Protect_wp-login.php](https://codex.wordpress.org/Brute_Force_Attacks#Password_Protect_wp-login.php)
 * [http://www.wpbeginner.com/wp-tutorials/how-to-password-protect-your-wordpress-admin-wp-admin-directory/](http://www.wpbeginner.com/wp-tutorials/how-to-password-protect-your-wordpress-admin-wp-admin-directory/)
 *  Thread Starter [RBX](https://wordpress.org/support/users/rbx/)
 * (@rbx)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/password-protect-wp-loginphp/#post-6896317)
 * I don’t want to password protect the directory, just the wp-login.php and the
   method prescribed in the first link is the one I’ve followed.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Password Protect wp-login.php’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [RBX](https://wordpress.org/support/users/rbx/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/password-protect-wp-loginphp/#post-6896317)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
