This article applies to customers on the WordPress Hosting plan.
For more information about this plan, please go to: https://www.blacknight.com/wordpress/
The following will show how to create a protected or hidden directory.
In this example, we are going to password protect the newwebsite
folder, but the steps outlined will work for any folder. See below if you are protecting your WordPress site.
- In cPanel, go to Directory Privacy
- Click on public_html folder.
- Locate the folder that you wish to protect. In this example, it is newwebsite, click Edit
- Check the box for 'Password protect this directory.' and click Save.
- Enter a username, password, confirm the password and click Save.
- You can confirm that a user has been added by seeing the Authorized Users.
- You can delete a user by clicking on the name and click Delete User
- And now your folder would be protected.
IMPORTANT:
If you are password protecting your WordPress site, you must make one change to the .htaccess
file in order for it work correctly.
- Go into File Manager and double-click on the
public_html
folder. - Right-click the
.htaccess
file and click on Edit.- If you do not see the
.htaccess
file, then click on Settings on the top right and check the box for "Show Hidden Files (dotfiles)"
- If you do not see the
- You will receive a warning. Ensure you copy the file or download the file before you edit it. Click Edit again.
- Add the following to its own line at the top of the file.
ErrorDocument 401 default
Further Queries
If you have any queries on this, please contact our Support team - see the following for our contact details:
Comments
0 comments
Article is closed for comments.