Configure Algolia Search for Fast WordPress Searching

Share This:
Configure Algolia Search for Fast WordPress Searching

Algolia provides awesome WordPress search functionality. It is incredibly fast similar to what you get with Elasticseach though Algolia wins in benchmarks. Not everybody wants to host their own Elasticsearch cluster but they want faster WordPress search. Algolia is the answer for a hands-off solution.

Algolia’s free hacker plan allows up to 10,000 records. For reference, I had about 25 rather long posts between 500-1000 words when I tested Algolia and it took up 1784 records. Records consumed depend on the length of your posts. In general Algolia estimate that your records will be 15x your number of posts. This should give you an idea if you will be able to stay on the free plan or move to the starter plan ($49) which gets you 100,000 records.

Configure Algolia Search for Fast WordPress Searching

Sign up for a free hacker account from Algolia

Algolia Sign Up

After you sign in to Algolia you will get a welcome screen.

Algolia has a lot of developer-friendly features, the WordPress plugin will take care of creating indices so you can click Skip tutorial unless you want to explore everything you can do with Algolia.

Algolia Search WordPress Skip Tutorial

We need to get the API information for the Algolia WordPress plugin since that is how our WordPress posts and pages will be sent to Algolia’s indices.

Click API keys in the sidebar.

You will need all of this information for the WordPress plugin so stash this for now.

The small copy icon can be used to easily copy these to the clipboard in a few minutes when you use them in the plugin.

Algolia API Keys

Configure Algolia Search for WordPress Plugin

The Algolia WordPress plugin is in the repository so you can install and activate it from your WordPress Plugins wp-admin area.

Upon activation you may see this error:

Algolia Search requires the “mbstring” PHP extension to be enabled. Please contact your hosting provider.

Algolia mbstring Warning

For PHP7 you can solve the mbstring error by installing this package

sudo apt-get install php7.0-mbstring

For PHP5 you can fix the mbstring error by installing this package

sudo apt-get install php5-mbstring

Click Algolia Search in the Admin sidebar and then its submenu Settings

Add your API keys here from the Algolia API Settings page shown previously.

Click Save Changes.

Algolia Search API Settings WordPress

Pick the Indices you would like to index. They are based on the WordPress MySQL tables.

Click Save Changes.

Algolia Index Content WordPress

After you save the task will start indexing your posts and pages.

Algolia Index Content Done

On the search settings you can choose how to use Algolia.

There are various options, by default Do not use Algolia is enabled which means exactly what it says.

Use Algolia in the backend means you will use Algolia’s indices when searching WordPress.

Use Algolia with Instantsearch.js will enable the Instant search and autocomplete.

Click Save Changes.

Algolia Search Settings WordPress

If you want to use Autocomplete you will need to go to Algolia > Autocomplete and choose which post types you want to autocomplete.

Algolia Search WordPress Autocomplete Settings

All that is left now is to monitor Algolia using its beautiful dashboard.

Monitor Algolia

Log in to Algolia and click Dashboard and choose your App. You will see a nice overview of search performance.

Algolia Dashboard Performance

If you click Indices you will be able to see how Algolia is indexing your posts and pages.

Algolia Show Indices Dashboard

Enjoy your new faster WordPress search with Algolia.

Share This:

Popular on WPSteam Right Now!

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 22 other subscribers

I need help with...

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 22 other subscribers

I need help with...