Title: htaccess protect
Author: zoltanlaczko
Published: <strong>29 Tháng 5, 2020</strong>
Last modified: 23 Tháng 1, 2022

---

Tìm kiếm plugin

![](https://ps.w.org/zotya-htaccess-protect/assets/banner-772x250.png?rev=2314302)

Plugin này **chưa được cập nhật với 3 phiên bản mới nhất của WordPress**. Nó có 
thể không được hỗ trợ và bảo trì, và có thể xung đột với các phiên bản WordPress
mới nhất.

![](https://ps.w.org/zotya-htaccess-protect/assets/icon-256x256.png?rev=2314302)

# htaccess protect

 Bởi [zoltanlaczko](https://profiles.wordpress.org/zoltanlaczko/)

[Tải về](https://downloads.wordpress.org/plugin/zotya-htaccess-protect.0.7.0.zip)

 * [Chi tiết](https://vi.wordpress.org/plugins/zotya-htaccess-protect/#description)
 * [Đánh giá](https://vi.wordpress.org/plugins/zotya-htaccess-protect/#reviews)
 *  [Cài đặt](https://vi.wordpress.org/plugins/zotya-htaccess-protect/#installation)
 * [Nhà phát triển](https://vi.wordpress.org/plugins/zotya-htaccess-protect/#developers)

 [Hỗ trợ](https://wordpress.org/support/plugin/zotya-htaccess-protect/)

## Mô tả

Using the password protection will give you extra security layer of protection from
brute force hacking attacks. Additionally, it’s also an easy way to password protect
your entire site, without needing to create separate WordPress users for each visitor.

When you enable the password protection, the user won’t be able to see anything –
not even see the protected page – until he/she inserts the username/password. You
can password protect the whole website, including the administrator pages; you can
password protect the administrator pages; or you can password protect the WordPress
login page.

The plugin options include:

 * Enabling/disabling the password protection to wp-login.php, WordPress admin pages.
 * Modifying the existing users: you can change any .htaccess user’s password and
   remove the users.
 * Create/modify an unlimited number of .htaccess users;
 * Protect your whole site, making it accessible to only those who have the .htaccess
   user.

This plugin is originally was based on [.htaccess Site Access Control](https://wordpress.org/plugins/htaccess-site-access-control/).
That plugin was working fine but it was abandoned for years and not compatible with
the latest WordPress. Most part of the plugin were refactored and translated.

## Cài đặt

 1. Upload the plugin files to the `/wp-content/plugins/zotya-htaccess-protect` directory,
    or install the plugin through the WordPress plugins screen directly
 2. Activate the plugin through the ‘Plugins’ screen in WordPress
 3. Use the `Settings -> htaccess protect` screen

## Hỏi đáp

### Which options do you modify?

You can choose between the following options:
 1. Enabling/disabling the password
protection to wp-login.php, WordPress admin pages, and/or the whole site. 2. Modifying
the existing users: you can change any .htaccess user’s password and remove the 
users. 3. Adding a new .htaccess user.

Note that you have to have at least one user to be able to enable any of the options:
otherwise you would be locked out!

### The plugin is giving a warning that some of the files need to be writable for it to work, what does this mean?

Since the plugin is protecting your site via modifying .htaccess and .htpasswd files,
it works only if these files are writable by WordPress. If the files don’t exist,
you can just create empty writable files to the location brought out in the plugin’s
warning. You can also see from there which files are already writable and which 
not.

### I forgot my password, and got locked out from the site! What can I do?

For accessing your site again, you have to modify two files:
 1. .htaccess file 
in your WordPress root directory (the directory where the file wp-config.php is 
located); 2. .htaccess file in your WordPress wp-admin folder

From both files, delete everything BETWEEN these two lines:

 * # BEGIN ZOTYA htaccess protect
 * # END ZOTYA htaccess protect

IMPORTANT: Before modifying either of the files, make a copy of them!

For accessing the files, either use FTP or log in to your web hosting service provider,
usually they also enable direct file modification.

## Đánh giá

![](https://secure.gravatar.com/avatar/b89af680647c05d2cec17ff0371b876f2eb8015c892d2c2a59153694d56f4cc5?
s=60&d=retro&r=g)

### 󠀁[it works](https://wordpress.org/support/topic/it-works-2297/)󠁿

 [sinanisler](https://profiles.wordpress.org/sinanisler/) 28 Tháng 6, 2022

i dont know others but it works fine for me i just tried with wordpress 6.0 I recommend
people to use this plugin if you have and know how to edit your ftp files ! if your
server configuration has issues this plugin will have too… it is a simple but powerfull
plugin.

![](https://secure.gravatar.com/avatar/a387dde7451143c8e93e6ad4f230a57efa1c1b90320a7985dcfdf784247ac591?
s=60&d=retro&r=g)

### 󠀁[It doesn’t work](https://wordpress.org/support/topic/it-doesnt-work-297/)󠁿

 [reverseflash](https://profiles.wordpress.org/reverseflash/) 1 Tháng 1, 2022

the plugin used to work, not anymore.

![](https://secure.gravatar.com/avatar/25f9d4351b0bb7ee8ad18e560eb01e4a9be3a1808144f6c24fdfd5526257f746?
s=60&d=retro&r=g)

### 󠀁[Does what it says on the tin](https://wordpress.org/support/topic/does-what-it-says-on-the-tin-480/)󠁿

 [BigupJeff](https://profiles.wordpress.org/jeffersonreal/) 11 Tháng 4, 2021

This is the first http pass plugin of several I had to sift through which actually
does what you'd expect from a http password plugin. Provides simple, complete site-
wide password protection. For me this is a very helpful tool to quickly block public
access to staging and dev sites without having to manually create a pass file which
I have to remember to delete before migration etc… Thank you to the dev for keeping
it straight forward, the way tools should be.

![](https://secure.gravatar.com/avatar/cbcb890ee1c060713aaa795983cad9e01fb3d8df71e1ed05cd8fb5d1732a137e?
s=60&d=retro&r=g)

### 󠀁[Sorry, but problematic!](https://wordpress.org/support/topic/sorry-but-problematic/)󠁿

 [markc369](https://profiles.wordpress.org/markc369/) 3 Tháng 4, 2021

When working on websites, I like to add a site-wide password to stop user and search
engines accessing the site during that period. I normally use another plugin for
this, but it had not been updated for 6 months and on WP5.7 was causing the (known)
issue of misreporting that there was an https issue with the site when doing a health
check. So I decided to go with this one. At first I thought it would do the job,
but when I went to check the site health, I got into the loop of it constantly asking
for user/password. I enabled the (supposed) fix for this and then tried again – 
but same issue. At this point I decided to deactivate/uninstall the plugin – that
did not help and the site was still asking for the password, but least at this point
I could still access the site. I reinstalled – disabled everything and removed the
user thinking that would fix it – now it was even worse. I was still asked for user/
pw but now it was not recognised – basically I had been locked out of the site completely.
The only fix was to ftp in, download the .htaccess file and manually remove the 
authentication section added by this plugin and re-upload it. Not sure what has 
been left in the file structure / db, but at least I am back in and have gone back
to the original plugin. What is even worse, is that this plugin also causes the 
same https error when checking on site health. So it was all for nothing anyway…
Needs some more work guys! Cheers, Mark. PS. If you do fix these issues and want
me to give it another go – of course I will be happy to do so and will happily up
the grading accordingly 🙂

![](https://secure.gravatar.com/avatar/15077f2d8cbacb7db423f5f38b66c889ca74e62c24fa90e0f20b3cf944aee40e?
s=60&d=retro&r=g)

### 󠀁[Simple enough! 🙂](https://wordpress.org/support/topic/simple-enough-4/)󠁿

 [Manoj Kumar](https://profiles.wordpress.org/manojorton/) 22 Tháng 3, 2021

Thanks for keeping it simple.

![](https://secure.gravatar.com/avatar/4d294c75c474a3619e5db56afdd89a195f626ac9751084aead799068a034b75e?
s=60&d=retro&r=g)

### 󠀁[Great](https://wordpress.org/support/topic/great-11523/)󠁿

 [szaboi](https://profiles.wordpress.org/szaboi/) 4 Tháng 6, 2020

Simple and great. Thank you for your work

 [ Đọc tất cả 6 đánh giá ](https://wordpress.org/support/plugin/zotya-htaccess-protect/reviews/)

## Người đóng góp & Lập trình viên

“htaccess protect” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp

 *   [ zoltanlaczko ](https://profiles.wordpress.org/zoltanlaczko/)

“htaccess protect” đã được dịch qua 1 ngôn ngữ. Cảm ơn [những người tham gia dịch](https://translate.wordpress.org/projects/wp-plugins/zotya-htaccess-protect/contributors)
vì đóng góp của họ.

[Dịch “htaccess protect” sang ngôn ngữ của bạn.](https://translate.wordpress.org/projects/wp-plugins/zotya-htaccess-protect)

### Muốn tham gia phát triển?

[Duyệt code](https://plugins.trac.wordpress.org/browser/zotya-htaccess-protect/),
check out [SVN repository](https://plugins.svn.wordpress.org/zotya-htaccess-protect/),
hoặc theo dõi [nhật ký phát triển](https://plugins.trac.wordpress.org/log/zotya-htaccess-protect/)
qua [RSS](https://plugins.trac.wordpress.org/log/zotya-htaccess-protect/?limit=100&mode=stop_on_copy&format=rss).

## Nhật ký thay đổi

#### 0.7.0

 * Add WordPress 5.9 support

#### 0.6.0

 * Add WordPress 5.8 support

#### 0.5.0

 * Add WordPress 5.7 support

#### 0.4.0

 * Add WordPress 5.6 support

#### 0.3.0

 * Add WordPress 5.5 support

#### 0.2.0

 * Add authorization fix option if you have loopback issues
 * refactor remove function

#### 0.1.0

 * Initial release

## Meta

 *  Phiên bản **0.7.0**
 *  Cập nhật lần cuối **5 năm trước**
 *  Số lượt cài đặt **700+**
 *  Phiên bản WordPress ** 5.0 hoặc cao hơn **
 *  Đã kiểm tra lên đến **5.9.21**
 *  Phiên bản PHP ** 5.6 hoặc cao hơn **
 *  Ngôn ngữ
 * [English (US)](https://wordpress.org/plugins/zotya-htaccess-protect/) và [Swedish](https://sv.wordpress.org/plugins/zotya-htaccess-protect/).
 *  [Dịch sang ngôn ngữ của bạn](https://translate.wordpress.org/projects/wp-plugins/zotya-htaccess-protect)
 * Thẻ
 * [htaccess](https://vi.wordpress.org/plugins/tags/htaccess/)[htpasswd](https://vi.wordpress.org/plugins/tags/htpasswd/)
   [protect](https://vi.wordpress.org/plugins/tags/protect/)[protection](https://vi.wordpress.org/plugins/tags/protection/)
   [security](https://vi.wordpress.org/plugins/tags/security/)
 *  [Nâng cao](https://vi.wordpress.org/plugins/zotya-htaccess-protect/advanced/)

## Đánh giá

 3.7 trên 5 sao.

 *  [  4 5-star reviews     ](https://wordpress.org/support/plugin/zotya-htaccess-protect/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/zotya-htaccess-protect/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/zotya-htaccess-protect/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/zotya-htaccess-protect/reviews/?filter=2)
 *  [  2 1-star reviews     ](https://wordpress.org/support/plugin/zotya-htaccess-protect/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/zotya-htaccess-protect/reviews/#new-post)

[Xem tất cả đánh giá](https://wordpress.org/support/plugin/zotya-htaccess-protect/reviews/)

## Những người đóng góp

 *   [ zoltanlaczko ](https://profiles.wordpress.org/zoltanlaczko/)

## Hỗ trợ

Có điều gì muốn nói? cần giúp đỡ?

 [Xem diễn đàn hỗ trợ](https://wordpress.org/support/plugin/zotya-htaccess-protect/)