WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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 '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.

share|improve this answer

Your Answer


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.