Improving WordPress search with Algolia

Helping customers to find things quickly reduces frustration and can lead to higher sales. The search functionality provided out-of-the-box by WordPress is at best considered basic. With customer expectations set by the likes of Google and Amazon, how can we improve the often overlooked on-site search experience?

How to Improve WordPress Search with Algolia

If like us, you’re looking to improve the user experience of your website, follow along as we introduce one of our preferred search solutions. Additionally, we will cover a couple of technical tips and tricks to ensure everything plays together nicely.

A problem searching for a solution

The process taken to locate relevant information is otherwise known as the search algorithm.

The out-of-the-box algorithm used by WordPress is fairly simplistic. Relevance is determined by looking for a full sentence match and then for results containing each word individually. The algorithm only looks across two fields, the title and content.

Algoila: search-as-a-service

We’ve worked with a number of search solutions over the years, from WordPress plugins to Solr and Elasticsearch. We’ve recently been integrating with hosted solutions, one such solution being Algolia.

The benefits of using Algolia

The following are a few of the improvements we can expect from switching to an Algolia powered search solution:

WordPress and Algolia

Algolia's find as you type interface in action on Hand Made Places
Algolia in action on Hand Made Places

The integration of Algolia within WordPress is made easier thanks to the WP Search with Algolia plugin.

Initially developed by Algolia, the plugin is now maintained and developed by WebDevStudios.

The plugin handles the indexing of WordPress data. It replaces the default WordPress search algorithm and can also integrate Algolia’s Instant Search feature.

The plugin has interchangeable settings, allowing you to choose the WordPress data to send to Algolia and supports the usual pages, posts, tags and categories. It also picks up custom post types and taxonomies.

Post meta can be used to store additional information alongside post objects. For example, a product may have a field to store its SKU. In order to search by SKU, this field must be registered and indexed by Algolia.

Keeping everything in sync

The plugin monitors content changes by hooking into WordPress. Saving a page triggers a reindex of that item. Deleting a page will remove the item from Algolia.

Algolia’s index can occasionally get out of sync which can lead to less relevant or missing results. The interface allows us to manually reindex. However, this process can be automated.

Algolia pricing is tiered based on the number of indexing operations as well as total record count. As such, we want to keep the number of indexing operations in check.

To automate the reindexing, we’re going to make use of the WP-CLI commands provided by the plugin. Using a cron job, we can schedule a periodic reindex.

To avoid burning through indexing operations, we build a sensible cron expression. Our clients typically follow office hours so we run our indexing operations weekdays at 6pm.

Wrapping it up

Search is an often overlooked aspect of an overall website that contributes to a better user experience. Done well, it can lead customers to the right product, in less time, with less typing.

Get in touch

Speak with us today to find out how we can help deliver a delightful search experience for your WordPress website project.

Drop us a line on 01785 279985

Send us an email hello@kanukadigital.com

Quick Enquiry

Your information will be handled in line with our Privacy Policy.

Insights emailed

Get the latest digital insights, tips and trends. Non-salesy, in your inbox once a month.

If you’d like to know how we handle your data, you can read our privacy policy.

This could be the beginning of something big