What do you need to know?
Replacing Media: PDFs, MP3s, Images
Understanding media links
All of the files we upload to the website are called media. Images, MP3s, PDFs, videos, etc. Each media item has its own File URL
. Here is an example of a file URL:
https://www.serenecolombo.org/wp-content/uploads/2021/05/KIRIPINDU-MilkRice-Instructions.pdf
You can see that this looks just like a website URL. Except that it has a few folders /wp-content/uploads
and date folders with year and month, 2021/05/
, here it’s year 2021 and month 5/May. Then the very last part is the file name, KIRIPINDU-MilkRice-Instructions.pdf
.
No matter what the file name, uploading a new file creates a new file on the website. So if we upload a new copy of KIRIPINDU-MilkRice-Instructions.pdf
in June of 2021, a new copy would be uploaded with the url like this:
https://www.serenecolombo.org/wp-content/uploads/2021/06/KIRIPINDU-MilkRice-Instructions.pdf
However, if a file with the same file name was uploaded in May, then a new file would be created on the website with the following URL. Notice the -1
at the end of the file name:
https://www.serenecolombo.org/wp-content/uploads/2021/05/KIRIPINDU-MilkRice-Instructions-1.pdf
Why does this matter?
Sometimes we need to replace an image, an MP3, or a PDF. If we are 100% sure that the old file is only used in one place, we can delete that file, upload a new one, and insert that new one where we want to go. However, if the file is used in more than one place, the other places will be broken.
Therefore, it’s always a good idea when we need to replace media to do so using the media replace feature.
Media Replace
The ability to replace media in WordPress only comes in a plugin called Enable Media Replace
. The following instructions assume that the plugin is installed and activated.
Start by finding the file you want to replace in the media library.
Once we have it open, look for the button that says Upload a new file
at the bottom of the right side settings panel.