A proper search function for your WordPress website

, ,

Really smart: A search integration with Algolia for your WordPress website.

If you have a search function built into your WordPress website, you’re probably familiar with the standard search. It does what it’s supposed to do – but unfortunately not very well most of the time.

WordPress mainly searches the titles and content of posts and pages. What it does not search by default: individual fields (such as user-defined input fields), categories, keywords or documents such as PDFs. File attachments are also generally not included.

The standard search is also relatively simple. It only searches for exact matches. If someone enters “course”, for example, but your post only contains “workshops” or “further education”, it will not be found. This quickly leads to frustration among visitors – especially if your website has a lot of content.

Although the search results appear “immediately” on a separate page, the loading time for the search results usually takes longer for larger websites with many articles or products. Users enter a word, click on “Search”, and then sometimes have to wait a few seconds or longer.

Better search results with Relevanssi

A very common solution for improving WordPress search is the third-party plugin Relevanssi. I sometimes recommend it to customers who want a better search function but don’t want to use an external system.

Relevanssi completely replaces the standard search. The plugin indexes content in the background, saves it in its own database and then delivers much more relevant results for a search query. It not only searches posts and pages, but also (optionally):

  • User-defined fields
  • Categories and keywords
  • Comments
  • Own contribution types (e.g. products or events)

The free version is completely sufficient for many websites. However, if you want to search PDF documents or support multilingual content (e.g. with WPML or Polylang), you will need the Pro version.

One small catch: Relevanssi works on the server side, i.e. directly on your website. If you have a lot of content (e.g. an online archive, blog with many posts or many PDFs), this can increase the loading time of the search page somewhat. Again, this is not a real-time search – the results will come up quickly, but not immediately.

Really smart: integration with Algolia

If you want a real high-end search, then I recommend Algolia. This is an external search service that can deliver results at lightning speed – in real time, while you’re still typing. This is a huge advantage, especially if your website has a lot of content and you want users to see matching results immediately.

What makes Algolia special:

  • Speed: The search results can appear immediately as you type. No reloading, no waiting.
  • Intelligent synonyms: Thanks to built-in AI, Algolia also recognises search queries that do not exactly match the content. If someone searches for “doctor”, but you have only entered “surgeon” or “specialist” in the content, these will still be displayed.
  • Automatic error correction: Typos such as “eduation” instead of “education” are no longer a problem.
  • Scalability: Even with thousands of pages and articles, the search remains fast. Because it takes place on Algolia’s servers, the performance of your website is not burdened.

The official Algolia plugin for WordPress connects your website to the Algolia search service. Content is automatically synchronised so that it remains current with every update. You can choose what to search – posts, pages, custom post types, categories, etc.

Private content can also be handled flexibly: Depending on the setting, this can be specifically included or excluded. On your website itself, either a short preview text is displayed in the search results – depending on the specific implementation – or the entry remains completely without a preview. I have implemented this function on the tax portal website in recent weeks, where many specialist articles are only accessible to registered users.

The costs for an Algolia integration

Depending on the scope of use, the Algolia service offers a free entry-level version – but the costs for intensive use with lots of content remain manageable and fair. I customise the integration to your individual requirements – technically and creatively – and flexibly adapt the scope to your budget.

The integration of Algolia is a little more technical and needs to be set up properly – that’s why I do this on behalf of my customers with no fuss. The styling and behaviour of the results display or the search mask can also be adapted to your website.

PDFs and file attachments

PDFs and other file attachments are not automatically searched by Algolia by default. If this is important to you, we should discuss this right at the start of the project.

If you would like to have PDFs searched on your website, it is also important to know: The content is only indexed as simple continuous text. This means that headings, paragraphs or other structural elements from the original document are lost. The clear structure that is usual for articles or pages is missing – which can affect the relevance and clarity of the search results.

Conclusion

If your website is manageable and the standard search is not enough, Relevanssi is a good first step. You get better results, more control options and a good search experience.

However, if you have a lot of content or want the search to be extremely fast and intelligent, then I recommend Algolia. Especially for websites with many products, articles or multilingual offers, this is a clear added value.

I recommend licensing the Pro version of the respective plugin so that the full range of functions can be reliably integrated into your website.

I would be happy to help you find the right solution and optimise the search for your website. Because a good search not only ensures less frustration – it can also help visitors find the right content much faster.

A man with his back to the camera using a search interface on a WordPress website