{"id":106327,"date":"2022-06-02T11:10:00","date_gmt":"2022-06-02T16:10:00","guid":{"rendered":"https:\/\/wpengine.com\/?post_type=resource&#038;p=106327"},"modified":"2025-05-08T15:25:03","modified_gmt":"2025-05-08T20:25:03","slug":"wordpress-search-autocomplete-guide","status":"publish","type":"resource","link":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-search-autocomplete-guide\/","title":{"rendered":"How to Add Autocomplete Search to Your WordPress Site"},"content":{"rendered":"\n<p>An autocomplete search bar is everywhere. If you use a search engine, chances are that it often recognizes what you&#8217;re looking for before you can finish typing and will start showing you suggestions to save time.<\/p>\n\n\n\n<p>Although WordPress includes search functionality out of the box, it doesn&#8217;t natively support &#8220;autocomplete search&#8221; or &#8220;live search,&#8221; which are the two most common names for this feature. With the help of the right plugin, however, you can implement a search box easily.<\/p>\n\n\n\n<p>In this article, we\u2019ll introduce you to three WordPress autocomplete search plugins you can use, and how to get started with each of them. Then we\u2019ll talk about how to implement autocomplete search in WordPress manually. Let\u2019s get to work!<\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">Why Does Autocomplete Search Matter?<\/h2>\n\n\n\n<p>These days, users expect to find the answers they need quickly. As search engines grow more and more accurate, people haven gotten used to finding the pages and content that match their search query with minimal effort required.<\/p>\n\n\n\n<p>That\u2019s why it can be a jarring experience to jump from a powerful search engine to using a website\u2019s internal search functionality. Although WordPress\u2019 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.<\/p>\n\n\n\n<p>This is where autocomplete search suggestions come in handy. 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&#8217;s not hard to implement WP autocomplete search if you&#8217;re using the right plugin.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Add Search to Your WordPress Site with a Plugin<\/h2>\n\n\n\n<p>There are a lot of <a href=\"https:\/\/wpengine.com\/resources\/wordpress-site-search-plugins\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress search plugins<\/a> you can choose from, but not all of them include the autocomplete feature we&#8217;re after. For this section, we&#8217;ll focus on three of the best options you can use and show you how to enable predictive search with each of them.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Enable Autocomplete in <a href=\"https:\/\/www.wpsolr.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">WPSolr<\/a><\/h3>\n\n\n\n<p><a href=\"https:\/\/www.wpsolr.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">WPSolr<\/a> is a premium search suggestion plugin that works with both regular WordPress and WooCommerce websites. It\u2019s powered by the Elasticsearch and Solr platforms, and enables you to customize search results from one site to another.<\/p>\n\n\n\n<p>If you like plugins that include as many customization options as possible, you\u2019ll probably appreciate WPSolr. The only downside to this plugin is that it\u2019s expensive. On the plus side, it makes enabling live search simple.<\/p>\n\n\n\n<p>Once you install the plugin, you\u2019ll get access to its settings page inside the dashboard. If you navigate to the tab that reads <em>Define your search with Elastic.co &#8211; GCloud<\/em>, you\u2019ll find an option called <em>Show suggestions in the search box<\/em>.<\/p>\n\n\n\n<p>When you enable this feature, users will see full page titles plus part of those pages\u2019 content right within the search bar, <em>before <\/em>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.<\/p>\n\n\n\n<p><strong>Price: <\/strong>A WPSoler license costs <a href=\"https:\/\/www.wpsolr.com\/pricing\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u20ac199 per year<\/a> (about $215 per year).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Enable Autocomplete in <a href=\"https:\/\/searchwp.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">SearchWP<\/a><\/h3>\n\n\n\n<p><a href=\"https:\/\/searchwp.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">SearchWP<\/a> is all about helping users find content that WordPress\u2019 default search functionality doesn\u2019t recognize. Out of the box, the plugin supports <a href=\"https:\/\/wpengine.com\/resources\/custom-fields-wordpress\/\" target=\"_blank\" rel=\"noreferrer noopener\">custom field data<\/a>, shortcodes output, taxonomies, and even WooCommerce product details.<\/p>\n\n\n\n<p>However, SearchWP doesn\u2019t include autocomplete search functionality by default. To enable that feature, you\u2019ll need to use a free extension called <a href=\"https:\/\/wordpress.org\/plugins\/searchwp-live-ajax-search\/\" target=\"_blank\" rel=\"noreferrer noopener\">SearchWP Live Ajax Search<\/a>.<\/p>\n\n\n\n<p>All you have to do to enable autocomplete search is activate the extension. It will do the rest for you automatically.<\/p>\n\n\n\n<p>It\u2019s also worth noting that SearchWP Live Ajax Search works <em>without <\/em>the base SearchWP plugin. The only difference is that when combined with SearchWP, you get access to more in-depth results.<\/p>\n\n\n\n<p><strong>Price:<\/strong> A standard SearchWP license for one site <a href=\"https:\/\/searchwp.com\/buy\/\" target=\"_blank\" rel=\"noreferrer noopener\">costs $99<\/a><em>, <\/em>but the Live Ajax Search extension is free.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Enable Autocomplete in <a href=\"https:\/\/wordpress.org\/plugins\/ajax-search-lite\/\" target=\"_blank\" rel=\"noreferrer noopener\">Ajax Search Lite<\/a><\/h3>\n\n\n\n<p>Out of the box, <a href=\"https:\/\/wordpress.org\/plugins\/ajax-search-lite\/\" target=\"_blank\" rel=\"noreferrer noopener\">Ajax Search Lite<\/a> offers features that you usually only find in premium WordPress search plugins. With this tool, your users can access WordPress autocomplete search results that include custom post types, fields, and other kinds of metadata (along with the default page and post results).<\/p>\n\n\n\n<p>Once the plugin is active, you can navigate to <em>Ajax Search Lite &gt; General Options &gt; Autocomplete &amp; Suggestions<\/em>. Autocomplete search should be turned on by default, under <em>Turn on google search autocomplete?<\/em>.<\/p>\n\n\n\n<p>If you want full control over what type of content appears in autocomplete results, go to the <em>Sources &amp; Basics <\/em>tab. There, you can choose what content will show up in your search results.<\/p>\n\n\n\n<p>All the autocomplete search functionality you\u2019ll need is available in Ajax Search Lite\u2019s free version. However, there\u2019s also a premium version of the plugin that includes additional features, such as custom themes for your search bar and results.<\/p>\n\n\n\n<p><strong>Price:<\/strong> Ajax Search Lite is free, while the premium version of the plugin <a href=\"https:\/\/codecanyon.net\/item\/ajax-search-pro-for-wordpress-live-search-plugin\/3357410\" target=\"_blank\" rel=\"noreferrer noopener\">starts at $36<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">WordPress Autocomplete Search Without a Plugin<\/h2>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>That means if you\u2019re not comfortable using JavaScript, you may be better off sticking with plugins. However, it is possible to add this functionality manually.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to Add Autocomplete Search on Your Own<\/h3>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>Here are the two approaches we recommend exploring:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Implement live search with <\/strong><a href=\"https:\/\/gist.github.com\/alexmustin\/c22b698689ce6caf9a562c3b405e2732\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Ajax for post titles only<\/strong><\/a><strong>.<\/strong> Since you\u2019ll only be fetching post titles, this is the easiest method of implementation.<\/li>\n\n\n\n<li><strong>Add <\/strong><a href=\"https:\/\/www.vndeveloper.com\/wordpress-textbox-autocomplete-using-ajax-jquery\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>autocomplete search for custom tables<\/strong><\/a><strong>.<\/strong> With this method, you can serve results from a custom table you create, giving you full control over the data that appears.<\/li>\n<\/ul>\n\n\n\n<p>In either of those scenarios, you\u2019ll probably want to implement the code you use <a href=\"https:\/\/wpengine.com\/resources\/best-tools-wordpress-plugin-development\/\" target=\"_blank\" rel=\"noreferrer noopener\">in plugin format<\/a>. That\u2019s because with a plugin you can disable or enable the code at any time, which is perfect if you\u2019re going to customize this functionality in the future.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Set Superior Site Performance to Autocomplete With WP Engine<\/h2>\n\n\n\n<p>Implementing <a href=\"https:\/\/wpengine.com\/resources\/wordpress-site-search-plugins\/\" target=\"_blank\" rel=\"noreferrer noopener\">autocomplete search<\/a> in WordPress is easier than you might expect. With the right plugin, you can make it much simpler for visitors to find what they\u2019re looking for, and improve their experience.<\/p>\n\n\n\n<p>Of course, this won\u2019t mean much if you\u2019re not using the right web host as well. <a href=\"https:\/\/wpengine.com\/managed-wordpress-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">Managed hosting for WordPress<\/a> grants you unlimited access to tools and 24\/7 support from technical experts to maintain optimal site performance. With WP Engine, you get all the resources you need to grow your website and provide your visitors with a top-quality <a href=\"https:\/\/wpengine.com\/wordpress-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress hosting<\/a> experience!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>An autocomplete search bar is everywhere. If you use a search engine, chances are that it often recognizes what you&#8217;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&#8217;t natively support &#8220;autocomplete search&#8221; or &#8220;live search,&#8221; which<span class=\"tile__ellipses\">&hellip;<\/span><span class=\"tile__ellipses--animated\"><\/span><\/p>\n","protected":false},"author":177,"featured_media":106328,"template":"","resource-topic":[904,912,910],"resource-role":[895,896,1296,899],"resource-type":[916],"class_list":["post-106327","resource","type-resource","status-publish","has-post-thumbnail","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create an Autocomplete Search in WordPress<\/title>\n<meta name=\"description\" content=\"Autocomplete search can improve your WordPress site\u2019s usability. Learn how to add an autocomplete search bar with or without plugins at WP Engine.\" \/>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create an Autocomplete Search in WordPress\" \/>\n<meta property=\"og:description\" content=\"Autocomplete search can improve your WordPress site\u2019s usability. Learn how to add an autocomplete search bar with or without plugins at WP Engine.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-search-autocomplete-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Engine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpengine\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-08T20:25:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/06\/autocomplete-search-featured.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1100\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Create an Autocomplete Search in WordPress\" \/>\n<meta name=\"twitter:description\" content=\"Autocomplete search can improve your WordPress site\u2019s usability. Learn how to add an autocomplete search bar with or without plugins at WP Engine.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/06\/autocomplete-search-featured.jpg\" \/>\n<meta name=\"twitter:site\" content=\"@wpengine\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-search-autocomplete-guide\/\",\"url\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-search-autocomplete-guide\/\",\"name\":\"How to Create an Autocomplete Search in WordPress\",\"isPartOf\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\"},\"datePublished\":\"2022-06-02T16:10:00+00:00\",\"dateModified\":\"2025-05-08T20:25:03+00:00\",\"description\":\"Autocomplete search can improve your WordPress site\u2019s usability. Learn how to add an autocomplete search bar with or without plugins at WP Engine.\",\"breadcrumb\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-search-autocomplete-guide\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-search-autocomplete-guide\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-search-autocomplete-guide\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wpengine.com\/case-studies\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resources\",\"item\":\"https:\/\/wpengine.com\/case-studies\/resources\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Add Autocomplete Search to Your WordPress Site\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\",\"url\":\"https:\/\/wpengine.com\/case-studies\/\",\"name\":\"WP Engine\",\"description\":\"Managed Hosting for WordPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/aba73ed4c15eda43b5fd78844ec31fad\",\"name\":\"Samantha Rodriguez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g\",\"caption\":\"Samantha Rodriguez\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create an Autocomplete Search in WordPress","description":"Autocomplete search can improve your WordPress site\u2019s usability. Learn how to add an autocomplete search bar with or without plugins at WP Engine.","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"How to Create an Autocomplete Search in WordPress","og_description":"Autocomplete search can improve your WordPress site\u2019s usability. Learn how to add an autocomplete search bar with or without plugins at WP Engine.","og_url":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-search-autocomplete-guide\/","og_site_name":"WP Engine","article_publisher":"https:\/\/www.facebook.com\/wpengine","article_modified_time":"2025-05-08T20:25:03+00:00","og_image":[{"width":1100,"height":500,"url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/06\/autocomplete-search-featured.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_title":"How to Create an Autocomplete Search in WordPress","twitter_description":"Autocomplete search can improve your WordPress site\u2019s usability. Learn how to add an autocomplete search bar with or without plugins at WP Engine.","twitter_image":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/06\/autocomplete-search-featured.jpg","twitter_site":"@wpengine","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-search-autocomplete-guide\/","url":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-search-autocomplete-guide\/","name":"How to Create an Autocomplete Search in WordPress","isPartOf":{"@id":"https:\/\/wpengine.com\/case-studies\/#website"},"datePublished":"2022-06-02T16:10:00+00:00","dateModified":"2025-05-08T20:25:03+00:00","description":"Autocomplete search can improve your WordPress site\u2019s usability. Learn how to add an autocomplete search bar with or without plugins at WP Engine.","breadcrumb":{"@id":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-search-autocomplete-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/case-studies\/resources\/wordpress-search-autocomplete-guide\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/case-studies\/resources\/wordpress-search-autocomplete-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/case-studies\/"},{"@type":"ListItem","position":2,"name":"Resources","item":"https:\/\/wpengine.com\/case-studies\/resources\/"},{"@type":"ListItem","position":3,"name":"How to Add Autocomplete Search to Your WordPress Site"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/case-studies\/#website","url":"https:\/\/wpengine.com\/case-studies\/","name":"WP Engine","description":"Managed Hosting for WordPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/aba73ed4c15eda43b5fd78844ec31fad","name":"Samantha Rodriguez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g","caption":"Samantha Rodriguez"}}]}},"acf":[],"grid_image_url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/06\/autocomplete-search-grid.jpg","media-type":{"term_id":916,"name":"Article","slug":"article"},"role":"<strong>Roles:<\/strong> Agency, Developer, Publisher, Site Owner","topic":"<strong>Topics:<\/strong> Marketing, Performance, SEO","_links":{"self":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource\/106327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource"}],"about":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/types\/resource"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/users\/177"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media\/106328"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media?parent=106327"}],"wp:term":[{"taxonomy":"resource-topic","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-topic?post=106327"},{"taxonomy":"resource-role","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-role?post=106327"},{"taxonomy":"resource-type","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-type?post=106327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}