Skip to main content
Agency Program Get 2× more leads and save 50% on hosting. Built for agencies ready to grow. Book a call
Force Login icon

Force Login

v5.6.3
by Kevin Vess · 4.8 (100 reviews)

Force Login is a simple lightweight plugin that requires visitors to log in to interact with the website.

30K+ active installs Updated Feb 07, 2025 Tested to 6.7.2
Try Demo Download
Pre-installed Ready in ~10s No card
Force Login

About Force Login

Force Login is a WordPress plugin that allows you to easily hide your website from public viewing. Visitors will be required to log in before accessing your site. It is compatible with WordPress Multisite, has a developer API, and is customizable. Bug reports can be submitted on GitHub.

Frequently asked questions

What is Force Login?
Force Login is a simple lightweight WordPress plugin that requires visitors to log in to interact with the website. It allows you to easily hide your WordPress site from public viewing by requiring visitors to log in first.
What are some key features of Force Login?
Key features include WordPress Multisite compatibility, login redirects to the previously attempted URL, and an extensive Developer API. It also offers customizable login redirects and the ability to filter exceptions for certain pages or posts.
Does Force Login support translations?
Yes, Force Login is Translation Ready and WPML certified.
How does Force Login handle the REST API?
Force Login can restrict the REST API to authenticated users.
Where can I report bugs for Force Login?
Bug reports for Force Login are welcomed on GitHub. Please note that GitHub is not a support forum.

Changelog

5.6.3

  • Fix – Fixed issue for sites with a custom login URL.

5.6.2

  • Fix – Fixed issue for sites with a custom login URL.

5.6.1

  • Fix – Fixed too many redirects issue for Multisite users.

5.6

  • Feature – Added filter for Multisite unauthorized error message.
  • Tweak – Allow logged-in Multisite users to access bypassed pages of other sites.

5.5

  • Tweak – Deprecated whitelist filter, use v_forcelogin_bypass instead.

5.4

  • Tweak – Improved the visited $url variable.
  • Tweak – Changed code to comply with WordPress standards – props Alex Bordei.

5.3

  • Feature – Added nocache_headers() to prevent caching for the different browsers – props Chris Harmoney.
  • Tweak – Removed $url parameter from whitelist filter.

5.2

  • Feature – Added $url parameter to bypass and whitelist filters.
  • Tweak – Updated Multisite conditionals which determine user access to sites.
  • Tweak – Moved ‘v_forcelogin_redirect’ filter to improve performance.

5.1.1

  • Fix – Improved the REST API restriction to allow alternative modes of authentication.

5.1

  • Tweak – Restrict access to the REST API for authorized users only – props Andrew Duthie.
  • Tweak – Added load_plugin_textdomain() to properly prepare for localization at translate.wordpress.org.

5.0

  • Feature – Added filter to bypass Force Login redirect for allowing pages without specifying a URL.
  • Tweak – Changed the hook for Force Login to run at a later stage in the WordPress tree.
  • Fix – Replaced deprecated function – props Just-Johnny.

4.2

  • Tweak – Made plugin translation ready.

4.1

  • Fix – Multisite ‘Super Admin’ users do not need assigned sites to access the network.

4.0

  • Feature – Added exceptions for AJAX, Cron and WP-CLI requests.
  • Fix – Only allow Multisite users access to their assigned sites.

3.3

  • Fix – Check for existence of explicit port number before appending port – props Björn Ali Göransson.

3.2

  • Tweak – Removed v_getUrl() function to reduce possible duplicates of global functions – props Joachim Happel.

3.1

  • Fix – Rewrote v_getUrl() function to use HTTP_HOST instead of SERVER_NAME – props Arlen22.

3.0

  • Feature – Added filter for the redirect URL on login.
  • Feature – Added filter to allow whitelisting of additional URLs.

2.1

  • Fix – Rewrote v_getUrl function to include the server port – props Nicolas.

2.0

  • Feature – Added redirect to send visitors back to the URL they tried to visit before logging in.

1.3

  • Fix – Fixed password reset URL from being blocked – props estebillan.

1.2

  • Tweak – Streamlined code

1.1

  • Fix – Allow access to the registration and the lost password page URLs – props jabdo.

Try other plugins