How to Password Protect a WordPress Page Without Plugins

Password-protect individual WordPress pages or posts using the built-in visibility setting, then test the visitor prompt without installing a plugin.

Last updated:

Reviewed for accuracy by Jesse Nickles

Password-protect a page in the block editor

  1. In WP Admin, go to Pages → All Pages and edit the page you want to protect.
  2. Open the Settings sidebar using the button in the upper-right corner if it is hidden, then select the Page tab.
  3. Find Status in the page settings, open its status and visibility controls, and choose Password protected. Older editor versions may show this under Visibility or Status & Visibility.
  4. Enter a unique password to share with visitors. WordPress limits built-in page and post passwords to 20 characters; do not reuse your account password.
  5. Click Update for an existing page or Publish for a new page to save the change.

If you use the Classic Editor, find Visibility in the Publish panel and click Edit. Choose Password protected, enter a password, click OK, then Update or Publish the page.

The same feature works for posts: open the post under Posts → All Posts and use its Post settings. A separate password can be set for each page or post.

Test the password prompt

  1. Open the page's public URL in a private or incognito browser window where you are not signed in to WordPress.
  2. Confirm that WordPress displays a password form instead of the page content.
  3. Enter the password and confirm the content becomes visible.

Administrators and editors can inspect protected content in the WordPress editor, but being signed in does not automatically unlock it on the public page. WordPress stores an accepted page password in a browser cookie, normally for 10 days unless that lifetime is customized. Pages sharing the same password can be unlocked together; entering a different page password replaces the remembered one, so the first page will ask again. Test each case in a fresh private window.

Change or remove the password

Edit the page, reopen its Status or Visibility setting, and enter a different password. Save the page with Update. To remove the password prompt, switch the setting back to Public and update the page.

VisibilityWho can view the page
PublicAnyone
Password protectedAnyone with the shared page password; no WordPress account required
PrivateLogged-in users with permission to read private content, normally administrators and editors

Understand the limitations

Use this built-in setting when you want to share ordinary page content with a small group. For confidential files, client portals, or member-specific access, use a system that protects the files and verifies individual users.