What is Live Search?
Live search, often called Ajax search, dynamically updates search results as users type into the search bar. This provides instant feedback, allowing users to find what they’re looking for without needing to submit the form or reload the page.
Why Enable Live Search?
Enabling live search improves the user experience by:
- Speeding up searches: Results appear instantly as users type.
- Reducing friction: No need to click a button or wait for a page to reload.
- Increasing engagement: Users can quickly refine their queries based on immediate results.
It benefits content-heavy sites where users frequently search for specific posts, products, or pages.
How to Enable Live Search
Better Search includes live search in both the free and Pro versions. Follow these steps:
- Go to Better Search → Settings in your WordPress admin.
- Open the Features tab and turn on Live search.
- Save your changes.
Once enabled, Better Search automatically takes over your search forms and applies live Ajax functionality. You don’t need to add extra code or scripts.
To leave live search enabled globally but exclude one form, add data-bsearch-live-search="off" to its <form> element:
Better Search ignores the form and lets it submit as a regular search. This is useful when another script controls the form or when the form provides a different search experience.
Performance and limits
Live search fires on every keystroke, so Better Search keeps each request cheap.
- Responses are cached. A successful live search response is stored in a transient for five minutes, keyed on the query, the active TranslatePress language, the site locale, and the blog ID. On TranslatePress sites the result titles and URLs are translated before the response is sent. Repeat searches for the same term are served from that cache without touching the database.
- Short queries are rejected in the browser and on the server. A query shorter than the Minimum characters setting is not sent, and a message asking for more characters is announced to screen readers. The default is
4, which is also the lowest value the field allows. Changing it is Pro only, so the free plugin uses the default. The server runs the same check and returns an empty response, so a crafted request cannot run a full search either. - Queries are capped at 128 characters. Anything longer is truncated before the search runs.
- No result count is calculated. Live search asks only for the posts it will show, skipping the extra count query a normal search performs.
Change the cache duration with the bsearch_live_search_cache_time filter. Return 0 to disable live search caching.

Better Search Settings: Search
Understanding Better Search Templates