The multisite setup allows you to enable and disable user registration at the network level but if you see the database it store the value in the wp_options
tables for each site.
So we can try the below and see if this work.
Use the below code in the functions.php
file.
function wpse_enable_user_registration( $blog_id = 1 ) {
switch_to_blog( $blog_id );
// Fetching the present option
$user_registration_option = get_option( 'users_can_register', 0 );
if( '0' == $user_registration_option )
$site_registration_option = update_option( 'users_can_register', 1 );
restore_current_blog(); // Switches back to the original blog
return $site_registration_option;
}
If the updation is successful, you will get true
else false
Now you can use the function to enable any subsites in the MU setup by passing the sub sites id
to the function in place of $blog_id
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
- Lock one of WP Network sites for not registered users
- 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
- How to get blog name, when using WordPress Multisite
- Which asset URLs are acceptable in a “vanilla” MU install?
- Using MAMP and Xip.io to view a WordPress Multisite on a local network
- Multisite: use media from one site vs. copying the same media to all language sites?
- Multiple Domains and Subdomains Using Multisite Installation
- Protect Uploads in Multisite
- Subdomain multisite gives 404 on sub sites
- Global Parent theme for all sites
- WordPress Multisite – is it possible to put the main site in a subdirectory?
- the blog owner multisite
- Multisite without .htaccess
- Multisite installation on IIS gives 404 trying to access the admin dashboard
- Is Partial SSL Possible? ( multisite )
- How to properly force https and www on multisite with Apache HTAccess
- Why does the My Site dropdown show only a single domain?
- Performance on WPMS
- Display site administrator’s id by current blog id inside link
- SELinux security vs WordPress updates
- Installed domain-based Multisite but can’t access wp-admin (redirect loop)
- WordPress Multisite Strange Redirect on Primary Site
- Switch MultiSite main site with another (multilingual sites) – with subfolder – no subdomain
- WordPress Multisite’s in subdirectory not redirecting to dashboard settings
- My Media Library is broken across all my subsites
- Updated to version 3.8 and Admin pages are very slow. How to diagnose problem? [closed]
- Multisite install on subdomain w/ subdomains change siteURL
- Make uploads live outside of the WP folder
- Error : Cookies are blocked or not supported by your browser
- How To Run Multiple Multi-Site Networks On Same Box [closed]
- Multiple Websites that share some content types and not others
- Solving a get_user_meta() problem in Multisite
- How to use the sunrise.php script for Multisite network domain mapping?
- How to pull data from child installation to parent theme
- Which is the correct way to migrate content from single WP to WP multisite
- How to have one installation at blog.example.com and multiple blogs in sub folders such as blog.example.com/userA?
- Website not listed under Sites (in a Network environment)
- Running hundreds of WP in multisite
- get_site_option / update_site_option – the main site and sub sites do not share the same storage
- Bitnami multisite change URL of secondary blog
- Number of total comment does not tally with the number of comment?
- Domain not redirected correctly with WordPress Multisite
- Subsites in Multisite throw 404 in wp-admin
- WordPress theme to support single website but with 3 sections for 3 languages
- Can assign a new domain to a site in a multisite?
- Possible to have duplicate usernames on different two multisites
- Main site media are accessible in subsite domain
- Update siteurl and home in multisite subsites to https
- WordPress multi-domain with multiple sites with multiple languages
- Including non-wordpress pages within a single multisite domain
- Domain level problem for multisite?
- How can I import posts into different wordpress multisites at once?
- Redirect www.mainsite.com/subsite/wp-login to www.mainsite.com/wp-login
- How to login a user with wp_set_auth_cookie on a specific blog within a multisite environment
- How does adding custom meta to signup form work?
- Can’t un-archive site after upgrading to WordPress 3.8
- How to handle responsive and non responsive websites in one WordPress Theme?
- Cookies in Multisite network where sites have their own domain name?
- Swap domains of two sites with each other in multisite
- Many big issues in the website, WP_Debug not showing
- WPMU and Chrimes Family Link app