This page demonstrates how to embed an MP3 file hosted on DropBox into a page or post on a WordPress website.
The Starting Point
To do this, you have to begin with four things:
- You need to already have a WordPress website
- An MP3 file you want to embed in a page or post (or product) on that site
- A Dropbox account
- (Optional) The Dropbox app installed on your computer.
Why Would You Want to Do This?
The biggest reason is to keep the from having to upload the audio file to your own web hosting server. If you already have a lot of pictures on your site, you might be concerned that by uploading a batch of audio files, you might approach or exceed the bandwidth limits for your host.
Also, the DropBox servers are probably faster than your host’s servers, especially if you have one of the bargain accounts, so those files will be served faster.
When Not To Use This Technique
You might not want to use this technique if your site has thousands of followers and will probably get tens of thousands of readers.
As of this writing, DropBox free accounts allow up to 20GB of bandwidth (data flow) per day, or 100,000 downloads.
If your site gets tons of traffic, you might consider upgrading to a paid DropBox account.
Step 1 – Upload the MP3 to DB
The first thing to do is upload the MP3 file to your DropBox account.
If you have the DrobBox app, this is easily done by dragging it from its current location and dropping it into a folder in your DropBox synch folder.
Alternatively, you can upload it using the DropBox web interface.
Step 2 – Get the DB Link
After the file is uploaded, get the share link for the file.
If you have the DropBox app on your computer, be sure it’s running, then right click on the file name in your DropBox folder, and select “Copy DropBox Link.”
If you are using the web interface, find the file and click on the “Share” link.
Step 3 – Edit the Link
Once you have copied the link, paste it into a text editor.
In the text editor, change the argument at the end of the link from “?dl=0” to “?raw=1”.
Step 4 – Paste the Link into your WordPress Post.
Mark the place in your post with something easy to find, such as a series of “at” signs:
Go to the TEXT tab in the page/post editor, and find the place you marked.
Replace the placeholders (“at” signs) with the[ audio ]
intrinsic shortcode, using the copied link as the mp3 parameter. When you are finished, the line should look like this:[ audio mp3=”(your copied link here)” ][ /audio ]
Notice there is no content between the opening and closing audio tags.
Here’s a demonstration of how it works:https://www.dropbox.com/s/xr0llwz7x8hd24l/Jubilee.mp3?raw=1
Leave us a comment to tell us how this works for you.