WordPress natively provides a feature to Password Protect individual pages or posts. This however, does not protect links to uploads in the Media Library. So Password Protection of pages is effective only for the content within the page itself. To protect uploads, you will need to use the Protected Content plugin.
Protected Content allows you to require a valid WordPress login in order to access pages, posts, or media that are configured to use it. This includes both Unity account logins and local WordPress accounts.
If you wish to protect a page and the media linked off that that page you will need to:
- Activate the "Protected Content" Plugin. In Web Publishing, this plugin is already installed, but not activated by default. It may need to be installed if the WordPress site is hosted in cPanel.
- Edit the page or post you wish to protect. There will be a Protected Content box in the right sidebar that has a Checkbox for "Enabled?" Check that box.
- Before saving the page, you will also need to select a Role in the "Show content to..." dropdown. "Member" is usually sufficient as that's "anyone who can login to WordPress". You can choose to select other WordPress roles or even a Persona group (if that integration has been setup) if you want to be more granular.
- Save the page.
- Now navigate to the Media Library and locate the Media linked off of the page or post you just edited. Click on it to get a popup window.
- In the Attachment Details window, you will need to click the "Edit More Details" link in the lower right.
- There will be a Protected Content box in the right sidebar that has a Checkbox for "Enabled?" Check that box and the populate the "Show content to..." dropdown with the same Role or group you selected above.
- Click Update.
- Repeat steps 5-8 for each Media item you wish to protect.
If this is not a new page, post, or media, then that content that you want to protect may already be cached outside of WordPress. If that's the case, you will ALSO need to:
- In Web Publishing, there is a Vanish content cache implemented to speed up access to unauthenticated users. You will need to clear the Varnish cache for either the page/post/media or whole site. Clearing the cache is done via the "Cache (Active)" dropdown at the top of the WordPress dashboard.
- If your content is appearing in Google search results, submit to Google to clear the cache of the page/post/media or the whole site from search results using the Google Search Console.