Word P ress(WP)サイトのページをパスワードで保護する理由はいくつかあります。
- 現在または潜在的なクライアントとコンテンツを共有するための安全な場所が必要です。
- 家族や友人との画像、ストーリー、またはコミュニケーションのみを共有するためにWebサイトを使用する。
- 招待されたウェビナー参加者のみのコンテンツを制限します。
- 一般向けではなく、有料会員向けのコンテンツを含みます。
- 会社での従業員の役割に基づいて、ビジネスWebサイトの一部のコンテンツ領域をブロックします。
- 部外者が医療施設や教育施設の専有コンテンツを閲覧できないようにする。

以下は、単一のページや投稿、特定のカテゴリ、またはWordPressWeb(WordPress)サイト全体をパスワードで保護するためのいくつかの方法です。
WordPressでページまたは投稿をパスワードで保護する(Password Protect a Page Or Post In WordPress)
投稿またはページへのアクセスを制限する最も簡単な方法は、WPの表示設定を編集することです。
- (Start)WPダッシュボードでページを開くか編集することから始めます。右側の[公開(Publish)]で、[表示]の横にある[編集(Edit )]をクリックします(Visibility)。

- [パスワードで保護(Password protected, )]を選択し、パスワードを入力して、[ OK ]をクリックします。

- ページを公開して結果を確認します。これで、誰かがそのページを見ると、パスワードの入力を求められます。

- 正しいパスワードを持っている人だけがあなたのコンテンツにアクセスできます。このプロセスは、いくつかのページや投稿を保護する場合に役立ちます。
WordPressサイトの投稿カテゴリをパスワードで保護する(Password Protect Post Categories in Your WordPress Site)
パスワードで保護したい特定のカテゴリの投稿がサイトにある場合は、AccessCategoryPasswordプラグインを使用してください。
プラグインをダウンロード(Download)、インストール、アクティブ化します。

(Choose)パスワードを割り当てて、特定のカテゴリ内の投稿へのアクセスを制限することを選択します。投稿の抜粋と内容の両方が、訪問者がアクセスするために記入する必要があるフォームに置き換えられます。
WPで生成されたフィードが変更されます。ユーザーに表示される設定で説明を定義できます。パラメータは次のように定義されます。
- パスワード(password)Webサイトの訪問者は、制限されたカテゴリにアクセスする必要があります。
- [影響を(Impacted categories)受けるカテゴリ]のチェックボックスをオンにして、保護するカテゴリを選択します。
- 「ユーザーの許可(Granting users)」セクションでは、Webサイトユーザーの役割について説明します。チェックしたものはパスワードを入力する必要はありません。
- [単一の投稿のみ(Only single post)]をオフにすると、投稿の内容がホームページまたはアーカイブページに表示されます。制限されたカテゴリの投稿の単一の投稿ページのみが保護されます。これをデフォルトとしてオフのままにします。
このパスワード保護プラグインの他の設定は、以下に定義されています。
- 情報メッセージ(Info message)のパスワードフォームの前にユーザーに表示されるメッセージを追加します。
- [パスワード](Password)フィールドに表示するものを選択し、[入力]プレースホルダー(Input placeholder)に入力します。
- 訪問者が間違ったパスワードを使用した場合にエラーメッセージ(Error message)として表示するテキストを指定します。
- 検証ボタン(validation button text)のテキストには、「アクセスの取得(Get)」など、ボタンに伝えたい内容を入力します。
- フォーム(Styling of the form)のスタイリングが気に入らない場合は、カスタムスタイリングを追加します。
- フィードの説明テキスト(feed description text)を追加します。
WordPressの投稿またはページの一部をパスワードで保護する方法(How To Password Protect Part Of a WordPress Post Or Page)
また、公開ページの一部のみをパスワードで保護したり、Passster –PasswordProtectionと呼ばれる別のWPプラグインを使用して投稿したりすることもできます。
すべてのWPプラグインの場合と同じように、ダウンロードしてインストールし、アクティブ化します。

WPダッシュボード内で、プラグインの設定に移動します。(Settings)ショートコードとパスワード(Password)を作成するか、自動的に生成します。
WPエディターで、保護するセクションにショートコードを貼り付けて、コンテンツを書き込みます。

訪問者には、ショートコードセクションに入力したものを除くすべてのコンテンツが表示されます。
WordPressサイト全体をパスワードで保護する(Password-Protect Your Entire WordPress Site)
WordPressサイト全体をパスワードで保護するために、サードパーティのプラグインを再度使用できます。選択できるパスワード保護プラグイン(password-protect plugins)がいくつかあります。
BenHusonによるPasswordProtected無料プラグイン(Password Protected free plugin by Ben Huson)について説明します。

- プラグインをダウンロード(Download)、インストール、アクティブ化します。設定を構成するには、[設定](Settings) >[パスワード保護(Password Protection)]に移動します。
- プラグインを有効にするには、[パスワード保護ステータス](Password Protected Status)の横のチェックボックスをオフにします。[パスワードのアクセス許可](Password Permissions)オプションの横にあるチェックボックスをオンにすると、それらの訪問者はサイトにアクセスするためにパスワードを必要としません。
- [新しいパスワード(New Password)]ボックスにパスワードを追加し、 [変更を保存(Save Changes)]をクリックします。
- プラグインをアクティブ化した後、訪問者がサイトにアクセスすると、WPログインページの短いバージョンが表示され、パスワードの入力を求められます。

プラグインはWPサイトのみを保護することに注意してください。誰かがあなたのサーバー上のファイルまたは画像への直接リンクを持っている場合、彼らはそのファイルを見ることができます。
ご覧のとおり、WordPressサイトをパスワードで保護する方法はいくつかあります。個々の投稿またはページには、WordPressの組み込み機能を使用できます。他の部分、セクション、またはサイト全体には、サードパーティのプラグインが必要です。
How To Password-Protect Pages On Your WordPress Website
There are several reasons you might want to password protect pages on yоur WordPress (WP) site, including:
- Needing a secure place to share content with current or potential clients.
- Using your website to only share images, stories, or communications with family or friends.
- Restricting content for invited webinar attendees only.
- Including content that is for paid members and not the general public.
- Blocking off some content areas for business websites based on the employee’s role in the company.
- Ensuring outsiders can’t see proprietary content for medical or educational facilities.

Below are several ways to password protect single pages or posts, specific categories, or your entire WordPress website.
Password Protect a Page Or Post In WordPress
The easiest way to restrict access to a post or page is to edit the visibility settings in WP.
- Start by opening or editing a page in your WP dashboard. On the right-hand side, under Publish, click on Edit next to Visibility.

- Select Password protected, enter a password, and click OK.

- Publish the page and see the results. Now, when anyone looks at that page, they will be asked to enter the password.

- Only those with the correct password will have access to your content. This process is useful if you want to protect a few pages or posts.
Password Protect Post Categories in Your WordPress Site
If you have specific categories of posts on your site that you want to protect with a password, use the Access Category Password plugin.
Download, install, and activate the plugin.

Choose to restrict access to posts within a specific category by assigning a password. Both the excerpt and content of the posts are replaced by a form that visitors will need to complete to gain access.
WP generated feeds are modified. You can define a description in the settings that users will see. The parameters are defined as:
- The password website visitors will need to access restricted categories.
- Choose the categories you want to protect by ticking off the boxes in Impacted categories.
- The Granting users section refers to the roles of your website users. The ones you check will not need to enter a password.
- If you check off Only single post, the post content will display on your homepage or archive pages. Only the single post page of posts from the restricted categories will be protected. Leave this unchecked as the default.
The other settings for this password protect plugin are defined below:
- Add the message users will see before the password form in Info message.
- Choose what you want displayed in the Password field and put it in Input placeholder.
- Specify the text you want to appear as an Error message if a visitor uses the wrong password.
- For the validation button text, input what you want the button to say such as Get access.
- If you don’t like the Styling of the form, add custom styling.
- Add your feed description text.
How To Password Protect Part Of a WordPress Post Or Page
You can also password protect only part of a public page or post with another WP plugin called Passster – Password Protection.
Just as you do for all WP plugins, download, install, and then activate it.

Inside your WP dashboard, go to the Settings of the plugin. Create a shortcode and a Password or automatically have it generated for you.
In your WP editor, paste the shortcode in the section you want to protect and write the content.

Visitors will see all your content except what you have put inside the shortcode section.
Password-Protect Your Entire WordPress Site
To password protect your entire WordPress site, you can again use a third-party plugin. There are several password-protect plugins from which to choose.
We will discuss the Password Protected free plugin by Ben Huson.

- Download, install, and activate the plugin. To configure the settings, go to Settings > Password Protection.
- Tick off the box next to Password Protected Status to enable the plugin. If you tick off the box next to any of the Password Permissions options, those visitors will not need a password to access your site.
- Add your password in the New Password box and click Save Changes.
- After you activate the plugin, when a visitor lands on your site, they will see a shorter version of the WP login page and be asked to enter a password.

Keep in mind that the plugin will only protect your WP site. If someone has a direct link to a file or image on your server, they will be able to see that file.
As you can see, there are several ways to password-protect your WordPress site. For individual posts or pages, you can use WordPress built-in functionality. Other parts, sections, or the entire site will need third-party plugins.