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?
- How to prefill WordPress registration with social details
- Redirect user using the ‘wp_login_failed’ action hook if the error is ’empty_username’ or ’empty_password’
- wp_signon() does not authenticate user guidance needed
- Disable WordPress 3.6 idle logout / login modal window / session expiration
- Avoid to load default WP styles in login screen
- Integrate recaptcha and wp_signon – what is needed?
- Programmatically log in a wordpress user
- How to Block Access to Standard Login Flow and Comment Flow
- Send reset password link to user from custom lost password form
- Change sign-on URLs for security purposes
- Can’t stop hacker trying to get admin access in WordPress blog after trying many ways [closed]
- Hook for fail and successful login actions
- How does WordPress track that a certain User is Logged-In
- Mobile users redirected to a different page on login unless linked to another post
- 2 wordpress blogs with 1 users table and 1 login
- How can i add validation to this login form with out it redirecting to the wp-login.php page
- Custom login page always redirecting to wp-login.php
- Force users to register in order to view website [duplicate]
- auto login after registeration for wp-members plugin
- Passing username to login screen
- How to Get Logged-in to “Remote WP Site” from my local script (in Same Browser)?
- v5.6.2 User cannot stay logged in – wordpress_test cookie placed but not auth cookies
- How to set JWT token with PHP on successful login?
- wp-admin redirects to subdirectory after moving installation to subdirectory
- Share WordPress login info with other PHP app
- WordPress c-panel login error [closed]
- How can I change the email sender name from wordpress to (myblogname) on the “lost password” email?
- Changed primary domain and now wordpress login won’t work
- Keep user session with custom implementation of user login
- Too many login attempts
- Forcing frontend login with UI switch
- Sidebar login widget with error print, returns an error
- Login without Password
- Temporarily locked out … how long is a “short while”?
- Change default login auth
- Does deleting the table users prevent all logins?
- Add html to wp_login_form
- Sign in with social media accounts without creating a WP account [closed]
- How are all users now set to inactive?
- Membership Plugin with Facebook integration [closed]
- Unable to login into WordPress 401
- Google reCaptcha on WP login page
- Recovering log in information
- Extend Cookie with auth_cookie_expiration not working
- WordPress login page not display
- WordPress Login & Register works in localhost but don’t work on server
- Opening WordPress on wordpress.example.com, while the webpage is at example.com
- prevent login after incorrect password 5 times
- Why does /wp-admin login send me to this landing page?
- Locked out of WordPress admin area [closed]
- WordPress login page blank after customizations – works on other sites
- WordPress does not send email confirmation to newly registered users
- How do I resolve my inability to login to WordPress dashboard? [duplicate]
- Chrome incorrectly displaying WP login as ‘not fully secure’
- Changed from HTTP to HTTP, can login no longer login
- Without user loging inner page is disable wordpress [duplicate]
- Registration and Login form
- Share login status across subdomains without network
- How to change the login URL
- Can i hide a dynamically created div to logged out users?
- Why am I not able to login to the admin
- WP behind haproxy weirdness