I recently set up a test wordpress 3.0 installation on my server, and I’m experimenting with multiple sites. All I really want to do is have multiple blogs in sub-folders, though this question may very well pertain to sub-domains or separate domains as well.
Here is my question:
In the wordpress super admin area it shows a listing of my sites; however, in the database there is no mention of these sites in the wp_site table. All I can see is them mentioned in the wp_blogs table. So, what’s the difference? And why does the admin refer to them as “sites” when they are referred to in wp_blogs in the database? Am I missing something?
Also, when I’m doing queries of the database, now I need to know the id of the current blog. Where I used to do something like “SELECT * FROM wp_posts” in my plugin, now I have to do “SELECT * FROM wp_[blog_id]_posts” otherwise I’ll always be querying the primary blog.
However, the function get_current_site() only always returns 1 since that is apparently the only site in my database. Why is there no get_current_blog() function?
Am I going about this the wrong way? Any help would be greatly appreciated!
- The topic ‘wp_site verses wp_blogs’ is closed to new replies.