Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress: difference between site_id and blog_id?

I'm trying to get some understanding of how Wordpress works and while inspecting the database I found that, in a multisite installation, there is a table called wp_site that seems always holding a single record with a corresponding site_id. I cannot understand (nor find on internet) what is the use of site_id when actually multisites seem to use wp_blogs and corresponding blog_id for identifying different sites.(http://codex.wordpress.org/Database_Description)

Can someone shed some light on what should be my understanding of site_id?

Thanks

Giuseppe

like image 785
Giuseppe Romagnuolo Avatar asked Nov 15 '10 12:11

Giuseppe Romagnuolo


Video Answer


1 Answers

site is a reference to a network of blogs. There are efforts under way to allow WordPress to support multiple networks in addition to multiple blogs, but right now that's not a stock feature (which is why the wp_site table only contains one value.

The wp_blogs table contains all of the blogs for your entire installation, with each identified by the site it's associated with.

This gives you a clean separation between networks, and (eventually) you'll be able to have different "groups" of blogs on one WordPress installation behave like distinct multisite installations.

like image 95
EAMann Avatar answered Oct 07 '22 22:10

EAMann