More fixes

Your WordPress site search finds nothing (or the wrong things)

A customer types a word that is right there on your page and gets "Nothing found". Or the search returns an old blog post and none of your products. Most of the time WordPress is doing exactly what it was built to do: its own search only reads a few places, and everything else is invisible to it. Below is a rebuilt example (not a real client), the one-minute check, and the fix for each cause.

What a customer sees

gluten freeSearch

What the check found


  

What WordPress search actually reads

Out of the box it looks at the title, the main content and the excerpt of published posts, pages and products. It does not read custom fields (ACF and similar), product attributes, tags and categories, PDFs, or text a theme or page builder keeps outside the main content. It also has no idea which result matters most: matches in a title come first, then everything else by date.

The one-minute check

  1. Open a private (incognito) window so you search the way a visitor does. Logged in, you also see private pages and drafts; visitors do not.
  2. Search for the exact title of one of your pages. If even that finds nothing, search itself is broken (rows 5-7 below). If titles work but words from the page do not, the words live somewhere search does not read (rows 1-3).
  3. Type the search into the address bar: yoursite.com/?s=your+word. If that works but the search box does not, the box on the page is the problem, not search.
  4. Note what you searched. Very short words (two letters, a model number like "5k") and very common words are often dropped by search plugins.

What causes it and the fix

What you seeWhy it happensThe fix
"Nothing found" for a word that is clearly on the page, titles still workThe word is in a custom field, a product attribute, a tag or a page-builder block that stores its text outside the main content. Default search never reads thoseInstall a search plugin that builds its own index, such as Relevanssi (free) or SearchWP, tick the custom fields and taxonomies (tags, categories, product attributes) you want included, then build the index. Search then reads those places and sorts by relevance
WooCommerce: a product does not show up in searchThe product's Catalog visibility is "Shop only" or "Hidden", it is out of stock with Hide out of stock items turned on, or the customer searched a SKU, which is often not searched by defaultOn the product, check Catalog visibility (top right, next to Publish) is "Shop and search results". In WooCommerce > Settings > Products > Inventory, check the out-of-stock setting. For SKUs, a search plugin that indexes the SKU field
Search works but the best result is buried under old postsApart from title matches, default search sorts by date, not by how well a page matchesA relevance search plugin (as above); most let you weight titles, products or a post type higher, or pin a page to a search term
A search plugin is installed but new pages and products never appearIts index was built once and is not being updated, often after an import, a migration or a bulk edit that skipped the pluginRebuild the index from the plugin's settings page. If new posts keep going missing, check that WordPress's scheduled jobs run (see scheduled posts not publishing; the same scheduler updates many indexes)
Short words or model numbers ("ac", "5k", "x2") never matchSearch plugins skip words under a minimum length (often 3 letters) and a list of common "stop words"Lower the minimum word length in the plugin settings and rebuild the index. Keep the stop-word list for words like "the" and "and"
Searching a page title finds nothing at all, or everyone sees the same results whatever they typeA page cache (host, CDN or plugin) is ignoring the ?s= part of the address and serving one saved copy, or a theme or plugin limits search to one post typeExclude ?s= from every cache layer, including Cloudflare rules that "ignore query string", then clear the caches. If only blog posts come back, turn plugins off one at a time on a staging copy; one of them is narrowing the search
The search box goes to a 404, the home page or the old domainThe form's address was typed by hand (a custom HTML block, a header builder) and points to an old domain, http, or a path that no longer existsReplace it with the theme's own search block or widget, or fix the form's action to your current home address. Then re-save Settings > Permalinks once
You see a result when logged in, visitors do notThe page is Private, a draft, scheduled for later, or behind a membership plugin. Logged-in admins see those in search; visitors never doPublish the page (or make it public in its Visibility setting). That is working as designed for anything you meant to keep private

What not to do

Turning on a search plugin takes a few minutes. Deciding which fields to index, getting WooCommerce attributes and SKUs found, and tracking down the cache or plugin that narrows every search is where most owners would rather have someone do it. If that is you, the box below is for that. Related: changes not showing, scheduled posts not publishing and the wrong text under your site in Google.