Search post in all blogs in WPMU?

Is there a coding doc or tutorial to create a SEARCH where it search post in all Blogs in WPMU that will place in WPMU primary site SEARCH?

Related posts

Leave a Reply

3 comments

  1. Take a look at WPMU Global Search plugin which can easily search through all blogs into your WordPress MU posts by post title, post content or post author.

    and if you are not looking for a plugin then just take a look at the code and see how it’s done.

  2. The best approach is to create a “must-use” plugin that gathers post data when a post is submitted on any blog, and store it into a custom database table on the primary blog (and eventually delete it when a post is deleted).

    For example hook a function on save_post that gets the post permalink, title, content or tags, number of comments, blog id, post id and stores them into a row of your custom table.

    When someone does a search you pull out information from this table, instead of querying dozens of blogs.

    You could use plugins like the one mentioned above, but these are not very good for larger sites. For example, I get around 10K queries using 1GB memory with “multisite-global-search” and that’s just for a setup of 20 blogs with ~3000 posts. Needles to say it took 30 seconds to complete…