Description
Restrict Website Access lets you protect your entire WordPress site with a password-based access screen. It is useful when a site is private, under development, in staging, or temporarily not intended for public access.
Key features:
- Password protection for the entire public-facing website.
- Simple setup with no coding required.
- Useful for private, staging, and under-development websites.
- Editable access-screen content and layout options.
- Lightweight interface with straightforward settings.
- Red “Restricted” admin-bar indicator for site administrators when protection is enabled, linking directly to the plugin settings.
Logged-in WordPress users can continue working in the dashboard while public visitors are shown the password screen when protection is enabled.
Source Code
The plugin’s custom JavaScript and CSS source files are included in the distributed plugin under includes/admin/ and includes/public/.
The plugin also bundles the third-party Notyf library:
- Project: Notyf
- Source: https://github.com/caroso1222/notyf
- License: MIT
- Bundled location:
includes/admin/library/notyf/
Installation
From the WordPress Dashboard
- Go to Plugins > Add New.
- Search for Restrict Website Access.
- Click Install Now.
- Activate the plugin.
- Go to Settings > Restrict Website Access and configure access protection.
Manual Installation
- Upload the
restrict-website-accessfolder to/wp-content/plugins/. - Activate Restrict Website Access from the Plugins screen.
- Go to Settings > Restrict Website Access and configure the plugin.
Screenshots
Changelog
1.0.5
- Added a red, clickable “Restricted” status indicator with a stable SVG lock icon in the admin bar for site administrators.
- The indicator reflects the saved enabled state immediately after the settings form completes successfully.
- No changes to restriction, password, or access-screen functionality.
1.0.4
- Hardened input handling, output escaping, redirects, and WordPress coding-standard compliance.
- No intended changes to plugin features or access-screen behavior.
1.0.3
- Changed only the Description field to a rich-text editor.
- Added strict HTML sanitization for supported Description formatting and links.
1.0.2
- Added editable access-screen elements.
- Added a layout option.
- Confirmed compatibility with WordPress 7.1.
1.0.1
- Minor user-interface improvements.
1.0.0
- Initial release on WordPress.org.

