The going through the mu functions source I come across references to two different ids for sub-blogs - site id and blog ids. In what context is each used?

  • site_id = the ID of the parent site (the domain, eg. wordpress.com)
  • blog_id = the ID of the parent site's blog(s) (usually sub-domains, eg mary.wordress.com)
  • Yep. the admin are use of the word site is not the same as the db use of the word site. – andrea_r Dec 18 '10 at 23:12
  • I just wanted to add my own note in here for anyone who stumbles on this. wp_site has the main site in MU, and wp_blogs contains sub-sites. – Shawn Jan 9 '14 at 20:42

In a Multisite install (and also since WordPress 3), you can have a several blogs (identified in the database model by blog_id) within one site (identified in the database model by site_id).

The thing that I found confusing in this context, though, is that most of WordPress code and documentation will use a terminology that differs from the database model. They refer to a blog using the word site, and to a site using the word network.

For example, this section of the Codex refers to the Site URL (as defined in the WP_SITEURL constant), which really is the URL of the blog URL in multisite context.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.