Skip to main content

WordPress Chat Search: Find Messages Across Every Conversation

· 4 min read
Creator of Better Messages

Every messenger eventually accumulates enough history that scrolling stops being a viable way to find old messages. "What was that link the instructor sent in week three?" "Which vendor quoted me the lower price?" "What did we agree about the deadline?" Without search, members give up — or worse, they ask the same question again, doubling the workload for whoever has to answer. Better Messages includes a built-in full-text search that runs across every conversation a user participates in, with one-click jumping to the matching message in its original thread.

What gets searched

The search runs across the user's entire message history:

  • Private DMs they sent or received
  • Group conversations they participated in
  • Chat rooms they have access to

Each search hit shows the matching message with surrounding conversation context — who sent it, when, and which thread it belongs to. Clicking a result jumps to that exact message in the original thread, with the message highlighted.

Where the search lives

A search button is part of the messenger interface — accessible from any messenger surface (the main inbox, a chat-room page, the floating mini-widget, the mobile app). Members type keywords; results stream in as they type.

For sites that prefer to keep the messenger UI minimal, the search button can be disabled in Settings → Messaging → Disable Search. By default it is on.

How the search works

Full-text matching against message content. The user's permissions are respected — they only see results from threads they participate in. Admins do not have a "search anyone's messages" admin tool by default (for privacy reasons); for moderation workflows, see the AI content moderation and pre-moderation features instead.

Encrypted threads

End-to-end-encrypted threads cannot be searched server-side because the server has no access to the cleartext — the messages are encrypted in the participants' browsers. Search results for encrypted threads come from messages already decrypted on the searching device. See End-to-end encrypted messaging on WordPress for the trade-offs of E2E threads.

How to enable

Search is on by default. To toggle:

WP Admin → Better Messages → Settings → Messaging → Disable Search — the toggle to turn search off if you do not want it on the site.

Free vs WebSocket version

Search works on both versions:

FeatureFree versionWebSocket version
Full-text search across all conversationsyesyes
Conversation context in search resultsyesyes
Jump to matching message in original threadyesyes
Real-time delivery (so new messages are immediately searchable)pollinginstant
Search inside end-to-end-encrypted threadsbrowser-onlybrowser-only

Frequently asked questions

Will search find messages from very old threads?

Yes — the full message history is searchable regardless of age. There is no time-based cutoff.

Can admins search every user's messages?

No — search respects the user's permission. Each user only sees results from threads they participate in. For moderation across threads, see the Administration screen and the AI content moderation feature.

Does it support partial-word and stemmed matches?

Search uses WordPress's standard full-text matching against the messages table — partial-word matches work via prefix matching; full stemming depends on the site's database engine.

Does it work in non-English languages?

Yes — search is byte-based, so it works in any language including CJK and Indic scripts. Some scripts (Chinese, Japanese, Thai) work better with prefix matches than with full-word boundaries because the languages do not space-separate words.

Will search find file attachments by name?

Search runs over message text. File names are part of the message metadata; matching against attachment names is configurable via filter — talk to support if you need the template.

Does search work in the mobile app?

Yes — the same full-text search runs on the iOS / Android apps. Results behave identically to the web messenger.

See also

Install Better Messages from WordPress.org →