search bar overlaying woman using mobile phone

How to Add Autocomplete Search to Your WordPress Site

Autocomplete search is everywhere these days. If you use a search engine, chances are that it often recognizes what you’re looking for before you can finish typing, and will start showing you suggestions to save time.

Although WordPress includes search functionality out of the box, it doesn’t natively support ‘autocomplete search’ or ‘live search’, which are the two most common names for this feature. With the help of the right plugin, however, you can implement it easily.

In this article, we’ll introduce you to three WordPress autocomplete search plugins you can use, and how to get started with each of them. Then we’ll talk about how to implement autocomplete search in WordPress manually. Let’s get to work!

Why Does Autocomplete Search Matter?

These days, users expect to find the answers they need quickly. As search engines grow more and more accurate, people get used to finding the pages and content they’re looking for with minimal effort required.

That’s why it can be a jarring experience to jump from a powerful search engine to using a website’s internal search functionality. Although WordPress’ search feature works well enough out of the box, it lacks some of the advanced options that most visitors have become accustomed to using, such as autocomplete.

By implementing WordPress search suggestions, you increase the chances that users will spend more time on your site. You make it easier for them to find the content they want, which results in a better overall experience. Plus, it’s not hard to implement WP autocomplete search if you’re using the right plugin.

How to Add Search to Your WordPress Site with a Plugin

There are a lot of WordPress search plugins you can choose from, but not all of them include the functionality we’re after. For this section, we’ll focus on three of the best options you can use, and show you how to enable autocomplete search with each of them.

Enable Autocomplete in WPSolr

WPSolr website

WPSolr is a premium search plugin that works with both regular WordPress and WooCommerce websites. It’s powered by the Elasticsearch and Solr platforms, and enables you to customize search results from one site to another.

If you like plugins that include as many customization options as possible, you’ll probably appreciate WPSolr. The only downside to this plugin is that it’s expensive. On the plus side, it makes enabling live search simple.

Once you install the plugin, you’ll get access to its settings page inside the dashboard. If you navigate to the tab that reads Define your search with Elastic.co – GCloud, you’ll find an option called Show suggestions in the search box:

When you enable this feature, users will see full page titles plus part of those pages’ content right within the search bar, before they even submit a query. That way, they can select the result they want immediately, without having to sort through a full list of options.

Price: A WPSoler license costs €199 per year (about $215 per year).

Enable Autocomplete in SearchWP

SearchWP website

SearchWP is all about helping users find content that WordPress’ default search functionality doesn’t recognize. Out of the box, the plugin supports custom field data, shortcodes output, taxonomies, and even WooCommerce product details.

However, SearchWP doesn’t include autocomplete search functionality by default. To enable that feature, you’ll need to use a free extension called SearchWP Live Ajax Search:

SearchWP Live Ajax Search extension

All you have to do to enable autocomplete search is activate the extension. It will do the rest for you automatically:

enable autocomplete search

It’s also worth noting that SearchWP Live Ajax Search works without the base SearchWP plugin. The only difference is that when combined with SearchWP, you get access to more in-depth results.

Price: A standard SearchWP license for one site costs $99, but the Live Ajax Search extension is free.

Enable Autocomplete in Ajax Search Lite

Ajax Search Lite WordPress plugin

Out of the box, Ajax Search Lite offers features that you usually only find in premium WordPress search plugins. With this tool, your users will be able to access WordPress autocomplete search results that include custom post types, fields, and other kinds of metadata (along with the default page and post results).

Once the plugin is active, you can navigate to Ajax Search Lite > General Options > Autocomplete & Suggestions. Autocomplete search should be turned on by default, under Turn on google search autocomplete?:

Activate autocomplete search in Ajax Search Lite

If you want full control over what type of content appears in autocomplete results, go to the Sources & Basics tab. There, you can choose what content will show up in your search results:

Choose the content that shows up in search results

All the autocomplete search functionality you’ll need is available in Ajax Search Lite’s free version. However, there’s also a premium version of the plugin that includes additional features, such as custom themes for your search bar and results.

Price: Ajax Search Lite is free, while the premium version of the plugin starts at $36.

WordPress Autocomplete Search Without a Plugin

As you may have noticed, two of the plugins we covered in the last section rely on Ajax (or Asynchronous JavaScript) to power the live search functionality. Using Ajax alongside jQuery is the easiest approach to implementing this feature in WordPress.

That means if you’re not comfortable using JavaScript, you may be better off sticking with plugins. However, it is possible to add this functionality manually.

How to Add Autocomplete Search on Your Own

Adding autocomplete search functionality to your website manually requires you to work with some code, as you might expect. However, there are different ways you can approach the project, with varying difficulty levels.

Here are the two approaches we recommend exploring:

  • Implement live search with Ajax for post titles only. Since you’ll only be fetching post titles, this is the easiest method of implementation.
  • Add autocomplete search for custom tables. With this method, you can serve results from a custom table you create, so you have full control over the data that appears.

In either of those scenarios, you’ll probably want to implement the code you use in plugin format. That’s because with a plugin you can disable or enable the code at any time, which is perfect if you’re going to customize this functionality in the future.

Improve Your Digital Experiences With WP Engine

Implementing autocomplete search in WordPress is easier than you might expect. With the right plugin, you can make it much simpler for visitors to find what they’re looking for, and improve their experience.

Of course, this won’t mean much if you’re not using the right web host as well. With WP Engine, you get all the resources you need to grow your website and provide your visitors with a top-quality digital experience!

Get started.

Build faster, protect your brand, and grow your business with a WordPress platform built to power remarkable online experiences.