WordPress

WordPress Site Search

Updated November 2026 7,382 views 4 min read
WordPress | Updated November 2026

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.

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.

Tip

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:

  1. Rebuild the index - if you use a search plugin, re-index from its settings; new content is not searchable until indexed.
  2. Check a caching conflict - a full-page cache can serve a stale results page. Clear your caching plugin and any CDN cache, then retry.
  3. Confirm content is published - drafts, private, and password-protected posts do not appear in normal search results.
  4. 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

  1. Add search via the Search block or the Search widget.
  2. Default search matches titles, content, and excerpts only, by date.
  3. Relevanssi (free) for relevance and partial matching.
  4. SearchWP (premium) for custom fields, documents, and WooCommerce.
  5. No results? Rebuild the index, clear caches, confirm content is published.

WordPress features · Last updated November 2026 · Browse all WordPress articles

Share: X in Reddit f Email
  • 210 Users Found This Useful

Was this answer helpful?

Related Articles

How to Fix Error Establishing a Database Connection in WordPress

WordPress | Updated July 2026 "Error establishing a database connection" is the WordPress...

The Best WordPress Caching Plugins and How to Configure Them

WordPress | Updated September 2026 A caching plugin is the single biggest speed win available...

Running WooCommerce on Shared Hosting: Setup and Performance

WordPress | Updated September 2026 WooCommerce turns a normal WordPress site into a full...

Optimize WordPress Performance

WordPress Knowledgebase | Updated November 2026 Your WordPress site deserves to load fast....

Plugins on WordPress

WordPress | Updated January 2026 WordPress plugins extend your site's functionality. You can...



Save 30% on web hosting - Use coupon code Hosting30