Error rescue

WordPress Search Not Working or Returning No Results: Fix (2026)

By Ali Yasin Jatoi 4 min readUpdated July 2, 2026
Reviewed by Ali Yasin Jatoi, Founder & Lead Engineer· Updated July 2, 2026

Quick answer

WordPress search fails silently when: (1) the theme's search.php is broken or missing, (2) custom post types are excluded from search by default (`exclude_from_search => true`), (3) a caching plugin is caching the search page and returning the same 0-result response, (4) the wp_posts table has a corrupted MyISAM FULLTEXT index (rare on modern hosts). Install SearchWP or Relevanssi for immediate relief.

Fix #1 — Confirm theme has a search template

Check your active theme for search.php. If missing, WordPress falls back to index.php which may not render the search results loop correctly. Copy the theme's index.php to search.php as a starting point.

Fix #2 — Include custom post types

If your content lives in custom post types (products, portfolios, docs), most CPTs are registered with `exclude_from_search => true`. Register them with `exclude_from_search => false` or filter pre_get_posts to include them in search results.

Prefer we just fix it?

This exact error is what our flat-fee website repair service resolves — most fixes ship in under 60 minutes, no retainer, no lock-in. Learn more about flat-fee website repair or grab a slot below.

Fix #3 — Install a real search engine

WordPress's built-in search is a basic LIKE query on post_title and post_content. Install Relevanssi or SearchWP for relevance ranking, custom field search, fuzzy matching, and stemming. This is the highest-ROI fix — 15 minutes for a dramatically better search UX.

Fix #4 — Bypass cache for search pages

Add /?s= to your caching plugin's exclusion list (WP Rocket → Advanced Rules → Never Cache URLs). Otherwise every search query returns the first cached response.

When to call for help

If search is critical to your site (e-commerce, docs, knowledge bases), our SearchWP setup + index tuning is a flat $149 and includes custom field weighting, synonyms, and analytics wiring.

Common questions

Why does WordPress search return no results?+

Most commonly: your content is in custom post types that aren't included in search, or the theme's search.php template is broken. Install Relevanssi (free) to bypass both issues and get relevance-ranked results out of the box.

How do I make WordPress search better?+

Install SearchWP (paid, best) or Relevanssi (free, excellent). Both replace WordPress's basic LIKE query with a real inverted index — relevance ranking, custom fields, stemming, fuzzy matching, and analytics.

Does WooCommerce search products?+

By default, yes — WooCommerce registers products with `exclude_from_search => false`. If products don't appear in search results, install Relevanssi and re-index. Also verify that your theme's search template renders product results (some themes only render Post types).

Why is WordPress search slow?+

The default MySQL LIKE query with %term% can't use indexes, so it does a full table scan on wp_posts. On sites over 5000 posts this becomes painfully slow. A real search index (SearchWP, Relevanssi, ElasticPress) solves this by pre-indexing content.

Want this handled for you?

Book a call and we will review your site before recommending anything.

Call Book a call