There may be times when you’d rather not share all of your content with the entire world. Fortunately, WordPress makes it very easy to password protect or even hide your content.
You can restrict access to both posts and pages. When editing either type of content, you’ll see a “Visibility” option in the “Publish” section. Click on the “Edit” link, as seen in the image below (click on any image to enlarge it):
Choose the visibility option you prefer:
Visitors to your site can see that password-protected posts and pages exist, but they won’t be able to see their content without your authorization. Private posts and pages are completely invisible to anyone you haven’t authorized. If you’d like more detail about about content visibility, check out WordPress’s own page on the topic.