How to protect a directory withing a WordPress installation with htaccess?

Solution:

Add to .htaccess file in public_html or publicDirectory:

You can set what directory do you want allowed, with example from below:

<Directory /root/website>
# All access controls and authentication are disabled
# in this directory
Satisfy Any
Allow from all
</Directory>

<Directory /root/website/subpage>
AuthType Basic
AuthName "NameHere"
AuthUserFile /root/website/subpage/.htpasswd
Require valid-user
</Directory>

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress