This post was inspired by a tweet from Lorelle, my favorite WordPress expert. Lorelle’s tweet was saying “Make WordPress’ search function suck Less” with a link to this post. I had WordPress search issues in the past and found a few solutions and I thought I would learn a little bit more from this post, but I didn’t.
Basically this post was about manually tweaking your search.php file, which improves the WordPress search feature but it still doesn’t make it a good search feature. The main problem with the WordPress search feature, besides the irrelevancy, is that if you have a large blog of a few hundreds posts, then there is not much you can do to speed up the search.
I don’t pretend to be an expert about WordPress (I’m actually far from that!) but I do think both solutions I will talk about in this post are much better at delivering very good search results for your WordPress blog. By “good search results”, I mean results that are delivered quickly, that are relevant to your search query, and sorted by relevance.
wpSearch Plugin
The wpSearch plugin is like having your own custom search engine on your blog. wpSearch is based on “Lucene“, a full-featured open source text search engine. wpSearch is fast, and relevant, which is pretty much everything I need from a search engine on my blog.
To set up wpSearch on your blog, simply download the plugin from here, then upload it, set permission to 777 (very important), and activate the plugin from your admin panel. After activating it, you will have to build the search index database, which may take a while (about 5 posts/second) if you have many posts on your blog. That’s all there is to it. Now check your search feature and you will see a huge difference in the results you will get. The relevancy will be so much better that like me, you’ll want to blog about it ;-)
Adsense For Search
Adsense for Search (AFS) is now my favorite search feature for my blogs for 2 reasons: for one it is the best search engine you can get; and two, you can actually make money from it. Even though I hate Google as a company, I can’t deny that their search algorithm delivers the best you can get from a seach engine thus far.
Now the main concern about Adsense For Search is that you have to rely on Google to crawl your website to index your new posts. Some people won’t use Adsense For Search for this one reason. Yes, you have to wait for Google to crawl your site and index your pages but how much does that really matter in your case? I mean, is it that important to you that your post must be foundable immediately after being published?
Besides, one benefit of Adsense For Search that I have been able to verify on all my blogs is that when AFS is implemented on your site, Google will come visit you quickly and more often. I haven’t done scientific tests on this, but I was able to notice it on many occasions. Most of the time, when I publish something on my blogs, the post is picked up by Google within hours, sometimes within minutes.
To set up, AFS, you will need a Google Adsense account.