{"id":204311,"date":"2024-09-25T17:17:00","date_gmt":"2024-09-25T17:17:00","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/private-website-login-required\/"},"modified":"2026-04-02T23:36:47","modified_gmt":"2026-04-02T23:36:47","slug":"private-website","status":"publish","type":"plugin","link":"https:\/\/ps.wordpress.org\/plugins\/private-website\/","author":20943170,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.3.0","stable_tag":"0.3.0","tested":"6.8.5","requires":"5.0","requires_php":"7.0","requires_plugins":null,"header_name":"Private Website - Login Required","header_author":"Robin Oehler","header_description":"This plugin is straightforward to use: you only need to activate it. If you decide that you no longer want to enforce the login requirement, simply deactivate the plugin.","assets_banners_color":"","last_updated":"2026-04-02 23:36:47","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.roehler.nrw","header_plugin_uri":"https:\/\/www.roehler.nrw","header_author_uri":"https:\/\/www.roehler.nrw","rating":5,"author_block_rating":0,"active_installs":200,"downloads":2726,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"0.1":{"tag":"0.1","author":"roehler","date":"2025-05-20 03:58:27"},"0.2.2":{"tag":"0.2.2","author":"roehler","date":"2025-09-05 23:42:19"},"0.2.3":{"tag":"0.2.3","author":"roehler","date":"2025-09-05 23:42:29"},"0.2.4":{"tag":"0.2.4","author":"roehler","date":"2025-09-05 23:52:34"},"0.2.5":{"tag":"0.2.5","author":"roehler","date":"2025-09-06 22:44:27"},"0.2.6":{"tag":"0.2.6","author":"roehler","date":"2025-09-06 22:47:50"},"0.2.7":{"tag":"0.2.7","author":"roehler","date":"2025-09-06 22:58:29"},"0.2.8":{"tag":"0.2.8","author":"roehler","date":"2025-09-06 23:01:35"},"0.2.9":{"tag":"0.2.9","author":"roehler","date":"2025-09-08 20:58:11"},"0.3.0":{"tag":"0.3.0","author":"roehler","date":"2026-04-02 23:36:47"}},"upgrade_notice":{"0.3.0":"<p>Security hardening: closes open REST API, adds clickjack protection, and improves code quality. Recommended update for all users.<\/p>","0.2.9":"<p>Consent banner re-appears after each admin login until you opt in. No data is collected unless you explicitly allow it.<\/p>","0.2.8":"<p>Adds a visible tracking status badge in the Plugins list description block.<\/p>","0.2.7":"<p>Adds a convenient opt-in\/out link in the Plugins list to toggle Appsero tracking.<\/p>","0.2.6":"<p>Adds clean uninstall support (removes Appsero options and scheduled events). Recommended for sites that value easy rollbacks.<\/p>","0.2.5":"<p>Introduces optional usage telemetry via Appsero with explicit admin opt-in and adds a Privacy Policy section. No data is collected by default.<\/p>","0.2.3":"<p>This version improves function naming to prevent conflicts with other plugins and fixes repository structure. Recommended update for better compatibility.<\/p>","0.2.2":"<p>This version updates compatibility for WordPress 6.8.1 and includes minor code improvements. It&#039;s recommended to update for the best compatibility.<\/p>","0.1":"<p>Initial release. No upgrade required.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":1},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3233234,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3233234,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1","0.2.2","0.2.3","0.2.4","0.2.5","0.2.6","0.2.7","0.2.8","0.2.9","0.3.0"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[602,1919,870,7668,713],"plugin_category":[38,58],"plugin_contributors":[232112],"plugin_business_model":[],"class_list":["post-204311","plugin","type-plugin","status-publish","hentry","plugin_tags-login","plugin_tags-members","plugin_tags-private","plugin_tags-restrict-access","plugin_tags-user-authentication","plugin_category-authentication","plugin_category-user-management","plugin_contributors-roehler","plugin_committers-roehler"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/private-website\/assets\/icon-128x128.png?rev=3233234","icon_2x":"https:\/\/ps.w.org\/private-website\/assets\/icon-256x256.png?rev=3233234","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p><strong>Private Website - Login Required<\/strong> is a simple and straightforward WordPress plugin designed to restrict access to your website. By activating this plugin, users must be logged in to view any content on your site. This is ideal for websites that host sensitive or exclusive content and want to ensure that only authenticated users can access it.<\/p>\n\n<p>There are no complicated settings to configure. Simply activate the plugin to enforce the login requirement and deactivate it to remove the restriction.<\/p>\n\n<p>This plugin was developed by <a href=\"https:\/\/roehler.nrw\">Robin Oehler<\/a>.<\/p>\n\n<h3>Privacy Policy<\/h3>\n\n<p>Private Website &#8211; Login Required uses <a href=\"https:\/\/appsero.com\">Appsero<\/a> SDK to collect some telemetry data upon user's confirmation. This helps us to troubleshoot problems faster &amp; make product improvements.<\/p>\n\n<p>Appsero SDK does not gather any data by default. The SDK only starts gathering basic telemetry data when a user allows it via the admin notice. We collect the data to ensure a great user experience for all our users.<\/p>\n\n<p>Integrating Appsero SDK DOES NOT IMMEDIATELY start gathering data, without confirmation from users in any case.<\/p>\n\n<p>Learn more about how <a href=\"https:\/\/appsero.com\/privacy-policy\/\">Appsero collects and uses this data<\/a>.<\/p>\n\n<h3>Bugs &amp; Feedback<\/h3>\n\n<p>Your feedback is important to me. If you find mistakes, have wishes, ideas, or suggestions, please send an email to <a href=\"mailto:mail@roehler.nrw\">mail@roehler.nrw<\/a>.<\/p>\n\n<p>Legal notice (German): <a href=\"https:\/\/roehler.nrw\/impressum\/\">https:\/\/roehler.nrw\/impressum\/<\/a><\/p>\n\n<p>You are free to use it on any website across countries to protect the privacy of your users.<\/p>\n\n<p>Note: Activating this plugin cannot guarantee that your website is completely compliant with GDPR. When using Google Analytics, Facebook pixels, or other similar tools, additional measures may need to be taken.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to the <code>\/wp-content\/plugins\/private-website<\/code> directory, or install the plugin through the WordPress plugins screen directly.<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress.<\/li>\n<li>Once activated, the plugin will automatically restrict content to logged-in users only.<\/li>\n<li>To remove the login requirement, simply deactivate the plugin.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"what%20does%20this%20plugin%20do%3F\"><h3>What does this plugin do?<\/h3><\/dt>\n<dd><p>This plugin restricts access to your website content to only logged-in users. If a user is not logged in, they will be redirected to the login page.<\/p><\/dd>\n<dt id=\"are%20there%20any%20settings%20i%20need%20to%20configure%3F\"><h3>Are there any settings I need to configure?<\/h3><\/dt>\n<dd><p>No, there are no settings to configure. Simply activate the plugin to enforce the login requirement and deactivate it if you no longer want to restrict access.<\/p><\/dd>\n<dt id=\"can%20i%20allow%20access%20to%20specific%20pages%20without%20login%3F\"><h3>Can I allow access to specific pages without login?<\/h3><\/dt>\n<dd><p>Yes! Since version 0.3.0 you can use the <code>private_website_allowed_pages<\/code> filter to whitelist additional page filenames and <code>private_website_allowed_rest_routes<\/code> to open specific REST API routes. Add these filters in your theme's <code>functions.php<\/code> or a custom plugin.<\/p><\/dd>\n<dt id=\"how%20do%20i%20stop%20the%20login%20requirement%3F\"><h3>How do I stop the login requirement?<\/h3><\/dt>\n<dd><p>To stop requiring a login to access your site, simply deactivate the plugin from the 'Plugins' screen in WordPress.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.3.0<\/h4>\n\n<ul>\n<li>Security: REST API no longer open to unauthenticated requests; only auth-related and oembed routes are allowed (filterable via <code>private_website_allowed_rest_routes<\/code>).<\/li>\n<li>Security: Added <code>X-Frame-Options: DENY<\/code> header on redirect responses to prevent clickjacking.<\/li>\n<li>Security: Explicit HTTP 302 status code on login redirects.<\/li>\n<li>New: Allowed login pages are now filterable via <code>private_website_allowed_pages<\/code>.<\/li>\n<li>Improved: DRY slug derivation via helper function; consistent WPCS formatting (tabs, spacing).<\/li>\n<li>Fixed: Namespace check now uses correct single backslash (<code>Appsero\\Client<\/code>).<\/li>\n<li>Fixed: Removed closing <code>?&gt;<\/code> tag to prevent accidental whitespace output.<\/li>\n<\/ul>\n\n<h4>0.2.9<\/h4>\n\n<ul>\n<li>Ask for Appsero consent again after each admin login until consent is granted (re-prompts post-login).<\/li>\n<\/ul>\n\n<h4>0.2.8<\/h4>\n\n<ul>\n<li>Show tracking status badge directly in the plugin description (Plugins screen).<\/li>\n<\/ul>\n\n<h4>0.2.7<\/h4>\n\n<ul>\n<li>Add opt-in\/out action link directly in the Plugins screen for this plugin (enables\/disables Appsero tracking).<\/li>\n<\/ul>\n\n<h4>0.2.6<\/h4>\n\n<ul>\n<li>Add uninstall.php for clean uninstall (removes Appsero options and clears scheduled events; multisite-aware).<\/li>\n<\/ul>\n\n<h4>0.2.5<\/h4>\n\n<ul>\n<li>Add Appsero SDK (opt-in telemetry only), with admin notice and weekly schedule.<\/li>\n<li>Add Privacy Policy section to readme; no data is collected without consent.<\/li>\n<li>Minor refactors; keep strict redirects and security hardening from 0.2.4.<\/li>\n<\/ul>\n\n<h4>0.2.4<\/h4>\n\n<ul>\n<li>Enhanced security with better input validation and sanitization.<\/li>\n<li>Improved code structure following WordPress coding standards.<\/li>\n<li>Added proper internationalization support with textdomain.<\/li>\n<li>Better handling of AJAX requests, REST API, and cron jobs.<\/li>\n<li>Added activation checks for minimum WordPress and PHP versions.<\/li>\n<li>Updated contributor information to link to author website.<\/li>\n<li>More efficient redirect logic with wp_safe_redirect.<\/li>\n<\/ul>\n\n<h4>0.2.3<\/h4>\n\n<ul>\n<li>Improved function naming to follow WordPress coding standards and prevent conflicts.<\/li>\n<li>Fixed SVN repository structure and tag management.<\/li>\n<li>Reduced plugin tags to comply with WordPress.org requirements (maximum 5 tags).<\/li>\n<\/ul>\n\n<h4>0.2.2<\/h4>\n\n<ul>\n<li>Updated \"Tested up to\" for WordPress 6.8.1.<\/li>\n<li>Minor code enhancements for redirect URL generation and logic.<\/li>\n<\/ul>\n\n<h4>0.2.1<\/h4>\n\n<ul>\n<li>Internal code refinements and minor updates.<\/li>\n<\/ul>\n\n<h4>0.2.0<\/h4>\n\n<ul>\n<li>Updated compatibility information (previously tested up to WordPress 6.7.2).<\/li>\n<li>General maintenance and minor improvements.<\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<ul>\n<li>Initial release of the plugin.<\/li>\n<li>Basic functionality to require login for viewing website content.<\/li>\n<\/ul>","raw_excerpt":"This plugin requires users to be logged in to view the website. Activate the plugin to enforce login, and deactivate it to remove the restriction.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/204311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=204311"}],"author":[{"embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/roehler"}],"wp:attachment":[{"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=204311"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=204311"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=204311"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=204311"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=204311"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=204311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}