WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 2 down vote accepted

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.

share|improve this answer
I think you mean: wordpress.org/extend/plugins/multisite-global-search – onetrickpony Jul 21 '11 at 9:17
probably, true but both work/ed on the multisite structure of the database so the Idea is mainly the same – Bainternet Jul 21 '11 at 9:35
@Bainternet Thank you! it's great I can get idea in structure with this :) – idontknowhow Jul 22 '11 at 0:35

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...

share|improve this answer
that's right thanks for the idea :) – idontknowhow Jul 22 '11 at 0:34

I use google search with adsense. That works great if you setup the search to only search your domain. It will search all subdomains to


Note: It will only find pages indexed by google. So you must wait for a while until newest posts appear there.

share|improve this answer
You can also use Google Custom Search to search your entire domain. – Chris_O Feb 7 '12 at 19:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.