insert_blog
- insert_blog is deprecated since version 5.1.0!
Alternative: wp_insert_site()
insert_blog ( $domain, $path, $site_id )
Parameters:- (string) domain The domain of the new site.
- (string) path The path of the new site.
- (int) site_id Unless you're running a multi-network install, be sure to set this value to 1.
See:Returns:- (int|false) The ID of the new row
Defined at:Change Log: - Introduced in WordPress: —
- Deprecated in WordPress: 5.1.0
Description
Store basic site info in the blogs table.This function creates a row in the wp_blogs table and returns
the new blog's ID. It is the first step in creating a new blog.