Better Search v4.3: WP-CLI support, dashboard drill-down and more

Better Search has always had one job: replace the default WordPress search with something that actually surfaces relevant content. Over time, that’s meant better relevance scoring, fuzzy matching, custom index tables, and multisite support. Each release has added more control — but more control also means more to manage.

Better Search v4.3.0 is the biggest release in a while. I’ve added WP-CLI support, a network admin dashboard, a scheduled index-reconciliation cron, and a significant fuzzy-search refactor. Most of these are in Better Search Pro. The free version picks up the Media Handler improvements, search hardening, and several bug fixes that affect both editions.

Better Search v4.3

What’s New in Better Search Pro

WP-CLI Support

Some operations just don’t belong in a browser. Rebuilding a search index on a large site, clearing caches during a deployment, checking table status from a staging environment — these are all things I’ve had to do through the admin when a command-line interface would have been faster and easier to script.

Better Search Pro now ships with a full WP-CLI command set under the bsearch top-level command:

  • search: run a search query from the command line
  • cache: manage the search cache
  • db: check database status
  • stats: view search statistics
  • settings: read or update plugin settings
  • tables: manage custom search tables
  • status: overall plugin status
  • stopwords: manage the stopword list

All commands support multisite usage, including the --url parameter. Deployments, scheduled maintenance, and bulk operations no longer need a browser session.

Some examples:

wp bsearch search "keyword" --limit=10
wp bsearch cache clear
wp bsearch tables status
wp bsearch stats view

Network Dashboard for Multisite

Better Search Network Dashboard

If you manage a multisite network, you already know the drill: switching between sites just to check search performance gets old quickly. There was no good way to get an overview of what people were searching for across the network without visiting each site individually.

Better Search v4.3.0 adds a network-level dashboard accessible from the network admin menu. It shows a popular searches chart and a statistics table that aggregate data across all sites in the network — the same layout as the single-site dashboard.

Dashboard Chart Drill-Down

The daily searches chart has always been useful for spotting trends. What it couldn’t do was tell you what people were actually searching for on any specific day.

That’s fixed in this release. Click any bar in the chart, and you’ll see the top 20 popular searches for that day. It’s the kind of thing that sounds minor until you’re trying to figure out why search activity spiked on a Tuesday. The popular searches query for this view is now cached per request, so navigating the dashboard doesn’t trigger repeated database hits.

Scheduled Index Reconciliation

Custom search index tables drift over time. Published posts can go missing from the index due to timing issues, imports that bypass normal WordPress hooks, or failed save operations. The only way to fix it previously was to trigger a manual reindex from the Tools page.

v4.3.0 adds a twicedaily cron job that automatically syncs any published posts missing from the custom search index. It runs in the background, requires no configuration, and doesn’t touch posts that are already correctly indexed. The index stays consistent without manual intervention.

InnoDB Conversion Tool

On some installs, the custom search table might use MyISAM as its storage engine for FULLTEXT support. But this is a legacy engine that has been replaced by InnoDB.

Convert Custom Table to InnoDB tool

Pro now includes an InnoDB conversion tool, available under Better Search > Tools. It handles the engine change and automatically recreates the FULLTEXT index afterwards. The current engine status is shown on the page before you convert.

New Exclusion Options

The front page and the blog posts page do not always belong in search results, and keeping them out required a custom filter.

Two new settings make it a checkbox:

  • Exclude Front page — removes the site’s front page from results
  • Exclude Posts page — removes the blog posts page from results

Both are off by default.

Fuzzy Search and Custom Table Improvements

The fuzzy search code had accumulated complexity over time. Query_Modifier and Fuzzy_Search had overlapping responsibilities, which made the logic harder to follow and created some edge cases that were difficult to track down.

This release refactors that split cleanly: Query_Modifier now owns score construction and request shaping, while Fuzzy_Search acts purely as the scoring service.

Alongside the refactor:

  • Short-term LIKE searches (three characters or fewer) now score full-word matches higher and order results by relevance
  • Soundex matching was rewritten from scratch, and the multisite LIMIT cap has been removed
  • Content scoring was added for fuzzy results
  • Fuzzy search is now automatically disabled when boolean operators are present, preventing SQL conflicts
  • New filters are available for fuzzy truncation parameters

Custom tables search also gains a FULLTEXT toggle. When FULLTEXT is disabled, LIKE-only relevance scoring has been improved to produce better-ordered results. LIKE term matching now uses an EXISTS subquery, avoiding unbounded JOINs when the terms table is not already in scope. On the multisite side, fuzzy subqueries are correctly unwrapped before UNION assembly, and only top-level ORDER BY clauses are stripped, preventing malformed SQL in complex cross-site queries.

What’s new in all versions

Media Handler: ACF Image Field Support

The Media Handler resolves featured images through a priority chain — featured image, then various fallbacks. That chain has been refactored with a strategy-based approach, and the most frequently requested addition is now in: ACF Image fields are supported in all three formats (Image Array, Image ID, Image URL) as well as plain-text URL fields.

If your theme or plugin uses ACF for featured image management and thumbnails weren’t appearing in search results, this fixes it.

Search Hardening

Output in settings forms is now properly escaped, search sanitisation has been tightened, and boolean mode validation is now more consistent across edge cases. None of these changes affects visible behaviour, but they close some gaps that have been on my list for a while.

Bug Fixes

All versions:

  • Fixed duplicate search query being executed on every non-seamless search page load
  • Fixed relevance percentages on paginated results by stabilising topscore handling across pages, while reducing unnecessary topscore queries when minimum relevance filtering is not in use
  • Fixed spinner alignment inside action buttons
  • Fixed placeholder attribute escaping in text field rendering

Better Search Pro:

  • Fixed localised admin script data keys: a .strings. The nesting error was causing the cache-clear confirmation and error dialogs to display undefined
  • Fixed a fuzzy LIKE query SQL issue that could generate duplicate ID fields in wrapped sub-queries
  • Fixed fuzzy search, bypassing FULLTEXT exclusions
  • Fixed inconsistent indentation and table alias qualification in multisite query composition

What’s Next

The WP-CLI commands and network dashboard in this release lay the groundwork for better automation and multisite management tooling.

As always, the direction comes from support requests and real-world usage. If something in this release solves a problem you’ve been dealing with — or if there’s something it still doesn’t handle — let me know in the support forum or on GitHub.

Upgrade Notes

No database migrations are required. The scheduled reconciliation cron registers automatically on activation. If you’re running a multisite network, the network dashboard becomes available immediately after upgrading.

Happy searching.

Get Better Search

Leave a Reply

Your email address will not be published. Required fields are marked *