-
Notifications
You must be signed in to change notification settings - Fork 54
Getting Started
A guide to setting up the WP Search with Algolia plugin for WordPress.
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:
[Screenshot of Algolia credentials form here]
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.
[Screenshot of Algolia api keys page here]
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 3 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:
[Screenshot of expanded Algolia Search menu item here]
The easiest way to offer your users a nice find-as-you-type search experience is through Algolia's autocomplete feature, which shows a dropdown menu below the search bar.
[Screenshot of dropdown menu here]
Now, let's head to the Autocomplete
submenu. 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 Custom Post Types, Custom Taxonomies and Users to find potential content types to index. 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 through 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. |
Next, you will the indices you want to make searchable on your website. For example: Posts, Pages and Users. Simply check the corresponding checkboxes 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.
WordPress has a built-in search engine. However, it does not support the features of the Algolia search engine such as typo tolerance, custom ranking, and more. You can get more information at https://www.algolia.com.
This plugin lets you override WordPress' native search with Algolia.
Replacing the WordPress search feature ensures that you get the same results on the search page that you would see in the autocomplete feature.
Once you click on the Search Page entry under the Algolia Search menu, you will be given 3 options. If you choose "Use Algolia in the backend" or "Use Algolia with Instantsearch.js", the native search will be replaced by Algolia.
With this option, WordPress search will be powered by Algolia behind the scenes.
This option does not support filtering and displaying instant search results, but has the advantage of being able to play nicely with any theme.
With this option, WordPress search will be powered by the instantsearch.js library. It replaces your search results page with an instant search experience.
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.
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.