Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Protect a WordPress Page with a Password

This guide shows you how to hide a WordPress page or post behind a password, so only people who know it can read it.

SSL and Security2 min read9 steps

Why use a password?

WordPress is a popular tool for building websites. Sometimes you want a page that only some people can see. It could be a client preview, family photos or private notes. A password acts like a key to a locked room. Visitors see a box and must type the right password to go in.

Steps

  1. Log in to your WordPress dashboard. The address is usually yourdomain.com/wp-admin.
  2. In the left menu, click Pages, then All Pages.
  3. Click the title of the page you want to protect. This opens the editor.
  4. Find the settings panel. In the newer block editor, click the settings icon at the top right if the panel is closed.
  5. In the Summary section, look for Visibility. It may say Public. Click it.
  6. Choose Password protected.
  7. Type a strong password in the box.
  8. Click Update or Publish to save.
  9. Open the page in a private browser window to test it. You should see a password box.

In the older classic editor, the Visibility option is in the Publish box on the right. Click Edit next to it and choose Password protected.

Same steps for posts

Posts work the same way. Go to Posts, then All Posts, open the post and follow the same steps.

Good to know

  • The page title will still show on your site and in lists. Only the content is hidden. The title shows the word "Protected".
  • One password can be shared with many people. If you give it to someone you do not trust, change it.
  • This works for simple needs. For a full members area, use a membership plugin. A plugin is an add-on that gives WordPress new features.
  • To remove the lock, go back to Visibility and choose Public.
Tip: Use a long password with letters, numbers and symbols. Do not reuse your login password.

Quick recap

  • Open the page in the WordPress editor.
  • Click Visibility and choose Password protected.
  • Type a strong password and save.
  • Test in a private browser window.