Support » Networking WordPress » Efficient use subdomain content in multisite

  • Hi!

    I have a general ‘good practice’ question.
    I have a multisite network with subdomains. There will be probably about a dozen subdomains when I am done, not more. The traffic on each site is low, I don’t expect the network to reach over a few thousand unique visitors a day.

    Some of the subdomains are mapped to domains since they are individual project websites.
    Some domains contain only, for example, a media library or a database of organizations, another contains news etc. Each piece of content is created only once in the network and tagged in a specific way to denote where it should be shown. The other sites then query the content by the tags and output it.

    Currently the querying is done by switch_to_blog -> do a query -> foreach -> setup_postdata -> output the necessary information.

    My question is: how resource efficient is this type of querying and is there a more efficient way to do this? I have little experience with code outside WordPress which is why I have chosen this solution instead of building things from scratch and I would like to keep it as WP because it is so incredibly convenient.

Viewing 5 replies - 1 through 5 (of 5 total)
  • how resource efficient is this type of querying

    Not very.

    is there a more efficient way to do this

    Maybe…. The thing is, duplicating content is generally a poor idea and best practice is link everyone to the one post.

    But … Are you just trying to search all sites in the network for data? Because you COULD use the Sitewide Tags plugin, collect all the posts on one ‘site’ on the network, and search that. It’d be faster.

    I am doing this exactly to avoid content duplication – in the database.
    Here is explanation of my awesome architecture.

    We have one central site that has all news posts for our organization.
    We have a CRM site that has all the organizations we work with.
    We have a media library site that will host all the media galleries from events and such as well as images for press.

    Then we have several event sites which become active at some times of the year. The news written about these events need to be published on both central site and event sites, because we have different user groups for those sites that all need to be informed, but writing separate content is pointless and not going to happen. Thus I want to query the relevant news from the central site by tag.

    The participant organizations need to be listed, and I want the information to be up to date so I want to query them from CRM. Since CRM will be tracking the project progess anyway, it makes even less sense to duplicate the organization information.

    Media from the events should be available on both event sites and the media sites, since again, it is different groups of people that will be accessing them and I want the media to be available regardless to which site they go.

    The reasons for this makeup are partly political, partly I want to simplify management of a ton of project sites for the organization, since they have little manpower and even less technical expertise. Keeping an eye of 10 sites is hard even for me, for them, it simply won’t work.

    Ehhhh. Yeah, that’s one of the things Multisite doesn’t do so good, cause it’s not what it was meant to do.

    To clarify: Multisite was mean to host multiple separate sites, with no shared/cross-related content. So no, it’s not very good at what you need.

    Do you have to have Multisite for this? You can use Custom Post Types, and limit people to their own CPT so they can only post one kind of thing…

    Something for me to do when I actually learn to code then 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Efficient use subdomain content in multisite’ is closed to new replies.