Ready to get started?Download WordPress


Automate Creating Sites In Multi-Site Programmatically (8 posts)

  1. JustinK101
    Posted 2 years ago #


    What is the best way to hook into our multisite install and create new sites dynamically (through php)? We don't want to use the provided sign up page, we wish to use our own separate website and simply set the form action to a script we create to automate the setup.

    Is there a RPC we can call, or a php function?


  2. JustinK101
    Posted 2 years ago #

    Bump. I would think this would be super common. Instead of using wp-signup.php we wish to use our own static page, and simply pass data.

    Basically looking for a way to do this remotely, after some googling, seems like the API or calling wp_remote_request() might work, but what would I pass? How would this work?


  3. Don't bump. It's against the rules.

    What's wrong with the wp-signup.php page? Are you trying to add more options to it, or what?

  4. JustinK101
    Posted 2 years ago #

    Sorry bout the bump. Yeah, the biggest thing we want to implement is a custom invite code. We also want to completely re-style, but that can be done in WordPress with the theme.

    Is there a way for us to extend wp-signup.php and add another field invite, which then should check a custom table to verify the invite code is valid?

  5. ebsalberto
    Posted 2 years ago #

    Justin, I'm thinking you could go with provisioning with WHMCS and having that set up that. It may be overkill but whmcs is a great way to manage your network.

  6. JustinK101
    Posted 2 years ago #

    Yeah, don't need the bloat of WHMCS. We've already setup the infrastructure, nginx+php-fpm+apc+memcache and dual MySQL master-master replication (load balanced).

    I think we may be able to mod wp-signup.php, just need to add the invite field.

  7. ebsalberto
    Posted 2 years ago #

  8. James Collins
    Posted 2 years ago #

    If you do actually want to implement the signup process yourself, you can use WordPress' wpmu_create_blog() function.

    Take a look at the validate_another_blog_signup() function inside wp-singup.php if you want to see how it uses wpmu_create_blog().

    You'll more than likely have to include/require wp.load.php before you can use those functions.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.