[wp-trac] [WordPress Trac] #37923: Introduce shared wp_blogmeta database table for multisite installations

WordPress Trac noreply at wordpress.org
Fri Sep 2 18:41:55 UTC 2016


#37923: Introduce shared wp_blogmeta database table for multisite installations
--------------------------------+-----------------------------
 Reporter:  johnjamesjacoby     |      Owner:
     Type:  feature request     |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Networks and Sites  |    Version:
 Severity:  normal              |   Keywords:  2nd-opinion
  Focuses:  multisite           |
--------------------------------+-----------------------------
 In a multisite installation, it would be nice to be able to query for
 sites using some kind of other arbitrary method. This currently is not
 possible because each site has it's own `_options` database table. (This
 is totally fine, and makes sense considering the huge number of options
 each site will usually have.)

 However, with the introduction of `WP_Site_Query` and now having the
 ability to query for sites in a multitude of ways, a dedicated `blogmeta`
 database table would pair nicely with the `WP_Site` object.

 This may not be necessary for core right away, but eventually, some
 multisite-specific options could get moved here to avoid polluting the
 per-site options table. For example, the `new_user_` options when inviting
 existing users to an existing site, are a multisite specific option that
 is auto-loaded, causing a potentially costly recalculation of `alloptions`
 just to invite a user to your site.

 A few other neat potential core usages off-the-top-of-my-head:
 * Store for the total number of users in each site, and query by most
 popular
 * Store for the total number of published posts in each site, and query by
 most active
 * Store the Blog Name, and query for sites alphabetically
 * Store a `site_owner` user ID, and query for sites the user "owns"
 relatively efficiently (compared to the `LIKE` query on `usermeta`)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37923>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list