Deliver an ultra-responsive search experience to your visitors — no page reloads, no jQuery, no lag. Init Live Search is a modern, lightweight, and fully accessible live search solution for WordPress — now with native
Block Editor (Gutenberg) blocks and
Abilities API support (WordPress 6.9+), an optional
MySQL FULLTEXT search index, optional
Meilisearch integration, tag-aware matching, SEO metadata support, ACF integration, WooCommerce product filters, and customizable UI presets.
It replaces the default
<input name="s"> with a clean, intuitive search modal powered entirely by the WordPress REST API. Everything loads in real-time — with zero disruption to browsing flow.
Perfect for content-heavy blogs, WooCommerce stores, or even headless sites. Every interaction is fast, fluid, and designed to work across devices.
Want typo-tolerant, sub-50ms relevance ranking on top of that? Connect your own self-hosted or cloud
Meilisearch instance in a few clicks — Init Live Search will automatically prefer it for search, and just as automatically fall back to the built-in database search if it's ever unreachable. Your visitors never see a broken search box.
Prefer working entirely in the Block Editor? Three dynamic blocks —
Live Search Box,
Related Posts, and
AI Related Posts — live under their own
Init Live Search category in the block inserter, each with a live server-side preview as you configure it, and each sharing the exact same rendering code as its shortcode counterpart. For AI agents and automated tools, two read-only abilities (search and related posts) are also exposed through the standard WordPress
Abilities API on WordPress 6.9+.
It also brings AI-powered related posts and an advanced keyword generator — giving your visitors smarter ways to discover content.
This plugin is part of the
Init Plugin Suite — a collection of minimalist, fast, and developer-focused tools for WordPress.
GitHub repository:
https://github.com/brokensmile2103/init-live-search
2.0.2 – October 6, 2026
- Fixed: Related Posts returned nothing when "Use WordPress Native Search" was enabled (
[init_live_search_related_posts], the Related Posts block, the /related slash command and the get-related-posts ability). WP_Query only matches the full title, so the only hit was the current post. Related Posts now always use the plugin's own matching (shortened phrase, bigrams, single words), whatever the native search setting
- Fixed: results cached by 2.0.1 are discarded, and an empty Related Posts result is cached for 1 hour at most (not 12)
2.0.1 – September 25, 2026
- Fixed: FULLTEXT search returned no results for queries containing common English words. With the FULLTEXT index enabled, any query containing an InnoDB stopword ("how", "the", "what", "about"…) — e.g. "how to install" — returned nothing at all, because InnoDB never indexes stopwords and every word was marked as required. Stopwords are no longer required terms, and if nothing remains the search falls back to LIKE; the list is adjustable via
init_plugin_suite_live_search_fulltext_stopwords
- Fixed: infinite scroll re-requested page 1 on every scroll. The
/search endpoint ignored the page parameter, so "load more" kept receiving the same results. Pagination now works (up to 3 pages, as designed), and "load more" uses the configured Max Results instead of a hard-coded 10
- Fixed: with Meilisearch enabled, pages 2+ of search and related results were always empty because the offset was applied twice
- Fixed:
wp init-live-search fulltext-reindex made search return nothing while the index was being rebuilt; search now temporarily uses LIKE until the rebuild finishes
- Fixed: the single-word fallback silently returned nothing on MySQL 5.7 and older, which do not support
\b in REGEXP; the correct word-boundary syntax is now picked per server (MySQL 8.0.4+ and MariaDB are unchanged)
- Fixed: the "shorten the phrase" fallback overwrote results already found (including synonym matches) instead of adding to them
- Fixed: ACF field matches ignored the Post Types to Include setting
- Fixed: object-cache keys missed the language,
no_fallback and current settings, so sites with Redis/Memcached could receive results in the wrong language; cached results now also refresh automatically whenever posts or terms change
- Fixed: PHP 8.1+ deprecation notice on
/product requests without a price order; result IDs are now always returned as integers (as the Abilities API schema expects)
- Fixed: uninstall left analytics chunks, Meilisearch settings, dictionary settings and cache transients behind; multisite networks are now cleaned site by site
- Security:
/read could return the title, link and excerpt of drafts and private posts by ID. Every result list (REST, blocks, shortcodes, abilities) now only contains published posts of public or admin-enabled post types — filter init_plugin_suite_live_search_is_result_visible
- Security: password-protected posts are searchable by title only — no snippet is built from their content and the FULLTEXT index no longer stores it
- Security:
post_type passed through shortcode/block attributes or the Abilities API is limited to public or admin-enabled post types (e.g. shop_coupon or wp_block can no longer be queried); /tax only accepts public taxonomies (filter init_plugin_suite_live_search_allowed_taxonomy)
- Security:
/coupon skips email-restricted (customer-specific) coupons and only responds when product is enabled — filters init_plugin_suite_live_search_coupon_include_restricted and init_plugin_suite_live_search_coupon_enabled
- Security: cross-site search results are sanitized in the browser (only
<mark> highlighting is kept, links must be http/https), and HTML stripping no longer uses innerHTML
- Performance: Related Posts no longer run a full search on every page view. Keyword-based related posts (shortcode, block, auto-insert, Abilities API) are now cached per post for 12 hours and re-checked before display — filter
init_plugin_suite_live_search_related_cache_ttl (0 disables)
- Performance: Search Analytics now only logs real visitor searches — related posts, 404 redirects and API calls were previously counted too, causing a database write on every post view (filter
init_plugin_suite_live_search_should_track)
- Performance: Meilisearch circuit breaker — after a timeout or 5xx error, Meilisearch is skipped for 60 seconds and search falls back to the database instantly instead of waiting for the timeout on every request (filter
init_plugin_suite_live_search_meili_circuit_ttl); only document IDs are requested from Meilisearch
- Performance: fallback excerpts for posts without a manual excerpt no longer run the full
the_content filter chain (shortcodes, page builders, embeds) for every result — return true from init_plugin_suite_live_search_use_legacy_excerpt to restore the previous behaviour
- Performance: 404 smart redirect results are cached and junk bot URLs are ignored (filters
init_plugin_suite_live_search_404_cache_ttl, init_plugin_suite_live_search_404_redirect_status); /random picks a random offset instead of ORDER BY RAND()
- Performance: AI Related Posts diversification (MMR) is now O(k·n) instead of O(k²·n) — identical results, about 3× faster; candidate caches are primed before filtering
- Performance: FULLTEXT background indexing and
wp init-live-search fulltext-reindex use keyset pagination (ID > last) instead of OFFSET — faster on large sites and no skipped posts; an in-progress 2.0.0 build resumes automatically
- Performance: single-word fallback capped at 6 distinct words (filter
init_plugin_suite_live_search_fallback_max_words); synonym dictionaries built once per request; +/- operator filtering and Related Posts templates prime caches in one query; faster keyword highlighting with identical output
- Performance: the frontend script now loads with
defer, and scroll handling is passive and frame-throttled
- Improved: better Vietnamese & Unicode matching. Search terms are normalized to Unicode NFC, so Vietnamese typed on macOS/iOS keyboards now matches; snippets are case- and accent-insensitive (consistent with highlighting) and never cut a word in half; word counting is Unicode-aware. Search terms are length-capped (filters
init_plugin_suite_live_search_max_term_length, init_plugin_suite_live_search_rest_max_term_length)
- Improved: deterministic ranking when results have equal scores (best position in any source list first), instead of PHP-version-dependent ordering
- Changed: the browser result cache (
localStorage) now expires after 1 hour (filter init_plugin_suite_live_search_client_cache_ttl, 0 = never) and no longer breaks search when storage is full or blocked
- i18n:
.pot regenerated; 1 new string ("Open Search") and 3 previously missing strings translated in the Vietnamese .po/.mo
2.0.0 – August 04, 2026
- New: Abilities API support (WordPress 6.9+): registers two read-only abilities under the
init-live-search category — init-live-search/search-posts (runs the plugin's search engine and returns matching results) and init-live-search/get-related-posts (returns posts related to a given post ID). Both are discoverable and executable via PHP, wp_get_abilities(), and — when a site opts in — the wp-abilities/v1 REST namespace. Fully optional and backward-compatible: on WordPress versions older than 6.9, the integration silently does nothing
- New: Block Editor (Gutenberg) support: three dynamic blocks, grouped under their own Init Live Search block category (instead of the generic "Widgets" category). Each block is registered via
block.json (with a PHP render.php file wired through the "render" field, WP 6.1+) that calls the exact same shortcode function as its shortcode counterpart — no duplicated display logic, output always matches:
- Live Search Box — the icon/input launcher, equivalent to
[init_live_search]
- Live Search: Related Posts — keyword-based related posts, equivalent to
[init_live_search_related_posts]
- Live Search: AI Related Posts — AI multi-signal related posts, equivalent to
[init_live_search_related_ai]
The editor integration is a single, no-build-step vanilla JavaScript file using wp.serverSideRender for a live preview directly in the editor. CSS for both the editor preview and the frontend is declared once via block.json's "style" field (matching your chosen "CSS Style" setting), so WordPress enqueues it automatically wherever it's needed — no manual enqueue calls
- Changed:
Requires at least raised from 5.9 to 6.9 to support the Abilities API integration. Requires PHP remains 7.4
- Fixed: Block Editor inserter/sidebar strings (block titles, descriptions, keywords, and settings labels) now translate correctly — both the JS-side strings (via a Jed-formatted JSON translation file, resolved through
wp_set_script_translations() with an explicit path to this plugin's languages/ directory) and the block.json metadata strings (via the standard PHP .mo/gettext mechanism)
Tested up to: 7.1
1.9.6 – August 03, 2026
- Fixed: FULLTEXT background indexing showed a false "not running" error. Right after enabling the checkbox, the status could briefly (and misleadingly) report that WP-Cron wasn't running — even though it was, mid-batch — because WP-Cron unschedules an event before running it, so a plain
wp_next_scheduled() check could catch it in that gap. Status detection now also checks whether a batch is actively processing, and the page load immediately after clicking Save shows a neutral "Checking indexing status…" message instead of guessing right or wrong — it's simply too early to know at that point
- Fixed: Meilisearch reindex could fail outright with
HTTP error 413 from Meilisearch. A batch's JSON payload size depends on post content, not just post count, so a fixed batch size that works on one site can exceed Meilisearch's (or a reverse proxy's) payload size limit on another. The background reindex, the "Reindex Now" button, and wp init-live-search meili-reindex now automatically split an oversized batch and retry with smaller payloads; if a single post is still too large on its own, it's skipped (with a warning listing the post ID) instead of blocking the entire reindex
- Fixed: the Meilisearch reindex progress indicator (Settings page + live polling) could stop early on the same kind of false "not running" signal described above, requiring a manual refresh to show accurate progress
- Changed: reindexing no longer requires "Enable Meilisearch" to be checked. The "Reindex Now" button, the background cron job, and
wp init-live-search meili-reindex now only need Host and Index to be filled in — useful for building or testing a new index while the current search source (database or an existing Meilisearch index) keeps running, without switching it live first. Auto-sync on save/delete still only starts once the checkbox is enabled, as before
1.9.5 – August 03, 2026
- Performance: fixed N+1 queries when building search/related-posts result lists — post, postmeta, and term caches for the whole batch are now primed in one shot before rendering, instead of running fresh queries per result
- New: FULLTEXT Search Index (opt-in): added an optional MySQL FULLTEXT-indexed table as a faster alternative to
LIKE '%term%' for Title/Excerpt/Content matching on the standard database search pipeline — a major speed-up on sites with a large number of posts
- Safety: the FULLTEXT index is off by default and only takes effect once the server's support is confirmed and the index has been fully built; until then the plugin transparently keeps using the existing LIKE-based search
- Auto-indexing: once enabled, the FULLTEXT index builds itself automatically in the background via WP-Cron (~300 posts every 5 seconds) — no SSH/WP-CLI access required.
- WP-CLI: added
wp init-live-search fulltext-reindex to build or rebuild the FULLTEXT index manually/faster
- Unaffected: Tag, SEO metadata, ACF field search, synonym expansion, and the +/- operators are untouched by the FULLTEXT index change and continue to work exactly as before.
- Meilisearch: "Reindex Now" button: added to the Meilisearch settings tab so sites without WP-CLI/SSH access can build or rebuild the index too — runs in the background (~200 posts every 5 seconds) with a live progress status
- Meilisearch: error backoff: the background reindex automatically stops with a clear error message after 3 consecutive failed batches, instead of retrying forever against an external server
- Meilisearch: manual-only by design: unlike the FULLTEXT index, background reindexing never starts on its own — Meilisearch is a user-owned, potentially paid external service, so it only runs when explicitly started via the button or
wp init-live-search meili-reindex
1.9.4 – July 20, 2026
- Fixed: the Search API Key and Admin/Indexing Key fields on the Meilisearch settings tab could be silently autofilled by the browser's saved password manager, risking accidental exposure of an unrelated saved password if the form was submitted without checking. These fields are now correctly excluded from autofill
- Fixed: the "Test Connection" button on the Meilisearch settings tab always displayed "? documents" instead of the actual estimated document count, due to a naming mismatch between the connection test response and the display script
- Code Quality: moved the Meilisearch "Test Connection" JavaScript out of an inline
<script> block into admin.js (enqueued properly via wp_enqueue_script), in line with WordPress Coding Standards; translated strings are passed through via wp_localize_script so existing translations are unaffected
1.9.3 – July 20, 2026
- Meilisearch Integration (optional): added a new "Meilisearch" settings tab to connect a self-hosted (bring-your-own-server) Meilisearch instance as the primary search source. When enabled and reachable, search requests are answered by Meilisearch's typo-tolerant, relevance-ranked engine; if the request fails or times out for any reason, the plugin automatically falls back to the existing local database search — search never goes down solely because of a Meilisearch outage
- Auto-sync on Save/Delete: publishing, updating, trashing, or deleting a post now automatically pushes/removes the corresponding document in the configured Meilisearch index (non-blocking, does not slow down editor saves)
- WP-CLI Command: added
wp init-live-search meili-reindex to bulk-index (or rebuild) all published posts of the enabled post types into Meilisearch.
- Test Connection: added a one-click connection test on the Meilisearch settings tab
- Security: the sensitive indexing/admin API key can be defined via the
INIT_LIVE_SEARCH_MEILI_ADMIN_KEY constant in wp-config.php (recommended) instead of being stored in the database
- i18n: all new UI strings use English as the source (msgid) with the
init-live-search text domain, per WordPress.org standards; .pot regenerated and the Vietnamese .po/.mo translation updated with 27 new/previously-missing strings translated
1.9.2 – July 17, 2026
- Race Condition Fix: search requests in the modal (
script.js) now use AbortController to cancel stale in-flight requests when the user keeps typing, preventing older/slower responses from overwriting newer search results
- +/- Search Operator Redesign:
+word/-word now correctly narrow the results of the plain search terms instead of being merged into the same fuzzy/fallback pool. Plain words still drive the base search (with all existing fuzzy matching, synonyms, and fallback logic intact); +word requires the narrowed results to also contain that word, -word excludes results containing it — supporting multiple +/- operators in the same query (e.g. wordpress -plugin -theme)
- Predefined Dictionary Expansion: significantly expanded the E-commerce, Technology, Business, and Health dictionaries (previously the thinnest of the 10 built-in dictionaries) with dozens of additional English/Vietnamese synonym pairs, bringing them in line with the other dictionaries
- Dictionary Cleanup: fixed 4 duplicate dictionary keys (
sale, visa, gym, vintage) that were silently overwriting earlier synonym definitions
- Minor Bug Fixes: added missing optional chaining in
loadMoreRecent() to prevent a potential crash when an item is missing its data-url attribute; normalized trailing-slash URL comparison in loadMoreGeneric() to prevent possible duplicate items when loading more results
1.9.1 – July 07, 2026
- Related Posts Command Conditions: added two new conditional settings for the "/related" default command — restrict auto-execution to single post pages only, and exclude specific URL slug keywords
- Smart Default Command Guard: frontend now validates
related_only_single and related_exclude_slugs before auto-injecting /related into the search modal, preventing unwanted related searches on archives, pages, or excluded paths
- Settings UX: related command options are visually dimmed and non-interactive when "Related Posts" is not selected as the default slash command
- Sanitization:
related_only_single and related_exclude_slugs are properly sanitized via the existing settings flow with keyword trimming and line-by-line validation
1.9.0 – May 12, 2026
- Thumbnail Fallback: added new option "Use First Image as Thumbnail Fallback?" — automatically extracts the first image from post content when no featured image is available
- WordPress-native Detection: fallback engine now prioritizes parsing
wp-image-{ID} classes and retrieves the proper WordPress thumbnail size using attachment metadata
- Smart Fallback Chain: if attachment lookup fails, the plugin gracefully falls back to the raw
<img src=""> URL before using the default thumbnail
- Host Validation: external image URLs are validated against the current site host/subdomain by default to prevent unwanted third-party hotlinks
- Developer Extensibility: introduced new filter
init_plugin_suite_live_search_allow_fallback_image_host for customizing allowed fallback image hosts
- Settings Integration: added full admin setting, sanitization flow, and translation support for the new thumbnail fallback feature
View full changelog (all versions): Init Live Search – Changelog