{"id":25832,"date":"2021-06-19T15:00:36","date_gmt":"2021-06-19T13:00:36","guid":{"rendered":"https:\/\/qodeinteractive.com\/magazine\/?p=25832"},"modified":"2022-01-13T12:12:52","modified_gmt":"2022-01-13T11:12:52","slug":"how-to-password-protect-wordpress-site","status":"publish","type":"post","link":"https:\/\/qodeinteractive.com\/magazine\/how-to-password-protect-wordpress-site\/","title":{"rendered":"How to Password Protect Your Whole WordPress Site"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]For one reason or another, you might want to allow only certain people to view your website. Everyone from <a href=\"https:\/\/qodeinteractive.com\/theme-category\/magazine-wordpress-themes\/\">online magazines<\/a> to businesses that provide service online and message boards routinely restrict access to their website \u2013 either the whole thing or just a part of it. And it\u2019s really simple to do \u2013 you just install and set up a <a href=\"https:\/\/qodeinteractive.com\/magazine\/membership-plugins-for-wordpress\/\">membership plugin<\/a>, and you\u2019re done.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]But what happens if you\u2019re not interested in restricting access based on membership? What happens if you\u2019re a developer who was hired to set up a WordPress website and now wants to show their client the live version of the website? You don\u2019t want the client to jump through hoops and have to become a member of their own website.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]This is one of the situations when putting a whole website behind a password without any form of member registration makes sense. It\u2019s an elegant solution to restrict access to an otherwise live website. Thanks to a simple plugin, it\u2019s really easy to set up, too!<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;80px&#8221;][vc_widget_sidebar sidebar_id=&#8221;new-top-picks-banner&#8221;][vc_empty_space height=&#8221;80px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">How to Put a Whole Website Behind a Password<\/h2>\n<p>[\/vc_column_text][vc_column_text]If you check on WordPress.org for password protection plugins that will work on a whole website, you\u2019ll probably come across <a href=\"https:\/\/wordpress.org\/plugins\/password-protected\/\" target=\"_blank\" rel=\"noopener\">Password Protected<\/a>. With over two hundred thousand active installations and a decent average rating, the plugin is certainly the most popular plugin for this purpose. <strong>It doesn\u2019t hurt that it\u2019s free, either.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protected.jpg\" class=\"attachment-full size-full\" alt=\"Password Protected\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protected.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protected-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protected-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protected-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]<strong>The plugin has a couple of downsides you should be aware of, too.<\/strong> For example, any content you upload to it, as well as images, will not be protected. Anyone with their link can access them. The plugin also doesn\u2019t work well on websites that use caching \u2013 either through a plugin or the host\u2019s service. Finally,<strong> if you come across any bugs or issues, it might be better to point them out on the plugin\u2019s GitHub page instead of the WordPress.org one. <\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]But if you\u2019re fine with these downsides or just want to have an easy access control solution before the official launch of a website, <strong>you can go ahead and install the plugin<\/strong>. From your website\u2019s dashboard, go to <em><strong>Plugins &gt; Add New<\/strong><\/em>, search for Password Protected, and install and activate the plugin when it appears in the search results.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protect-Add-Plugin.jpg\" class=\"attachment-full size-full\" alt=\"Password Protect Add Plugin\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protect-Add-Plugin.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protect-Add-Plugin-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protect-Add-Plugin-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protect-Add-Plugin-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Once you install the plugin, you can either find it in the list of installed plugins and access its settings from there, or navigate to <em><strong>Settings &gt; Password<\/strong> <\/em>Protected for the plugin settings. Either way, you\u2019ll end up looking at a user interface where you can<strong> set the password protection status, permissions, the password, IP exclusions, and if you want the plugin to remember you and for how long.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"469\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protected-Settings.jpg\" class=\"attachment-full size-full\" alt=\"Password Protected Settings\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protected-Settings.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protected-Settings-300x145.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protected-Settings-768x372.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protected-Settings-620x300.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]<strong>These are the only options the plugin has.<\/strong> After setting them, anyone trying to access your website from an IP address that\u2019s not whitelisted will be prompted to enter a password before being able to access the website.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/WordPress-Password.jpg\" class=\"attachment-full size-full\" alt=\"WordPress Password\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/WordPress-Password.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/WordPress-Password-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/WordPress-Password-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/WordPress-Password-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;78px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">What Else Can You Password Protect in WordPress?<\/h2>\n<p>[\/vc_column_text][vc_column_text]Being able to protect your website with a password is all fine and well, but it\u2019s not the only option you have. <strong>WordPress was developed with password protection for specific parts of the website.<\/strong> Where WordPress lacks this kind of protection, plugins might be there to step in. Let\u2019s see how you can protect specific parts of your WordPress website with a password.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\">Password Protecting Posts and Pages in WordPress<\/h3>\n<p>[\/vc_column_text][vc_column_text]Sometimes, all you want to do is make sure that people don\u2019t have access to certain posts or pages on your website. <strong>There are a couple of reasons why you\u2019d want to do it, such ensuring that your work is well-reviewed by a third-party before publishing, for example.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]If this is something you\u2019d want to do, don\u2019t worry &#8211; WordPress has given you an easy option to do it. We\u2019ve written <a href=\"https:\/\/qodeinteractive.com\/magazine\/password-protect-wordpress-posts\/\">a whole article about it<\/a> before, so read it to get the full detail.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\">Password Protecting Categories of Posts<\/h3>\n<p>[\/vc_column_text][vc_column_text]If you want to paint with a broader brush and password protect more posts at once, you can do so using a free plugin called <a href=\"https:\/\/wordpress.org\/plugins\/access-category-password\/\" target=\"_blank\" rel=\"noopener\">Access Category Password<\/a>. After installing and activating the plugin, navigate to <strong><em>Settings &gt; Access Category Password<\/em><\/strong>. There you\u2019ll find all the plugin settings.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"612\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Category-Password-Options.jpg\" class=\"attachment-full size-full\" alt=\"Category Password Options\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Category-Password-Options.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Category-Password-Options-300x189.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Category-Password-Options-768x485.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Category-Password-Options-620x392.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]The plugin will allow you to choose the categories of posts whose content you want to password-protect. <strong>You\u2019ll also get to choose between session and cookie protection, excluded roles, and various messages to the visitor.<\/strong> You\u2019ll even be able to modify the form that replaces the content of the articles you\u2019re protecting with the plugin.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\">Password Protecting Parts of Posts<\/h3>\n<p>[\/vc_column_text][vc_column_text]But what if you don\u2019t want a broader brush, but something that lets you paint the finest details? <strong>There\u2019s a way to password protect only parts of posts<\/strong>, and it involves a plugin called <a href=\"https:\/\/wordpress.org\/plugins\/content-protector\/\" target=\"_blank\" rel=\"noopener\">Passster \u2013 Password Protection<\/a>. If you install and activate the plugin, you\u2019ll find a new option in your dashboard menu appropriately called Passster. <strong>Clicking on it brings you to the plugin\u2019s option.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"547\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protect-Passster.jpg\" class=\"attachment-full size-full\" alt=\"Password Protect Passster\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protect-Passster.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protect-Passster-300x169.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protect-Passster-768x434.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/06\/Password-Protect-Passster-620x350.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]<strong>To actually protect parts of your content with the plugin, you\u2019ll have to use shortcode with the following structure:<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[passster password=\"123\"]your hidden content[\/passster]<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]You can replace the \u201c123\u201d password with anything you like and place the content smack in the middle of the shortcode. <strong>When someone visits the post with the content, they won\u2019t be able to see whatever content you\u2019ve added to the shortcode until they\u2019ve entered the password.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">Let\u2019s Wrap It Up!<\/h2>\n<p>[\/vc_column_text][vc_column_text]Password protection is a useful way to <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-make-private-wordpress-site\/\">restrict access to your website<\/a> even if you don\u2019t have any plan to charge for it or allow it only to select members. As WordPress doesn\u2019t have a native function to restrict access in this particular way, you\u2019ll have to rely on a plugin for help.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]That might not be the case if you\u2019re interested in only protecting certain pages or posts on your website, though \u2013 WordPress has that option built-in. If, on the other hand, you want to zoom out and protect more posts at once, or zoom in and protect specific parts of specific posts, you\u2019ll have to once again turn to plugins.<br \/>\n[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Need a way to password protect your whole WordPress website? It&#8217;s very easy to do with just a simple plugin &#8211; we&#8217;ll show you how!<\/p>\n","protected":false},"author":9295,"featured_media":25848,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[34,4,13],"class_list":["post-25832","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-security","tag-tips","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/25832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/users\/9295"}],"replies":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/comments?post=25832"}],"version-history":[{"count":0,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/25832\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media\/25848"}],"wp:attachment":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media?parent=25832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/categories?post=25832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/tags?post=25832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}