Switch language
wpseek on Twitter

A WordPress-centric search engine for devs and theme authors

wpmu_create_blog [ ]

wpmu_create_blog ( $domain, $path, $title, $user_id, $meta = array(), $site_id = 1 )
  • (string) $domain The new site's domain.
  • (string) $path The new site's path.
  • (string) $title The new site's title.
  • (int) $user_id The user ID of the new site's admin.
  • (array) $meta Optional. Used to set initial site options.
  • (int) $site_id Optional. Only relevant on multi-network installs.
  • (mixed) Returns WP_Error object on failure, int $blog_id on success
Defined at:

Create a site.

This function runs when a user self-registers a new site as well as when a Super Admin creates a new site. Hook to 'wpmu_new_blog' for events that should affect all new sites.

On subdirectory installs, $domain is the same as the main site's domain, and the path is the subdirectory name (eg 'example.com' and '/blog1/'). On subdomain installs, $domain is the new subdomain + root domain (eg 'blog1.example.com'), and $path is '/'.



Top Google Search Results

More ...

User Note(s)