Hi Umberto,
In a WordPress Multisite setup, user registration settings are primarily managed at the network level, which can restrict the ability to enable or disable registrations on individual sites. However, there are a couple of approaches you can take to achieve the functionality you desire:
- Custom Code: You can add custom code to your theme’s
functions.php
file to control registration per site. For example, you can check the current site and conditionally enable or disable registration based on your requirements. Here’s a basic example:phpCopy codeadd_action('wp', function() { if (is_multisite()) { if (get_current_blog_id() == YOUR_SITE_ID) { // Allow registration add_filter('registration_errors', '__return_false'); } } });
Replace YOUR_SITE_ID
with the ID of the site where you want to allow registration.
- Plugins: There are plugins available that extend Multisite functionality and may offer more granular control over user registrations. Plugins like “WP Multisite User Management” can help manage user roles and capabilities across sites.
- Network Settings: While you cannot control registration per site in the default settings, you can manage user roles and capabilities at the network level. Consider adjusting user roles to limit access for new registrations.
Remember to back up your site before making any changes and test thoroughly. If you have any further questions, feel free to ask!