WordPress Audio Upload Guide

Do you want to add WordPress music files to your site? See now how to upload & use your audio files tracks on your WordPress site easily

By Claudio Pires
Updated on October 25, 2022
WordPress Audio Upload Guide

Do you want to add WordPress audio files to your WordPress site? As a content management system, WordPress can handle audio files & music. See now how to upload your audio tracks in an easy method.

WordPress offers the ability to add different types of media to your posts. Audio files are a lesser-known/used feature in a medium that celebrates the written word. Nevertheless, there are times when you need to add audio to your site, and you can do it easily with the built-in functionality of WordPress. Here is how you go:

Upload a single audio file (MP3) directly to a WordPress post

This method is best if you have only a few audio files (MP3) to upload.

From the left navigation menu in WordPress:

  • Log in to your WordPress dashboard.
  • For more information, see this article: How to Login to WordPress
  • Navigate to the Posts section and click Add New.
  • Click the + icon in the upper left corner and select Audio to add music to your WordPress site.
Click the + symbol at the top left corner, then select Audio in the new wp editor
  • Click the Upload button and drag and drop the file from your computer to the WordPress upload screen or click Choose File.
  • After uploading the audio file (MP3), click Write Captions and select the URL icon to add music to your WordPress post.
Once the audio (MP3) files are uploaded, click on Write Caption, then select the URL icon
  • Create the desired URL for the audio file.
  • After adding the desired audio files, click Publish.

WordPress Audio Upload Guide

If you want to add an audio file to a post or a page, you can do so from the post/page editor.

#1. As you type in the textual content for the post, at the point where you want to show the audio player, click on Add Media button.

#2. If you have the audio file already uploaded, choose it from the Media Library.

#3. If not, go to the Upload Files tab and try to upload the files and add music yo your WordPress.

#4. Audio files and other media files are usually big. The default PHP maximum upload file size is 2M. So, you may encounter this error that your selected file exceeds the maximum upload file size.

#5. In such a case, go to the php.ini file and look for this line:

upload_max_filesize = 2M

Change it to

upload_max_filesize = 64M

#6. Restart the apache server and then retry to upload the file. You should see the new size on the Upload Files screen.

#7. You will get a player in the post editor after uploading the file and then inserting the media.

#8. The published post will also have a similar player, which can be used to start/pause/stop the audio. You can adjust the volume of the audio clipping too. This is the default audio player that comes with WordPress.

The Audio Shortcode:

classic song file view mode
WordPress Audio Upload Guide

Instead of using Add Media button, you may also use the audio shortcode to insert audio. Click on the Text tab of the post editor, and you can see the audio shortcode for the clipping you just uploaded.

The default audio shortcode looks like this. Add the audio source file as an argument within the shortcode which would look like this.

The audio or music WordPress player can use audio files in various formats. The supported formats are mp3, Ogg, and Wav formats. You can include fallbacks for the other supported audio formats like this.

Do you want to play the audio clipping continuously in a loop? Do it with the loop argument. By default, the loop is set to “off“. Set it to “on“;

When a visitor reaches a page, do you want to start playing a clipping automatically? You can do it with the autoplay argument.

The default is false or 0. Set it to true or 1.

Some sites auto-play a clipping in loop mode in the background whenever a visitor visits the site. This can be achieved with the audio shortcode with loop and autoplay set, besides some extra CSS, i.e., by setting the “visibility: hidden” for the audio player.

However, be cautious while doing something like this. Consider the user experience too. A user who does not want to listen to some background music has no choice but to listen to the clipping continuously. This might put your visitor off.

Adding playlists

Sometimes, in a music site or an audio-focused site, there is a need to display a playlist instead of a single audio file.

Playlists can also be easily created in WordPress. Follow the instructions below.

#1. From the post/page editor, click on Add Media. Now, click on Create Audio Playlist.

#2. The Create Audio Playlist screen comes up. You can add the required (already uploaded audio files or upload them from the Upload Files tab)audio files and then click on the Create a new playlist button.

#3. The files are included, and the Edit Audio Playlist page appears, where you can choose the settings for the playlist. You can choose to show or hide the tracks list, the artist names, and the thumbnail images. These can also be done using the playlist shortcode (described in the next section in detail). Now, click on Insert audio playlist button.

#4. You can save the post and view it. You will see a playlist with the thumbnail image, details of the playlist, the audio player, and a numbered listing of the tracks with the artist names and the time duration.

Take a look at the Text tab of the post editor, and you will see the playlist shortcode with the ids of the tracks (or uploaded audio files) to be included.

The Playlist Shortcode:

The Playlist Shortcode
WordPress Audio Upload Guide

Instead of creating a playlist using the Add Media button, you can also use the playlist shortcode in the post editor.

The basic format is to add the IDs argument with a comma-separated listing of the IDs, as shown above.

How to Find the Ids of the WordPress Audio Files?

1. Go to the media library and filter out the Audio files.

2. Click on the audio file to edit it. In the Edit Media screen, you can see the id on top of the URL.

3. Now that you know how to use the basic playlist shortcode, let us look at the various options available.

4. You can change the style of the playlist using the style argument. Set it to dark or let it be the default light.

5. The playlist has a dark style now, which looks good on light backgrounds.

6. You can choose not to display the track list by setting it to false or 0 instead of the default true or 1.

7. You will see the playlist details and the audio player only.

8. You can change the order of the ids to change the order of the tracks in the playlist.

9. You can also set the track numbers argument to false or 0 instead of the default true or 1 to hide or show the track numbers, respectively.

10. Take a look at the playlist with the track numbers hidden.

What if you don’t want to display the thumbnail image on top? You can do so by setting the images argument to false or 0 instead of the default true or 1.

Here is the playlist without the thumbnail.

And finally, why not remove the artist names too?

Use the artist’s argument and set it to false or 0 instead of the default true or 1 to hide or show the artist’s names.

Here is the playlist with the artist names removed.

So, there you are. Two different ways of using and displaying audio files on your site – single or as a list. Use the shortcodes for the quick and easy addition of the audio files. Play around with the arguments or a combination of them to achieve the desired result that you have in mind.

How to Download and Play Audio Files (MP3) in WordPress

  • Right-click the three-dot icon to download an audio file and select Download, then Save As.
  • To play the file, right-click on the newly created link and select Open in New Tab. The audio file should start playing automatically.
Guide wordpress saving audio Visualmodo
Claudio Pires

Claudio Pires is the co-founder of Visualmodo, a renowned company in web development and design. With over 15 years of experience, Claudio has honed his skills in content creation, web development support, and senior web designer. A trilingual expert fluent in English, Portuguese, and Spanish, he brings a global perspective to his work. Beyond his professional endeavors, Claudio is an active YouTuber, sharing his insights and expertise with a broader audience. Based in Brazil, Claudio continues to push the boundaries of web design and digital content, making him a pivotal figure in the industry.