WordPress’s default search is bad in a specific way: it searches only post titles and content, ignores relevance ranking (results are in reverse chronological order regardless of match quality), and cannot search custom fields or post meta. On a site with ACF data, WooCommerce product attributes, or any structured content in custom fields, the default search misses a huge portion of your actual content. Relevanssi replaces the default search with relevance-ranked results that include custom fields, comments, tags, and excerpts in the search index.
What Relevanssi Changes
Relevanssi intercepts WordPress search queries and runs its own search instead of the default MySQL LIKE query. Its search index includes the full text of posts and pages, custom field values, taxonomy terms, and comments if you configure them. Results are ranked by relevance – how many times the search term appears, whether it appears in the title (weighted higher) or body, and whether the post is recent. A post with the search term in its title outranks a post with the term buried in a long body of text, which matches how users expect search to work.
The indexing happens in the background when you install the plugin and rebuild the index. After that, Relevanssi indexes new content as it is published, keeping the search index current without manual intervention.
Step 1: Install and Build the Index
Install Relevanssi from WordPress.org. After activation, go to Relevanssi -> Indexing. Before building the index, configure what to include. Default settings index posts and pages. Expand this based on your site:
- Enable indexing for custom post types your site uses (products, events, portfolio items)
- Enable custom fields indexing – this is the critical setting for sites with ACF data
- Enable taxonomy terms indexing – tags and category names become searchable
- Enable comment indexing if comments contain useful content visitors would search for
After configuring, click “Build the Index”. On large sites this takes a few minutes. The progress bar shows indexing progress. Do not navigate away during indexing.
Need help configuring search for your WordPress site? Describe your setup and get a free estimate.
Step 2: Configure Custom Field Indexing
Go to Relevanssi -> Indexing -> Custom Fields. By default, Relevanssi does not index any custom fields. Enter the meta keys for fields you want to include in search. For ACF fields, use the field name (the slug, not the label). For WooCommerce, include _sku and any product attribute meta keys.
You can weight custom fields differently from post content. A product SKU that exactly matches a search query should rank the product at the top – give SKU fields a high weight multiplier (5 or 10) compared to body content (weight 1). Configure weights in Relevanssi -> Searching -> Weights.
Step 3: Fuzzy Matching and Partial Words
Relevanssi Premium adds fuzzy matching – searching for “configur” returns results for “configuration”, “configured”, and “configuring”. The free version requires exact word matches. For most content sites, exact matching is sufficient. For product searches where customers type partial model numbers or abbreviations, fuzzy matching significantly improves result quality.
Enable partial matching in Relevanssi -> Searching -> Search Parameters. Configure the minimum word length for partial matching to avoid matching every short word fragment.
Step 4: Highlighting Search Terms in Results
Relevanssi can highlight the search term in result excerpts, showing visitors exactly where in the post their search term was found. This is particularly useful for long-form content where the matching passage might be far from the beginning. Enable in Relevanssi -> Excerpts and Highlights. Configure the excerpt length and how many words to show around the matching term.
Indexing WooCommerce Products
For WooCommerce stores, Relevanssi improves product search significantly when configured to index product attributes and variations. Include the WooCommerce product post type in the index and add the relevant product meta keys to custom field indexing. Product attributes stored in wp_postmeta (pa_color, pa_size) become searchable, meaning a customer searching “blue medium” can find a product with those attribute values even if the product description does not mention the colour and size.