Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted
  • 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)
share|improve this answer
    
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 at 20:42
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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