WordPress includes a built-in search that lets visitors find content on your site. The default is basic and only matches post titles, content, and excerpts, so for anything beyond a small blog a search plugin gives far better, faster, and more relevant results. This guide covers adding the built-in search, how it works, improving it with a plugin, adding live search-as-you-type, and fixing a search that returns no results.
WordPress search works out of the box
Add a search form from Appearance then Widgets, or the block editor's Search block, to your sidebar, header, or footer. Most themes already include a search icon in the header. WordPress then searches post titles, content, and excerpts.
01. Add Search to Your Site
There are two easy ways to place a search box:
- Block editor - edit a template or widget area and insert the Search block.
- Classic widgets - go to Appearance then Widgets and add the Search widget to a sidebar or footer.
Many themes also expose a search icon in the header via the Customizer. All of these use the same underlying WordPress search.
02. How Default Search Works
The built-in search queries your posts and pages by title, content, and excerpt, and returns matches newest-first rather than by relevance. It does not search custom fields, PDF or document contents, taxonomy terms, or WooCommerce product attributes, and it does not handle partial-word or typo matching. That is fine for a small site but limiting as content grows.
On a large site the default search can also be slow, because it runs a broad LIKE query against the posts table on every search. A good search plugin builds its own index, which is both more relevant and faster.
03. Improve Search With a Plugin
Replace or augment the default search with one of these:
- Relevanssi (free) - replaces the default algorithm with relevance ranking, partial matching, and result highlighting. The best first upgrade for most sites.
- SearchWP (premium) - indexes custom fields, document contents such as PDF and DOCX, taxonomy terms, and WooCommerce products, with tunable relevance weighting.
- Ajax Search Lite - adds a modern search box with filters and previews.
Install from Plugins then Add New, activate, and let the plugin build its index. See Optimize WordPress Performance to keep search queries fast.
04. Add Live Search as You Type
Live search shows results in a dropdown as the visitor types, which improves findability on content-heavy sites. Ajax Search Lite and the Pro versions of Relevanssi and SearchWP all offer this. Enable the live or Ajax option in the plugin settings and place its search box via a widget, block, or shortcode. Keep the number of live results small so the lookups stay fast.
05. Fix Search Returning No Results
If search finds nothing even though matching content exists:
- Rebuild the index - if you use a search plugin, re-index from its settings; new content is not searchable until indexed.
- Check a caching conflict - a full-page cache can serve a stale results page. Clear your caching plugin and any CDN cache, then retry.
- Confirm content is published - drafts, private, and password-protected posts do not appear in normal search results.
- Test the default search - temporarily deactivate the search plugin to see whether the issue is the plugin or the theme's search template.
Frequently Asked Questions
How do I add a search box to my WordPress site?
Insert the Search block in the block editor, or add the Search widget under Appearance then Widgets to a sidebar or footer. Most themes also include a header search icon. All of them use the built-in WordPress search.
Why is WordPress default search so basic?
It only matches post titles, content, and excerpts and sorts by date, not relevance. It does not search custom fields, documents, taxonomies, or product attributes, and it has no partial-word matching. A plugin like Relevanssi adds all of that.
What is the best WordPress search plugin?
Relevanssi is the best free upgrade, adding relevance ranking and partial matching. SearchWP is the leading premium option when you need to search custom fields, PDFs, taxonomies, or WooCommerce products. Ajax Search Lite adds live search-as-you-type.
Why does my WordPress search return no results?
Usually the search plugin's index needs rebuilding, a page cache is serving a stale results page, or the content is a draft or private. Re-index, clear caching and CDN, confirm the content is published, and test with the plugin disabled.
Quick Recap
- Add search via the Search block or the Search widget.
- Default search matches titles, content, and excerpts only, by date.
- Relevanssi (free) for relevance and partial matching.
- SearchWP (premium) for custom fields, documents, and WooCommerce.
- No results? Rebuild the index, clear caches, confirm content is published.
WordPress features · Last updated November 2026 · Browse all WordPress articles
