User Tools

Site Tools


passwordprotectwordpresswebpage

This is an old revision of the document!


TinkersDocs Home Back to tektinkers.com

Password Protect your Wordpress Webpage

Setup Basic Authentication

Create a .htpasswd fire.

htpasswd -c /path/to/.htpasswd username

Add the following lines to the .htaccess file.

AuthType Basic
AuthName "Restricted Area"
AuthUserFile /path/to/.htpasswd
Require valid-user

Ensure the AuthUserFile path matches where you stored the .htpasswd file


If Authentication Isn't Working

Modify the httpd.conf file to allow .htaccess authentication

AllowOverride AuthConfig

Restart Apache to apply.

sudo service apache2 restart




Change Username

htpasswd /path/to/.htpasswd new_username




Change Password

htpasswd /path/to/.htpasswd username
passwordprotectwordpresswebpage.1748972373.txt.gz · Last modified: 2025/06/03 17:39 by tektinkers