Though we always wish stuffs published on our website to reach as much audience as it can, there might be cases where you would wish to keep some stuffs limited to a group of people. For example, selling digital goods which are accessible by users only after making a payment, or sharing some notes only with your team members.
On WordPress, there are 2 approaches to achieve this. Either the content is accessible only to logged in users (this can further be improved by limiting access depending on roles) or accessible after putting a password which you have provided to the users. Here, in this post, we will be discussing the second approach, i.e. to create a password protected area in WordPress.
Making a password protected area on WordPress is fairly simple. Just follow a few simple steps and you are good to go.
1. Add a new post or page depending on your requirement. I would suggest creating a new page as it won’t appear in the home page, category archives or any other part of website until and unless you provide a link.
2. In the “Publish Menu” click on the “Visibility: Public” to change the visibility status.
3. Change the status to “Password protected” and provide a password to secure the page you are creating.
Now you can publish any content, links or list of other pages in this page. The content of protected page will be available only to the people you have provided the password.
However, there’s a small glitch here. This method only protects the content of protected page but other pages linked from this page are still unprotected. Which means users can still access other posts/pages through other means e.g. Search engine result pages, WordPress search archives etc.
So, if you want to password protect a range of posts/pages in WordPress, don’t forget to follow the above mentioned steps every time you want to create a protected post/page. Though there’s a WordPress plugin called “FT Password Protect Children Pages” which inherits the protection setting of children pages from its parent page, we would still suggest doing it manually as the plugin has not been updated since long.
Don’t forget to add a logout option
Using a password protected area on shared computer could be a threat to security of content since there is no logout option on Password protected area by default. You can easily provide your users an option to log out from Password protected pages/posts using “Logout Password Protected Posts” plugin. Just install the plugin and place the code “” in the page.php or single.php.
Note that the log out link will not show up in an unprotected post or page.
Hello! I know this is kinda off topic but I’d figured I’d ask.
Would you be interested in trading links or maybe guest writing
a blog article or vice-versa? My blog covers a lot of the
same topics as yours and I think we could greatly benefit from each other.
If you’re interested feel free to shoot me an email. I look forward to hearing from you! Great blog by the way!
Hi, I have a very basic question. Say if I provided password to a restricted area, can he not share the password within his say, friend circle and all of them can now together access the restricted area, when it was meant for a single user only? Am i missing something?
Yes, if the password is shared around then all the users can access the protected area. If you want more fine grained access control then it is best to go with membership plugin.