insert_blog ( $domain, $path, $network_id )

  • (string) $domain The domain of the new site.
  • (string) $path The path of the new site.
  • (int) $network_id Unless you're running a multi-network installation, be sure to set this value to 1.
  • (int|false) The ID of the new row
Defined at:
Change Log:
  • M: U


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.

Related Functions

install_blog, add_user_to_blog, add_new_user_to_blog, wp_insert_link, wp_insert_post

Top Google Results

User discussions

wpseek mobile