WordPress GuideDevelopment → Add Continuous Background Music

How to add continuous background music to a WordPress site

Adding background music can set the mood, enhance storytelling, or make your site more memorable. But if you want the music to keep playing while users click around your site, you’ll need more than just an embedded audio file. WordPress reloads the page with every new click—so without the right setup, your music stops every time.

Let’s walk through how to add background music to your WordPress site that plays continuously across pages, and actually stays playing.

Get fast, reliable hosting for WordPress

Power your site with the industry’s fastest, most optimized WordPress hosting

Why background music can be tricky in WordPress

WordPress pages reload fully by default. When that happens, any embedded audio or JavaScript-based player also reloads—meaning your background music starts over or stops entirely.

Modern browsers add another challenge: many now block autoplaying audio unless the user interacts with the page first. That means music won’t start until someone clicks something.

To solve this, you’ll need to:

1. Choose your audio file and format

Start by selecting the track you want to use for background music. Make sure it’s properly formatted and web-optimized:

2. Upload your audio file to the WordPress Media Library

Once your file is ready, upload it to your site:

This step gives you a hosted version of your audio file on your own site, so it can be used in custom HTML or a plugin.

3. Choose a plugin for persistent background audio

To keep audio playing across multiple pages, you need a plugin that creates a persistent or “sticky” player that doesn’t reload.

Here are three plugin options that make it easy to add looping, autoplaying audio:

AudioIgniter

To use AudioIgniter:

CP Media Player

To use CP Media Player:

Html5 Audio Player – MP3 Player for WordPress

To use HTML5 Audio Player:

4. Add your audio player to a persistent part of the site

To make sure your music doesn’t restart every time a visitor clicks a link, you need to place the player somewhere that doesn’t reload—like your site’s header, footer, or a fixed widget area.

Option 1: Use a footer widget

Option 2: Use a floating/fixed position bar (via page builder or CSS)

If your theme or page builder allows, create a floating bar or sticky section that loads across all pages:

Make sure your theme or layout doesn’t override position: fixed, and test for mobile compatibility.

5. Test your autoplay and user experience

Once everything is in place, test the music player across common browsers (Chrome, Safari, Firefox, Edge) and devices.

Things to watch for:

6. Extra tips and best practices

If you’re adding background music to your WordPress site, keep these tips in mind:

Ready to get started?

Get the fastest, most secure WordPress.org hosting on the market.

Additional resources

What is managed WordPress hosting? →

Get details and decide if managed WordPress hosting is right for you.

How to set up SMTP for SendGrid in WordPress →

Learn how to set up SMTP in WordPress using SendGrid for reliable email delivery.









A complete guide to WordPress shortcodes →

Shortcodes make life easier. Learn how to get started!

Trust us to help you choose the ideal hosting solution

Loading form…