How to password protect a page in WordPress
Whether you’re running a client-facing business, sharing private content, or testing a new draft, sometimes you need to restrict access to just one page on your WordPress site. The good news? You don’t need advanced technical knowledge to do it. In this guide, we’ll walk you through how to password protect a page in WordPress – using built-in tools, free plugins, or server settings.
We’ll also cover when password protection makes sense, how it works, and what to consider when it comes to broader WordPress security. If you’re looking for a simple way to lock down part of your site, you’re in the right place.
Key takeaways
Section titled Key takeaways- Learn how to password protect a page in WordPress using built-in settings
- Discover plugins that offer more control over access, timing, and user roles
- Understand the pros and cons of different password protection methods
- Get tips on hiding protected pages from search engines
- Learn why password protection alone isn’t enough and how to secure your WordPress site.
Why password protect a WordPress page?
Section titled Why password protect a WordPress page?There are plenty of good reasons to lock a specific page without affecting the rest of your site. Here are some common use cases:
- Client-only content: Share invoices, reports, or design drafts securely
- Exclusive content: Protect resources for paid subscribers or members
- Personal content: Limit access to family photo galleries or private blog posts
- Testing content: Restrict work-in-progress pages from public view
- Event information: Share private event details without publishing them site-wide
If you’re a blogger, small business owner, or freelancer, password protection offers a lightweight way to control access without needing a membership system or user login.
Method 1: Use the built-in WordPress password protection feature
Section titled Method 1: Use the built-in WordPress password protection featureWordPress includes a native password protection feature for individual posts and pages. It’s the quickest option and doesn’t require any plugins.
How to password protect a page (using the block editor)
Section titled How to password protect a page (using the block editor)- Open the page or post you want to protect in the WordPress editor
- In the right-hand sidebar, find the Visibility setting under the Page tab
- Click Public, then select Password Protected
- Enter a password in the field that appears
- Publish or update the page

Now, when someone visits that page, they’ll be prompted to enter the password before they can view the content.
Limitations of the default method:
Section titled Limitations of the default method:- Only one password per page
- No way to expire or limit password use
- Password form can’t be customised
- Not suitable for protecting files or downloads
If you need more flexibility, try a plugin instead.
Method 2: Use a plugin for advanced page protection
Section titled Method 2: Use a plugin for advanced page protectionSeveral free plugins offer more control than the default WordPress feature. They’re ideal if you want to:
- Use multiple passwords
- Hide page titles until unlocked
- Set password expiry times
- Limit access by user role
Here are two beginner-friendly options:
Content Control
Section titled Content ControlThis free plugin lets you restrict access to any content based on user roles or logged-in status.
Features:
- Protect pages, posts, and custom post types
- Use conditions (e.g. show to logged-in users only)
- Redirect users who don’t have access
- Compatible with shortcodes for partial content protection
How to use:
- Install and activate Content Control
- Go to Content Control > Rules
- Create a new rule and select which content to protect
- Choose who can see it and what should happen if they can’t
Passster
Section titled PasssterPassster is ideal for password protecting sections of a page or post. You can also use it for full-page protection with a bit more design flexibility than the default WordPress option.
Features:
- Shortcode-based protection
- Customisable forms
- Multiple passwords
- Time-based restrictions
This is a great option for creators who want to hide only part of a blog post or add layered access.
Bonus: Hide protected pages from search engines
Section titled Bonus: Hide protected pages from search enginesPassword protection keeps users out but not search engines. Unless you tell Google otherwise, protected pages can still be indexed (including their titles and URLs).
To keep them truly private:
- Use an SEO plugin like Yoast SEO or Rank Math
- Set the page to noindex in the page’s SEO settings
- Block the page via robots.txt (advanced)
This is especially important if you’re using real client names or sensitive content.
Method 3: Use your host’s password protection tools
Section titled Method 3: Use your host’s password protection toolsSome hosting providers offer tools to password protect content at the server level. This is often used for staging sites, development pages, or non-public areas.
For example:
- cPanel users can go to Directory Privacy to lock folders
- Kinsta users can use the built-in .htpasswd protection tool
Benefits of server-level protection:
Section titled Benefits of server-level protection:- Adds a login prompt before WordPress even loads
- More secure for private environments
- Good for protecting entire directories or media folders
Drawbacks
Section titled Drawbacks- Not as user-friendly for beginners
- Can conflict with caching or CDN tools
If you just need to protect one page, the WordPress or plugin methods are easier to manage.
Is password protection enough to secure a page?
Section titled Is password protection enough to secure a page?While password protection works well for light access control, it’s not full security. It doesn’t:
- Prevent brute-force attempts
- Track login attempts
- Hide media files linked within the page
- Offer user-based access management
For that, you’ll want to use a dedicated security plugin like All-In-One Security (AIOS).
Password protection is useful, but it’s just the start. A security plugin is essential if you want to protect your WordPress site from real threats.
Final thoughts
Section titled Final thoughtsPassword protecting a page in WordPress is a quick, beginner-friendly way to control who can access your content. Whether you’re working on a draft, sharing client documents, or limiting private galleries, it only takes a few clicks to get started.
For extra flexibility, plugins like Content Control or Passster offer more control than the default settings. And if you’re serious about keeping your site safe, adding real security features like 2FA, login lockdown, and role management with AIOS will give you peace of mind.
Go beyond password protection with real WordPress security
Password protection is a good startbut it won’t stop brute-force attacks or unauthorised access. AIOS adds powerful features like advanced two-factor authentication, login lockdown, file change detection, and more to fully secure your site.
FAQs
Section titled FAQsHow do you lock a page in WordPress?
Use the Visibility setting in the WordPress editor and select Password Protected, or use a plugin for more advanced options.
Can you password protect pages in WordPress without a plugin?
Yes. WordPress has a built-in feature for password protecting individual posts or pages. Go to the Visibility settings in the editor to enable it.
How do I restrict a page by user role in WordPress?
You’ll need a plugin like Content Control to set access rules by user role.
Can I hide password-protected pages from Google?
Yes, but not by default. The easiest option is to use an SEO plugin like Yoast to set the page to “noindex.”
Will my media files be protected too?
No. Password protection hides the page content, but files (like PDFs or images) can still be accessed directly if someone has the link.
About the author

Alexandru Bucsa
Alex is our All-In-One Security Product Manager. With more than six years of WordPress experience, he listens closely to what users need and works hard to make AIOS even better. Drawing on his background in forensic investigations, Alex loves diving into problems to understand their causes and find practical fixes that truly help our community.
Categories
AIOS
Comprehensive, feature-rich, security for WordPress. Malware scanning, firewall, an audit log and much more. Powerful, trusted and easy to use.
From just $70 for the year.
More stories
-
How to fix a critical error in WordPress
Learn what causes a critical error in WordPress and how to fix it without losing your site.
-
How to fix content control plugin clashes in WordPress
Having trouble with Content Control? Here’s how to fix common WordPress conflicts.
-
Why should you store WordPress backup media offsite?
Learn how offsite backups can save your WordPress site in a worst-case scenario like data loss or hardware failure.
-
Web hosting vs WordPress hosting: What’s the best option?
Compare web hosting vs WordPress hosting side by side and make the right call for your website.