Probably the easiest way is to use a plugin.
Ultimate Member – User Profile & Membership Plugin is a good one.
Activate it on your site, then in the settings you can limit your site to be accessed only by logged in users. If they are not logged in, you can redirect them to the login page.
Make sure to uncheck the “Allow Homepage to be accessible” checkbox.
Related Posts:
- Change GitHub Account username
- Google OAuth 2 authorization – Error: redirect_uri_mismatch
- What are the main differences between JWT and OAuth authentication?
- How to use OAuth authentication with REST API via CURL commands?
- How to validate a user from ouside wordpress/php?
- Override user authentication with external credentials
- JWT authentication with WP – Approach
- why does WordPress need two cookies for auth/login
- Extend WordPress (4.x) session and nonce
- How to use WordPress authentication on non-WordPress page?
- How does ifttt.com authenticate a supplied WordPress account
- Storing Dropbox Authentication?
- WordPress as a OAuth Provider
- Authentication for wordpress website
- How to leverage authentication outside of WordPress?
- How do I execute a wp_remote_get call using NTLM authentication?
- Outgoing proxy connection problem
- WordPress SSO with MemberPress
- Authenticated request to WP REST API V2 returning 403 error on /users/me [closed]
- Set authentication cookies to be shorter but then extend with every page load
- WordPress user Authentication
- WordPress asking for FTP details when installing plugins
- How to password protect media library files (PDF)?
- How to use Azure AD for authentication?
- for a role-protected page, programmatically login user and load page
- guest authentication
- wordpress 3.9 remote token auth
- How to set up Shibboleth authentication for a MU site
- Login after “Read More” then return to article
- How to make WordPress use authentication from Parent Site
- Allow users to create post without logging in?
- auto logout user when user logout on one of the opened tab
- How can I have authenticated WordPress users automatically sign into Moodle?
- Requiring Authentication for Parts of WordPress Site
- WooCommerce OAuth 1.0 + JWT authentication with JS/React
- Authenticating users with usermeta fields
- Getting Authentication required popup
- How can LDAP/Active Directory be integrated in WordPress?
- Recent Posts Listed by Author, Can I exclude authors?
- co-authors plugin – inline listing
- Authenticate Subdomain
- How to create new users with JWT Auth Plugin?
- Mirgrating a user at signon
- Automate WordPress Login
- Application to Website authentication
- Get top authors for the last 30 days with posts count and avatar
- How to authenticate using JWT by ajax?
- Open authenticed WordPress page from mobile app
- Access to customer profile with pin code
- WP link for reset password is not received
- How to make an other web app can login with wordpress authentication?
- How to add additional factor to wordpress authentication
- Adding a “Sign In/My Account” link to an external app
- Check if user is logged in, inside php file in template directory
- Connect my WordPress site users to my public site account without showing my public site credentials
- WordPress Multisite and site speed and scaleability
- Blocking the direct access to images in the upload folder WordPress
- How to track all users logged into a site?
- Can you pass user/pass for HTTP Basic Authentication in URL parameters?
- What is the difference between authentication and authorization?
- wp_signon by user’s login by their particular role
- Unable to login with correct password
- Authentication versus Authorization
- What is an Endpoint?
- Git push results in “Authentication Failed”
- Git push results in “Authentication Failed”
- Git push results in “Authentication Failed”
- nodejs – error self signed certificate in certificate chain
- Google OAuth 2 authorization – Error: redirect_uri_mismatch
- What ports need to be open for TortoiseSVN to authenticate (clear text) and commit?
- How do I remove documents using Node.js Mongoose?
- PG::ConnectionBad: fe_sendauth: no password supplied
- PostgreSQL error: Fatal: role “username” does not exist
- Authenticating in PHP using LDAP through Active Directory
- How to check if a user is logged in (how to properly use user.is_authenticated)?
- How to bypass (deprecated) reCAPTCHA V1?
- Automatic WordPress Login of Logged In ClickFunnels User
- Can I programmatically login a user without a password?
- How to: Make JWT-authenticated requests to the WordPress API
- Create API for single sign-on with 3rd party site
- How to Change the Default Home Page for the WordPress Dashboard?
- Users with custom roles not showing in post author select box
- How do I require authorization / login to view a specific set of posts / pages?
- What is $interim_login?
- Set up WP Authentication from External API
- Multi user site and image captions
- Adding extra authentication field in login page
- What exactly is ReAuth?
- Schedule Posts to Publish from Dates/Times Pre-Set by Admin
- WordPress auto login after registration not working
- Login members using web services
- How to check username/password without signing in the user
- WordPress REST API – Permission Callbacks
- Disable WordPress 3.6 idle logout / login modal window / session expiration
- Author template, filter sidebar widgets by author?
- How to pass users back and forth using session data?
- How to secure or disable the RSS feeds?
- Set up collaborative site
- custom XMLRPC method plus authentication of user & WooCommerce order
- Fetching private posts or custom post types via WP-API with basic authentication