I don’t have the domain mapping on a test installation at hand currently, but what should work is:
add_action( 'template_redirect', 'auth_redirect' );
As a plugin here: T5 Force Log In.
auth_redirect()
is WordPress’ native handler for authentication, if it doesn’t work, something is broken in core code.
Related Posts:
- How do I remove/delete an old super admin user?
- Is there any central control/access panel for several WordPress sites?
- Delete sites in wordpress multisite (not suspend)
- How to synchronize user profile fields in multisite?
- Get first_name and last_name on user_register hook
- User registration on subsite in multisite configuration
- Can you have multi-site WP and keep users separate?
- Multisite Independent User Base
- Can wp-cli display all users and their roles across all sites in a multisite instance?
- How do I use different domain for subdomains in WP Multisite?
- Deleting a user in multisite
- how do I configure nginx for wordpress multisite, it occurs ERR_TOO_MANY_REDIRECTS
- How do I list multisite users for the current site only
- Assign role to user on first login, if they are first (after admin)
- How to change user starting role in WordPress MultiSite?
- What is meant by Multisite in WordPress?
- Add menu items/actions for multisite users who are registered on the network but do not have a role or capability in any sites
- Multisite User Sync Question about blog authorship
- Preferred method of setting user role only works on Main Site in Network
- Register existing user on another site in a multisite network?
- Subsite access without being a member of the subsite in wp multisite network
- single sign on for wordpress multi site
- Multi-Site Subfolder User Permission Issue
- I want to create a 300 multi-site wordpress network using subdomains
- Network of multisites in WordPress, create new site with all the contents of the main
- Cannot select signup_meta upon multisite user activation
- how to create wordpress network with multiple wordpress installations
- WordPress multisite, allow non super admins to create sites
- User registration is currently not allowed
- How to clone homepage for multi region site?
- Automatically add a registered user on the wordpress multisite network even to just one other site
- Easily adding multiple existing users to a multisite site
- Allowing users to manually add or remove themselves to/from WordPress multisite blogs
- WordPress API – sign-up to multiple Multisites from one single form
- How to automate adduser (on linux) when add new user site in multisite
- Activation of new Registered site fails on multisite
- How to force WP to create a users table in multisite configuration?
- How to give “author” user role appropriate capabilities to add PollDaddy polls? WordPress multisite
- Best way to convert two single WordPress sites into Multisite network with shared user base
- Advice on WP site structure using multisite
- Trying to create site-wide Active Directory sync with Multisite
- Programmatically create blogs with dummy content on a WPMU site
- How to individually set WP_DEBUG on a sub-directory multisite?
- 4 single sites VS multisite wordpress
- multisite htaccess 301 redirects
- Is it still only possible to do multisite domain mapping with a plugin in WordPress 4.1?
- Domain redirect in WordPress multisite
- Trying to change the url of a new site
- How to get max upload size and accepted file types on multisite?
- Split a database will improve performance?
- Why are images not displaying?
- Multisite Upload URL?
- WordPress multisite installation broke menu links
- Forgot your password points to main blog on multisite install [duplicate]
- How to use same email for multiple users in Multisite version 4.7
- Hide active themes on multisite subdomains
- How is a user’s primary blog determined?
- Master Site for specific taxonomy in MultiSite
- Multisite favicon.ico
- Password protect a single site on network
- Use separate S3 buckets for separate sites in a multisite environment
- Create a database for each site created in multisite?
- Adding a existing developed site to a multisite installation of WordPress
- 2 website 1 database… Local to online
- How can i define the order of blogs in a multisite network manually (like pages)?
- Multisites – Select homepage based on location
- Switch to blog and get content from that blog
- How can I hide certain sidebars from some users?
- How do I create a multi site network?
- Hosting 2 WordPress websites in /public_html/ & /public_html/subdirectory/ at the same time
- Making a Multisite Dashboard Widget
- wp_get_attachment_image_src returns incorrect URL on multisite
- Locking one blog of many in a multi user/blog WordPress installation
- How do I disable XML-RPC in WordPress Multisite?
- Include www prefix in site URL
- Is this possible? A multisite with “www.example.com/en/blog/” and “www.example.com/cn/blog/” (two directories deep)
- How to modify wp_config file for set up subdirectory?
- Sharing users across multiple sites, each on their own database
- Activation Account Email
- How to automatically translate plugin using translate.wordpress.org
- May I do multiple micro-sites with different themes in a single wordpress without subdirectory nor subdomain separation?
- How do I export a single site in a multisite content without using a plugin? The default WP export does not catch all
- Multisite Smtp Server
- Media library links broken WordPress Multisite after SSL update
- When hooking wp-cron to system
- WordPress network, add extra directory to subsite urls
- Register a user only to the root blog – WP Multisite
- Update Same Contents on every Page
- WooCommerce API Returns 401
- WordPress Multisite Network Subdomain
- Use a single WP installation instead of three
- Multisite authorization error 401
- How create a multisite setup with “phantom” accounts and passwords?
- is there a if multisite have posts function?
- Multisite – mix sites that use subdomains with sites that use paths
- WordPress Multisite — Have same navigation, sidebar and footer across all sites.
- Primary site file uploads failing, subdirectory subsites upload fine
- Subdomain Wp-Admin Not Found
- Run “get_the_post_thumbnail” with a different table prefix?
- Pick your brain on wp-config.php if statement for multisite