Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/install blog

This page redirects to an external site: https://developer.wordpress.org/reference/functions/install_blog/

Description

Install an empty blog.

Creates the new blog tables and options. If calling this function directly, be sure to use switch_to_blog() first, so that $wpdb points to the new blog.

Usage

<code style="color: #000000"><span style="color: #0000BB"><?php install_blog</span><span style="color: #007700">( </span><span style="color: #0000BB">$blog_id</span><span style="color: #007700">, </span><span style="color: #0000BB">$blog_title </span><span style="color: #007700">); </span><span style="color: #0000BB">?></span></code>

Parameters

$blog_id
(int) (required) The value returned by insert_blog().
Default: None
$blog_title
(string) (optional) The title of the new site.
Default: empty string

Change Log

Since: MU

Source File

install_blog() is located in wp-includes/ms-functions.php