Skip to main content

Maximum Message Length

Better Messages can cap how long a single message is allowed to be. When set, the composer shows a live character counter as users approach the limit and prevents sending messages that exceed it. Server-side enforcement ensures the limit is never bypassed by a custom client or API call.

What it adds#

  • Configurable per-message character limit, site-wide
  • Live counter that appears in the composer at 80% of the limit
  • Counter turns red and Send button is disabled when the limit is exceeded
  • Tooltip explains the limit on hover
  • Server-side enforcement via REST β€” over-limit messages rejected with a clear error
  • Applies to both new messages and edits
  • Emoji-aware counting β€” family emojis (πŸ‘¨β€πŸ‘©β€πŸ‘§), skin-tone variants (πŸ‘πŸ½), country flags (πŸ‡ΊπŸ‡Έ) count as one character each

How it works#

Set a maximum number of characters in Settings β†’ Messaging β†’ Maximum Message Length. As soon as a user crosses 80% of the configured limit, a small counter appears in the composer next to the Send button. When the message goes over the limit:

StateUI behavior
< 80% of limitNo counter shown (clean UI)
80–100% of limitCounter appears, showing used / total
Over the limitCounter turns red, Send button disabled
User trims to under limitCounter returns to neutral, Send button re-enabled

The limit is enforced on both client and server β€” client UI is fast feedback, server-side REST validation is the real guard. Bypass attempts via custom clients fail with a localized error response.

Each grapheme counts as one character β€” including complex sequences:

EmojiCounts as
πŸ˜€1 character
πŸ‘πŸ½ (skin-tone)1 character
πŸ‘¨β€πŸ‘©β€πŸ‘§ (family ZWJ sequence)1 character
πŸ‡ΊπŸ‡Έ (country flag)1 character
<strong>bold</strong>4 characters ("bold") β€” HTML not counted

Attached files and image embeds don't count β€” only visible text contributes to length.

Maximum Message Length setting in the admin Messaging tab Composer with the live character counter shown in red when the message exceeds the configured limit

When to set a limit#

Use caseSuggested limit
SMS-style brevity160 characters
Twitter-style chat280 characters
Forum-style discussion5,000 characters
Long-form coaching / consulting messages20,000 characters
Anti-spam baseline10,000 characters (catches dump-style spam)
Uncapped (default)0

How to enable#

Navigate to WP Admin β†’ Better Messages β†’ Settings β†’ Messaging.

  • Maximum Message Length β€” Maximum number of characters allowed (set to 0 for no limit)

Frequently asked questions#

Can different roles have different limits?#

Not in the default UI β€” the setting is a single site-wide cap. Per-role limits are not exposed as a built-in option today; contact support if your site needs that pattern.

What about messages that were already over the limit before I enabled this?#

Pre-existing messages are unaffected β€” only NEW sends and edits are validated. Editing an old over-limit message would force the user to trim it.

Does the counter handle right-to-left languages correctly?#

Yes β€” character counting is direction-agnostic. The counter appears in the same place regardless of script direction.

Is the limit shared across the message text and any attached caption?#

The limit applies to the message text only. File attachments and their auto-generated captions don't count.

Can the limit be bypassed via the REST API?#

No β€” server-side validation rejects over-limit requests. The client UI is convenience; the server is the source of truth.

See also#