User created sites within Multisite?

Hello.

What is the best and most secure/robust way of setting up a multisite network where users can create their own sites?

Obviously once logged in they can, give the site a name and a domain my domain.myblogs.com (if available) etc.

I think BuddPress does something similar to this, but wondered if there was a better way. A nice signup form, clear insturction etc.

Also each user is limited to only creating 1 site at a time, to limit the amount created to a manageable amount?

Thanks for any help.

  • Ash
    • WordPress Hacker

    Hello uol

    BuddyPress uses the same functions of creating sites as wordpress' default function. They just use a customized a form but at the backend, this is same function.

    You can follow these articles to get an idea of your custom registration form:
    http://wpadminuicustomize.com/blog/how-to-customize-for-register-form-for-multisite/
    https://profilepress.net/custom-frontend-multisite-registration-wordpress-form/

    To limit to one blog only, you can try the following code:

    function ds_one_blog_only($active_signup) {
    // get the array of the current user's blogs
    	$blogs = get_blogs_of_user( get_current_user_id() );
    // all users may be members of blog 1 so remove it from the count, could be a "Dashboard" blog as well
    	if ($blogs["1"]) unset($blogs["1"]);
    //if the user still has blogs, disable signup else continue with existing active_signup rules at SiteAdmin->Options
    	$n = count($blogs);
    	if($n > 0) {
    		$active_signup = 'none';
    	}
    
    	return	$active_signup; // return "all", "none", "blog" or "user"
    }
    add_filter('wpmu_active_signup', 'ds_one_blog_only');

    You can use this code in your child theme's functions.php if the theme is not changed. Otherwise mu-plugin is the best option. To create a mu-plugin, go to wp-content/mu-plugins folder. If there is no mu-plugins folder then, create one. Now, inside the mu-plugins folder create file with name anything.php (make sure file extension is .php). Now start with a <?php tag and then put the above code.

    Hope it helps! Please feel free to ask more questions if you have any.

    Have a nice day!

    Cheers,
    Ash

  • Ash
    • WordPress Hacker

    Hello uol

    Does your own Forminator Pro able to create a custom resignation/site creation form?

    Nope, I am afraid. Forminator Pro doesn't have any registration or login form add-on yet. Though our developers has plan to introduce such feature, I don't have any ETA or any news about that right at the moment.

    Have a nice day!

    Cheers,
    Ash

    • Ash
      • WordPress Hacker

      Hello uol

      That code is one year old. I am not quite sure if it still works.

      But as an easy workaround, you can try BuddyPress. Using BuddyPress, you can create custom registration form using buddypress which works with multisite registration. There is a small issue though, buddypress is a social networking platform. So, you may need to make some tweaks to turn those features off.

      Have a nice day!

      Cheers,
      Ash

  • uol
    • Design Lord, Child of Thor

    Hi, thanks.

    Not keen on having the whole of BuddyPress added just for a custom signup form. Are there any other form plugins that enable a custom site registration form?

    Does formidableforms.com accomplish this whilst waiting for Forminator Pro to be updated with this feature?

    Are there any other form plugins that does it?

    • Ash
      • WordPress Hacker

      Hello uol

      I don't see any addon from Formiddable for multisite custom registration form. Though, I have found a discussion here: https://formidableforms.com/help-desk/multi-site-support/ At the bottom they confirmed that they have a beta, but not sure if it was released. Perhaps, if you please send them an email regarding this, they may have a better reply with information :slight_smile:

      I have also looked at gravity form, but I could not find any.

      I think the best option is to develop a customized form and use that as registration form - I mean custom development, not using any plugin.

      Have a nice day!

      Cheers,
      Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.