It seems to me that all you should need is this:
function force_login_wpse_89581() {
if (!is_user_logged_in()) wp_safe_redirect(wp_login_url());
}
add_action('template_redirect','force_login_wpse_89581');
That should force users to the login page except for users who have already logged in.
I don’t know what bells and whistles those plugins provide that my solution does not. Maybe you need something more complex.
Related Posts:
- Is there any way to rename or hide wp-login.php?
- Increase of failed login attempts, brute force attacks? [closed]
- How to fake a WordPress login?
- Brute force attack?
- Receiving “This content cannot be displayed in a frame” error on login page
- Websites defaced by uploading script using theme editor
- Make wordpress admin failed login attempt return 401
- Restrict PDF links
- WordPress login urls
- Store brute-force IP addresses
- How to create a private login page for admin.?
- WordPress Security – How to block alternative WordPress access
- Protecting WordPress login page
- wp-admin folder, brute force, and password protection
- Sniffing wordpress user’s credentials
- disable site_url redirect in wp-login.php
- Does WordPress (or a plugin) reveal login credentials to admin?
- Is wp_login_form secure on a non secure page?
- WordPress login security
- Why isn’t the login page rate limited by default?
- How can I password protect a WordPress site without requiring users to log in?
- Input sanitation
- How to Prevent Brute Force Attack on WordPress
- Advice on redirect to lock site from unauthorized users
- How to restrict access to a single for users I’ve authorized? [closed]
- Where is the php file, that does the checks for login information?
- Error on WordPress Login
- Requiring login for specific pages
- Access log “POST /wp-login.php HTTP/1.0” 400
- Require re-login when logged-in user attempts to access restricted page
- I need to find which is the file that checks the DB for correct login (username, password)
- How to create separate login for authors/moderators/subscribers?
- URL Restrictions? Need only people who are logged in AND have a specific role (or roles) to access all pages for a site
- How to invalidate `password reset key` after being used
- Site is not loading after relogin attempts on SSL
- Some crawlers/bots attempting to login with very good guesses. How?
- Hide wp-login.php but not the widget
- How login is possible, if I deny login page via nginx?
- Can’t log in: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”
- SSO / authentication integration with external ‘directory service’
- Preventing session timeout
- Prevent wp_login_form() from redirecting to wp-admin when there are errors
- how to display the wordpress login and register forms on a page?
- How can I add a custom script to footer of login page?
- How do I turn off the ability to login?
- Give visitor access to password protected page/post via external script
- WordPress Login Footer URL
- moving server can not login
- Save last login date in global before change it?
- How to get login data (session) outside WordPress?
- Is back-end access not required for an app to post to my blog?
- How do I make my site publicly viewable? Everything redirects to wp-admin
- Different homepage for logged in users
- reset password link redirect to login page
- Deregister default wp-admin css on login screen only?
- SSO to WP, from a non-wp site on a different domain and server
- How can I login as admin after redirect to custom login page
- Login with serialized password
- Why would the login page reload indefinitely?
- Limiting sessions to one IP at a time
- Set Default User Role
- Creating custom login errors
- Removing wordpress cookie from non-wordpress site
- Why is wp-login trying to send an email?
- Replacing default display name to login name
- Why does is_user_logged_in() return false after I change user password on the front end?
- How to generate “WP_Error” Object for user login?
- ?login=failed only attached to URL under certain circumstances
- WordPress not logged in locally with correct username and password
- my wp-login page doesn’t load [closed]
- login trouble WordPress can change IDs created by hoster site
- WordPress registration page template
- Removing “public” user registration without completely turning it off?
- How to force “remember me” users to login again?
- Reset Password Limit not working
- User not able to sign in after wp_authenticate() and wp_signon() wordpress
- WordPress site login Redirect
- Thank You Page Layout Differs on User Logged In Status
- On Homepage “is_user_logged_in()” function is not working after login and it is working after refresh the page?
- Cant reset password my wordpress password not even with phpMyAdmin
- wp-cron event doesn’t run when custom login API is enabled
- Does it make sense to check a nonce on user log in?
- Special link for no automatic login (no username and no password)
- Global login to password protected pages
- Disable / Remove Password for Login WordPress
- WordPress Auto Login From Email Link
- Building a custom login form – encountering issues
- Making sure two different wordpress website has auto login
- Site login failed due to strange warning
- How do i Redirect specific user(WooCommerce Sign-in not wordpress admin page sign-in) to specific page
- Chosen user password in registration is not being accepted on Login
- Improvements to “limit login attempts” plugin
- Add a required field to Registration
- Front-end login problem: requires re-authorization when accessing dashboard
- Using wp_login_form passowrd as undefined
- Redirect non-members to about/intro page
- When trying to login if already logged in, form just shakes – error message remains empty
- Handle POST request sent from an external site for login?
- Unable to login after adding ReCaptacha without API key
- Log in a user upon password reset?