Running on WP Version 5.0.3. When I register a new user, I see the “.htpasswd_generated” is generated (touched) under “…/wp-content/plugins/wp-htpasswd-generator/” directory. My .htaccess also points correctly to this file. However after user registration no user/password gets stored in the file (I registered several new users). It has zero size length. I see this plugin is not touched for years maybe there is compatibility issue. I am not a php developer but I hope it can be an easy fix. I couldn’t find an alternative plugin.
I think this is very useful plugin especially if you want to have alternative protection for some sub dirs without relying on WP authentication. For example I am planning to create photo album pages (Static) without using WP to decrease the script runtime on the server. So htpasswd will provide a copy of WP logins.
]]>I have tried it but it is not working or probably have some bugs.
When it first set, when I go to the page, it asks me for the password, the problem is if I click on login, it gives 500 error, then when trying to refresh, it shows the content.
In the .htaccess file, there is a path which was not correct in the protected folder and on the main file “rename_me_to_.htaccess”, both refer to “.htpasswd_generated” which does not exist.
Is there anyway to fix?
Thanks,
]]>Good day,
I still have not tried this plugin, but I like the idea and will try it.
My question is that: Is it possible to assign a different user to a different folder, so each folder will get it’s own users only.
Thanks and regards,
]]>Just wanted to give a heads up about some errors that cripple a site immediately upon plugin activation.
I was able to resolve it by wrapping every class in every file with a check wrapper like this:
if (!class_exists('CLASSNAME')) {
// original class code for CLASSNAME
}
I eventually just put each class in that check wrapper because when I fixed the first redeclare error, another popped up, fixed that one, another popped up, and then I just wrapped them all. Problem solved.
PLUGIN USERS:
You will have to edit the path in rename_me_to_.htaccess file to suit your ABSPATH to the .htpassword_geneated file.
@andreacomo (PLUGIN AUTHOR):
I have a modified util.php file that generates the .htacess file with the proper ABSPATH instead of using the seeder file. I can send it your way if you want to release it with a future update.