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 sharing 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:
- Edit the page or post you want to password protect.
- 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.
- 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.
- 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.
Steps to use this plugin:
- Install and Activate the plugin.
- Navigate to Settings -> Passster.
- Under Shortcode, choose the protection type as password and enter your password in the Password field.
- Now copy the shortcode and click on the Save Changes button.
- Now edit the page you want to password protect.
- Paste the shortcode in the editor that we copied earlier. Now insert any content that you want protected within the shortcode only.
- Now only a small section should be protected while the rest of the page should be visible to everyone.
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.