Skip to main content

How to customize sounds in the plugin?

Built-in Sound Customization#

Better Messages provides built-in options to customize sounds directly from the plugin settings without any code.

Navigate to the Better Messages → Settings → Notifications tab and scroll to the Sounds section.

Available options#

Each of the four sounds has a … Volume slider and a … Sound row of buttons:

SoundVolume sliderButtons
Notification Sound — a new incoming messageNotification VolumePlay · Custom Sound · Reset
Sent Message Sound — your own message going outSent Message VolumePlay · Custom Sound · Reset
Incoming Call Sound (WebSocket version)Incoming Call VolumePlay · Custom Sound · Reset
Outgoing Call Sound (WebSocket version)Outgoing Call VolumePlay · Custom Sound · Reset
  • The volume slider runs 0–100. Set it to 0 to disable that sound completely.
  • Custom Sound opens the WordPress media library so you can pick an MP3.
  • Reset only appears once a custom sound is set, and puts the built-in one back.
info

You can preview any sound by clicking the "Play" button before saving your changes.

Advanced: Replace Sounds Folder via Code#

REQUIREMENTS

To be able to implement this guide, you need to learn how to insert PHP snippets to your website.

You can find guide here: WP Beginner

If you need to replace multiple sound files programmatically, you can use the bp_better_messages_sounds_assets filter.

Plugin keeps default sound files in this folder: /plugins/bp-better-messages/assets/sounds

You can copy this folder to another location that won't be overwritten on plugin updates, then use this filter to point to your custom sounds folder:

<?php
add_filter('bp_better_messages_sounds_assets', function($sounds_url){
return 'https://yourwebsite.com/sounds/'; // New sounds url
});

Sound Files#

The following sound files can be replaced:

FileDescription
notification.mp3 / notification.oggPlayed when a new message is received
sent.mp3 / sent.oggPlayed when a message is sent
calling.mp3 / calling.oggPlayed for incoming calls (WebSocket version)
dialing.mp3 / dialing.oggPlayed for outgoing calls (WebSocket version)

Every sound ships as both an MP3 and an OGG, and the player is handed the pair so the browser can pick whichever it supports. Keep the same file names as the originals, and include both formats — a folder with only MP3s leaves the OGG requests unanswered.