How to Password Protect Page/Post in WordPress

Do you want to hide a page on your WordPress website from being displayed publicly on the internet? Do you want it to be accessible to only those with the password to that page?

The need to password protect a page can be due to many reasons such as sharing it with only those who are paid members of your site or share it with only your friends and family. Thankfully WordPress makes the job very easy.

Below are steps to password protect a page using the built-in WordPress option:

  1. Edit the page or post you want to password-protect.
  2. When using the Gutenberg editor, under the Document tab expand the Status & visibility menu. Click on the Visibility option. It should be Public by default.
    At the bottom, you will find a Password Protected checkbox. Select it.
    An input box should now be visible. Enter your password in it.
    Now click on the Update button. Your page or post should now be password protected.
  3. When using the Classic editor, on the right-hand side under the Publish box find the Visibility item.
    Click on the Edit button and select the Password protected checkbox. Enter your password and click OK.
    Now save the page and your page should be password protected.
  4. For anyone to be able to access the page they will have to enter the password you set for that page.

For trial, you can visit the page link and try entering your password. On entering the correct password the page content should be visible to you.

Password protect only a section of your page

Many times you might want to protect only a small section of a page instead of the full page. You can use a plugin such as Passster for it.

Passster – Password Protection

Steps to use this plugin:

  1. Install and Activate the plugin.
  2. Navigate to Settings -> Passster.
  3. Under Shortcode, choose the protection type as password and enter your password in the Password field.
  4. Now copy the shortcode and click on the Save Changes button.
  5. Now edit the page you want to password-protect.
  6. Paste the shortcode in the editor that we copied earlier. Now insert any content that you want protected within the shortcode only.
  7. Now only a small section should be protected while the rest of the page should be visible to everyone.

Password Protect Entire WordPress Site

In case you want to lock the entire WordPress site, make use of the Password Protect WordPress (PPWP) plugin. 

This easy yet effective plugin allows you to install and protect your site with just a few clicks. Follow the guide below to make your WordPress Site private:

  1. Install and activate the plugin

Go to Sitewide Protection under the Password Protect WordPress section

  1. Enable the Password Protect Entire Site option
  2. Enter your password in the keyword box
  3. Save your changes and you’re done.

Once protected, the plugin will lock the entire site with a password form. Users have to enter correct passwords to open it.

Upgrade to the PPWP Pro version and you can set unlimited passwords for your private site. It’s also possible for you to redirect users to different pages based on their passwords. You’re able to exclude some pages or posts from the sitewide protection as well. 

PPWP allows you to protect single pages, posts, and partial content too. Unlike WordPress’s built-in password protection feature, this plugin enables you to set unlimited passwords for your content.

It also lets you assign roles to your passwords forcing users to log in before opening the protected page. Others, even with the right password, won’t be able to unlock it. 

How about particle content protection? PPWP handles this without any hassle. All you need to do is wrap your content part with the shortcode [ppwp passwords= “password1 password2”] Your content [/ppwp]. 

Final Thoughts

Protecting your content can be very important in many cases and what better option then using the built in WordPress functionality. You can also use the plugin for advanced functionalities.

Have questions or confused about something WordPress Related? Join Our Discord Server & ask a Question

Leave a Comment

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

Scroll to Top
Scroll to Top