Over the past few months I have been using this blog to explain how to solve technical problems in WordPress. I’ve covered solving site speed issues, Google AMP, the hidden pitfalls of SSL, fixing broken links, and a host of other issues.
Today we’re going to talk about search.
No, not SEO and Google,; I am referring to that search box you added to your sidebar and then forgot about.
The WordPress search box is a feature almost no one thinks about after they add it to the sidebar or menu bar, which is a shame. Search is often a critical feature on a website; it’s how visitors find content on your site without having to leave and head to Google.
Search is important, and that is a problem because WordPress only offers the most basic search feature. It works – mostly – but not very well. It can only list results by date. and frequently misses posts and pages that have only an approximate relationship with the search term.
This is why I now make a point of installing a plugin to replace the standard search feature with a custom search option.
A lot of sites use Google custom search, the site-specific search engine from Google. This works fairly well, but I have also found that it sometimes breaks for visitors that are using ad blockers. (It is also difficult to integrate with menu bars, but that is less important.)
My current preferred plugin is called Relevanssi. It automatically replaces the standard search feature, which means you don’t have to change any pages or sidebars on your site, just install this plugin and set it up,
Relevanssi builds its own search index for a site and then uses that index every time a visitor conducts a search. As a result it is faster than the original search feature.
It is also more thorough. The phrase “testy test tst” won’t give any useful results with the original search feature, but Relevanssi will find incomplete matches.
When it comes to customization, Relevanssi lets you select which parts of your site to index, and can even index the comments and author profiles. And it lets you set the relative importance of the title, post content, etc.
There’s plenty to like about Relevanssi, and I haven’t even gotten to the best part.
My current favorite Relevanssi feature is the query log. It can track all of the searches made by visitors, giving you a handy list of what your visitors want to know. This data is explicitly useful because it gives ideas about what pages you should add to your site, or what you should focus on when revising an existing page.
So if you don’t have Relevanssi or a similar plugin installed on your site, you should definitely add it soon.