I want to programatically create a Blog/Site in WordPress Muti site (Networking enabled wordpres). Is there any API to do that? If Not, Can I directly insert the data into the data base?
I want to create a wordpress site based on one of my custom registration forms from a php page. Any Help/Links to the documentation will be appreciated. Thank you.
this works for sub directory installs:
and this should work for sub domain installs:
if you need to add a blog with and a user at the same time, check out the code in /wp-admin/ms-edit.php around where it says ‘case ‘addblog’:’ on line 139. THere is code to sanitze the domain, following there is code to add a new user from an email.