Skip to content

Getting Started

Richard Aber edited this page Nov 27, 2020 · 10 revisions

A guide to setting up the WP Search with Algolia plugin for WordPress.

Algolia Credentials

When connected to the WordPress admin panel, find the Algolia Search entry in the left sidebar and click on it.

You will see the following form asking for your Algolia credentials:

If you do not have an Algolia account yet, you can create one for free at https://www.algolia.com/users/sign_up.

Once you have created your account and you have signed in, access your Algolia API keys by going to https://www.algolia.com/api-keys.

From that screen you will need to copy/paste the following keys from the Algolia dashboard to your WordPress admin form:

  • Application ID
  • Search-Only API Key
  • Admin API Key

Copy/pasting these keys manually is very error prone. There is a copy button at the right side of each key that will make this easier.


Once you have filled in the required keys, click on the Save Changes button at the bottom of the form.

Once you have correctly provided WordPress with your Algolia keys, you will see that the Algolia Search menu entry has expanded:

Search Page

Once you click on the Search Page entry under the Algolia Search menu, you will be given 3 options, Do not use Algolia, Use Algolia in the backend, and Use Algolia with Instantsearch.js.

If you choose Use Algolia in the backend or Use Algolia with Instantsearch.js, WordPress native search functionality will be replaced by an Algolia search client powered implementation.

Do not use Algolia

With this option, the native WordPress search experience will not be replaced by Algolia. Content will be indexed in the searchable_posts index, but it will not affect the search results in WordPress.


This option can be useful when...

  • Making your content searchable from another site that implements Algolia
  • Building a completely custom search implementation
  • Building headless WordPress

Use Algolia in the backend

With this option, the native WordPress search page will be powered by the Algolia Search API Client for PHP.

It modifies the WP_Query used on the search results page, to use results from the searchable_posts index.


This will allow your search results to be typo tolerant.

This option does not support filtering and displaying instant search results.

This works with themes that use standard, native, WordPress search.

If you have a plugin, theme, or custom code, that also modifies WP_Query searches, you may experience conflicts, pagination issues, or unexpected results.

We are unable to provide support for third party themes, plugins, and custom code.

If you experience issues with this option, try the Instansearch.js option.


Use Algolia with Instantsearch.js

With this option, the native WordPress search page will be powered by the lightning fast Algolia instantsearch.js.

It replaces your standard search results page with an instant search experience. Instantsearch.js will use the searchable_posts index.


Please note that the plugin is shipped with some sensible default styling rules but it could require some CSS adjustments to provide an optimal search experience.


Autocomplete & Indexing

One way to offer your users a find-as-you-type search experience is through Algolia's autocomplete feature, which shows a dropdown menu below search inputs.

[Screenshot of dropdown menu here]

To enable the Autocomplete feature, check the Enable autocomplete box above the configuration table.

Before you can search anything with Algolia, you need to synchronize your data. You should now be seeing a list of elements like the following:

[Screenshot of the autocomplete configuration page here]


Please note: If you have installed other third party plugins, you might have more entries than in the above screenshot.


The WP Search with Algolia plugin uses WordPress core features such as Post Types, Taxonomies and Users to find potential content types for indexing. Any plugin creating new Post Types or Taxonomies will also be listed here as eligible for synchronization with Algolia.

Setting name Description
Enable Make search results for this index available to autocomplete.
Index The type of data and the name of the index in the Algolia dashboard.
Max Suggestions The maximum number of suggestions to display for this index.
Only the n most relevant search results will be displayed. Others will be discarded.
Position Determines the display position of suggestions in relation to the other autocomplete enabled indices.
The higher the position, the lower the section will be in the display.

Please note: Configuration of indices on the Autocomplete settings page does not configure the index used by the Search Page in any way. The Search Page uses the searchable_posts index. Autocomplete can be configured to use the searchable_posts index, but can be configured to use independent indices for any content type.

Configure the indices that you want to use with Autocomplete. Check the checkboxes next to the indices you wish to use with Autocomplete and click on Save Changes button.

Green validation messages should confirm that the selected indices are about to be synchronized with Algolia.

[Screenshot of sync validation messages]

Click on the Index now button to quickly send your content to Algolia. After that, everything will be kept in sync automatically.

From Here On Out

If you would like to learn more about Algolia and how you can benefit from it, go to Algolia's getting started page at https://www.algolia.com/doc/guides/getting-started/what-is-algolia/


Struggling with something? Check out the Q&A section.


Clone this wiki locally