Multisite Installation: how do I setup global search?

I think the best way to do it is to index all the posts and search through them in database. This method should be the fastest when you perform a search because you can filter posts, create the pagination etc. Check this tutorial https://rudrastyh.com/wordpress/search-across-wp-multisite.html

Another way is to to something with switch_to_blog() function – I mean to search each site individually and then to rearrange the results, but I suppose it would be a very slow code. Especially if you have a lot of site in your network.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)