How to secure WordPress content with passwords [Tutorial]

Hello friends,

In this tutorial I will show you how to secure any part of your WordPress content with passwords.

Before we begin, let’s take a moment to discuss why you would want to password protect your content in the first place.

In most cases this is not needed. In fact if you are aiming at generating high traffic to your WordPress website you’d want to have as much content as possible. You’d also want to have fresh content each week and most importantly you’d want your content to be accessible by users and bots.

However in some cases it is worth having some or all of the content hidden from the bots and the public. Here are some example situations:

  • Private blog – you may want to document something using WordPress and keep it to yourselves or to share it with specific people. While there may be more convenient ways of achieving this (for example using Google Docs), a WordPress website (either self-hosted or wordpress.com account) can be useful for such purposes.
  • Notes and instructions that need to be visible for the administrative users of the website – in such case you’d want to password protect this content so that only the selected individuals can access it securely.
  • Providing access to paid/premium content – in this way the users will need the password in order to access all of the content.

How to secure WordPress content with passwords?

Option 1: The integrated password protection for WordPress:

This method will work on self-hosted sites as well as on wordpress.com blogs. Simply create a new post or a page. Then click on the “Edit” link next to Visibility and choose the  “Password protected” radio button. Then type your password and you are done! Bear in mind that additional steps are required to hide the password protected content entirely – i.e. from Homepage and Archives. Here is a guide on how to achieve this: Click here.

Add password protection to any WordPress post or page

Option 2: Secure only a portion of the content with passwords:

This method requires a plugin and this means that only self-hosted websites can benefit from it.

Begin by downloading, installing and activating the WordPress plugin Content Protector.

After you do this you will get a new section in your dashboard from where you can enter the plugin’s settings. You may add a message that informs users that part of the content is secured using a password. You may set the password and adjust various other settings as well.

Here are some of the Content Protector capabilities:

  • You may password protect multiple parts of your content;
  • The content can be displayed inline (using AJAX) or you may require a page reload in order to view the secured parts of it;
  • Cookies can be set in order to allow authorized visitors to gain access to the content without the need to enter passwords for each visit;
  • CSS settings for the forms;
  • Variety of encryption methods;
  • Custom passwords can be set or you may decide that you want to use CAPTCHA protection;

Next add shortcodes around the part of the content that you want to be secured using a password and publish it. You may also use the TinyMCE dialog menu in order to add shortcodes without making a mistake.

Option 3: Hide all content completely from non-registered users:

This can be achieved for self-hosted sites only. You need a plugin like WP Maintenance Mode. However I personally do not recommend this option. Use it only for maintenance modes only.

So what do you think, friends? Share any thoughts and questions in the comment form below.

See you soon!

About Daniel Angelov

AvatarHi! My name is Daniel Angelov and I am a guest-author at TheCMSPlace. I am a certified SEO and Digital Marketing Specialist. My passion is WordPress, Social Media, Project Management, Open Source Software, Marketing, SEO and Copywriting. In my free time I like reading and fishing. My personal blog is "Optibg.com"

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.