[wp-trac] [WordPress Trac] #27701: WordPress Multi-site Global Query
WordPress Trac
noreply at wordpress.org
Tue Apr 8 00:14:09 UTC 2014
#27701: WordPress Multi-site Global Query
-------------------------+------------------------------
Reporter: kegster | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by knutsp):
Interesting suggestion.
When wanting one "big" CMS WP Multisite is usually not the optimal
solution. There are two main reasons for setting up a "integrated"
Multisite as a "trusted" network. One is the ability to have different
domains or paths, the other is to have different themes. The recommended
way of separating content into thematically different realms is to use
categories strictly and have no "blog page".
One may have WordPress display a different theme for each (main) category
or some other taxonomy. One could think of a solution having different
domains on the same site, filtering the category or a "site taxonomy" by
domain.
By setting up a multisite you separate all content into different DB
tables. A special installation of multisite using a common posts/postmeta
should perhaps be possible, and this table could have a "site" column. It
would be fairly complicated to support both ways, I'm afraid.
The last way is to have a special WP_Multi_Query, or integrated into
WP_Query, as you suggest, to query several tables. How would the SQL for
such query look like? Just adding a site argument, and make WP_Query use
switch_to_blog() would not be effective.
Is it possible to set up a view in MySQL to join different tables and have
new "virtual" primary key based on site+ID?
I don't see this kind of thing in the suggested multisite roadmap.
I believe the only way forward here is to demonstrate fast querying for
multisite posts, introducing a new API, in a plugin. Then this plugin
would be the solution, most probably.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27701#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list