0

I have wordpress multisite created. Now I want to create a 10 sub sites automatic/programmatically. I have created one form and that form is uploaded on the same server. So once the user filled out that form and the subsite needs to be create automatic. If you have any article, plugin, code or script please help me.

Thank you in advance.

0

With wpmu_create_blog() function, we can create subsites easily.

Add the following code in your form submit

wpmu_create_blog ( 'your_domain', '/subsite_path',  'Title of Subsite', '1' );

NB: if your site url is https://www.example.com then your_domain is should be example.com

Ref: https://www.krishaweb.com/how-to-programmatically-create-new-site-in-wordpress-multisite-within-60-minutes/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.