What is Better Search plugin?
Better Search by Ajay D’Souza is a free WordPress plugin that replaces the default WordPress search with a more capable search engine that considers relevance ranking. WordPress’s default search returns results in reverse chronological order (newest first) regardless of how closely each result matches the search terms. Better Search introduces relevance-based ranking using MySQL’s FULLTEXT search capabilities — posts with the search term in the title rank higher than posts where it only appears in the body, and posts with multiple mentions of the search term rank above posts with single mentions.
Better Search configures the relevance weighting for different content areas: title weight, content weight, meta weight. A search term found in the post title might be weighted 5x versus the same term found in post content, ensuring title-matching results appear before body-only matches. The plugin is a drop-in replacement — it integrates with WordPress’s standard search form and search results template without requiring separate search result pages or theme modifications.
Better Search is completely free with no premium tier. For WordPress sites where the default search is producing poor results (newest posts appearing before more relevant older posts, or relevant posts being buried), Better Search provides a meaningful improvement using standard MySQL FULLTEXT search without the complexity of SearchWP’s index-based approach or the server requirements of Elasticsearch.
Need Help With Better Search Setup, Troubleshooting, or Customization?
Need help with Better Search? Whether you are dealing with errors, broken functionality, styling problems, plugin conflicts, or advanced customization, we can help you fix the issue and get the plugin working properly on your WordPress site.
Get Better Search Expert HelpKey Features
- MySQL FULLTEXT-based relevance ranking for search results
- Configurable weight for title vs content matches
- Boolean search mode support
- Automatic relevance-based result ordering
- WordPress built-in search replacement (no separate search page needed)
Pros & Cons
Pros
- Completely free — meaningful search improvement at zero cost
- Transparent relevance weighting allows tuning for site-specific needs
- Drop-in replacement with no theme changes required
Cons
- MySQL FULLTEXT-based — less powerful than dedicated search indexes like SearchWP or Elasticsearch
- Requires MySQL FULLTEXT index support (standard on most MySQL configurations but verify)
Free vs Premium
Completely free. No paid version.
Common Problems & Fixes
Better Search is returning no results for searches that the default WordPress search returned results for. How do I diagnose this?
Better Search uses MySQL FULLTEXT search. Potential issues: (1) MySQL FULLTEXT requires a minimum word length (default: 4 characters) — words shorter than 4 characters are ignored; (2) FULLTEXT has stop words (common words like “the,” “and,” “is” ignored in search); (3) the FULLTEXT index may not have built on older posts — in Better Search → Settings → Advanced, trigger a reindex; (4) verify your MySQL version supports FULLTEXT on InnoDB tables (MySQL 5.6+); (5) check if Better Search is excluding the post type containing the expected results in its settings.
Better Search results are not considering custom field data — posts matching only in custom fields do not appear in results. How do I include custom fields?
Better Search’s default FULLTEXT index covers post_title and post_content. Custom fields (post_meta) are not in the standard FULLTEXT index. To include custom fields: Better Search has a setting to extend search to post_excerpt and optionally post_meta fields — enable this in Better Search → Settings → General → Search in Post Meta. Enabling post_meta search increases query complexity; test performance impact on large databases.
Better Search highlighting is showing raw HTML tags in the search results instead of styled highlights. How do I fix the highlight display?
Better Search wraps highlighted terms in HTML span tags for styling. If these appear as raw text: (1) the search results template may be escaping HTML — verify the results template uses the_excerpt() or wp_kses_post() rather than esc_html(); (2) a caching plugin may be serving an older cached result; (3) verify Better Search → Settings → Highlighting has the highlight span class configured and that your theme has CSS for that class; (4) if using a custom results template, ensure the template correctly handles HTML in the excerpt.
Customization & Developer Notes
How do I configure Better Search to weight title matches higher than content matches?
In Better Search → Settings → Weights, configure the relevance weights. Set “Title Weight” to a higher value (e.g., 5) and “Content Weight” to a lower value (e.g., 1). This means a post whose title contains the search term is scored 5x compared to a post where it appears only in the body. Adjust these values based on your content — for documentation sites, title weight should be high; for long-form article sites, a more balanced weight may provide better results.
How do I restrict Better Search to search only within a specific post type (e.g., only blog posts, not pages)?
In Better Search → Settings → General → Post Types, configure which post types are included in search. Uncheck “Pages,” “Attachments,” and any other post types that should not appear in results. Only checked post types will be included in the Better Search results. This is useful for sites where visitors should only find blog posts (not admin pages, product pages, etc.) in the search results.
Frequently Asked Questions
Is Better Search better than SearchWP for improving WordPress search?
SearchWP is significantly more powerful than Better Search: it uses a custom index for faster queries, supports custom field searching out of the box, provides WooCommerce product attribute search, has live search suggestions, and has active professional development. Better Search uses MySQL FULLTEXT which is simpler and free but less capable. For sites with moderate content volumes where improving result ordering is the primary need, Better Search is entirely adequate at no cost. For sites needing serious search improvement (custom fields, live suggestions, WooCommerce), SearchWP justifies its $99/year cost.
Does Better Search work with WPML or multilingual WordPress sites?
Better Search has documented WPML compatibility. WPML-specific search issues can arise because WPML creates separate content for each language, and FULLTEXT search must be configured to search within the correct language’s content. Better Search includes WPML compatibility options in its settings. Test search behavior across languages in your specific WPML configuration to verify results return the correct language’s content for each language context.
Can Better Search break after updates?
Yes, that can happen, especially on older sites with many plugins. This usually happens when the plugin, theme, and add-ons are updated out of sequence. In most cases, testing on staging catches the issue before it reaches the live site. From experience, backups and changelog reviews save a lot of cleanup time.
What should I check before installing Better Search?
Start by checking whether another plugin already does the same job. In most cases, overlap is what creates avoidable conflicts and performance issues. A common issue is installing a plugin because it looks convenient without checking the stack first. From experience, a short compatibility review avoids most of the pain later.