User Tools

Site Tools


passwordprotectwordpresswebpage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
passwordprotectwordpresswebpage [2025/06/03 17:34] – created tektinkerspasswordprotectwordpresswebpage [2025/06/03 18:33] (current) tektinkers
Line 7: Line 7:
  
 Create a .htpasswd fire.\\ Create a .htpasswd fire.\\
-<code>htpasswd -c /path/to/.htpasswd username</code>\\+<code>htpasswd -c /path/to/.htpasswd username</code>
  
 Add the following lines to the .htaccess file.\\ Add the following lines to the .htaccess file.\\
Line 13: Line 13:
 AuthName "Restricted Area" AuthName "Restricted Area"
 AuthUserFile /path/to/.htpasswd AuthUserFile /path/to/.htpasswd
-Require valid-user</code>\\+Require valid-user</code>
 //Ensure the AuthUserFile path matches where you stored the .htpasswd file// //Ensure the AuthUserFile path matches where you stored the .htpasswd file//
 +\\ 
 +\\ 
 +\\
 **If Authentication Isn't Working**\\ **If Authentication Isn't Working**\\
  
 Modify the httpd.conf file to allow .htaccess authentication\\ Modify the httpd.conf file to allow .htaccess authentication\\
-<code>AllowOverride AuthConfig</code>\\+<code>AllowOverride AuthConfig</code>
  
 Restart Apache to apply. Restart Apache to apply.
 <code>sudo service apache2 restart</code> <code>sudo service apache2 restart</code>
 +\\
 +\\
 +\\
 +**Change Username**
 +<code>htpasswd /path/to/.htpasswd new_username</code>
 +\\
 +\\
 +\\
 +**Change Password**
 +<code>htpasswd /path/to/.htpasswd username</code>
 +\\
 +\\
 +\\
 +**Remove Username**
 +<code>htpasswd -D /path/to/.htpasswd username</code>
 +you can also edit the file, each line is a user.\\
 +<code>sudo nano /path/to/.htpasswd</code>
passwordprotectwordpresswebpage.1748972098.txt.gz · Last modified: 2025/06/03 17:34 by tektinkers