Update existing media files

  • Unknown's avatar

    Hi, we have a number of files on our site, some of which are updated with new info every 6 months. It looks like I have to delete the existing file, upload the new file, and then find all the links that pointed at the old file, and manually update them with the new file link – is that really the way? Surely there must be a an update option, or a simpler process?

    I’ve found various answers to this questions here, and they all say that, but they are all old – hopefully WP has updated an outdated process like that by now! 🤞 Cheers!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    There is certainly somewhere in ter wordpress.org plugin repository a plugin that does the job.

    To be able to install third party plugins on a wordpress.com site, you must upgrade to the Business Plan.

  • Hi there! WordPress does name media files sequentially, so it’s not possible to overwrite files directly within the Media Library by uploading a new one with the same name. WP automatically appends a sequential number at the end of the filename to distinguish between it and other files with the same name.

    That said, I can think of a few workarounds, since your site is fortunately on the Business plan:

    Method 1 / SFTP: You could bypass the Media Library’s sequential-numbering system entirely and instead upload your files via SFTP. If you go this route, you could even put the files at the root of your site, allowing you to have nice URLs like https://sendiass4bcp.org/my-file.pdf – for example.

    Method 2 / Redirection plugin: If you prefer to stick with using the Media Library for uploading your files, you could create virtual URLs like https://sendiass4bcp.org/my-file and point them to your files. These would not be “real” pages that you need to create anywhere. You would use a redirection plugin like this one to point these links to the real location of your files in the Media Library.

    For example, let’s say that the “real” file lives at https://sendiass4bcp.org/wp-content/uploads/2023/10/my-file5.pdf – because it’s the fifth version of the file you’ve uploaded in your Media Library, so it has a 5 at the end. You would go into the Redirection plugin’s settings and update https://sendiass4bcp.org/my-file to point to your new Media Library URL. You’d need to do this each time you upload a new version of a file. (It should take less than a minute each time, once you get the hang of it!)

    One thing to keep in mind is that while the Redirection plugin I mentioned above is a third-party plugin for which we don’t directly provide support, it has some very good documentation to help with setup.

    Let me know if you have further questions!

  • The topic ‘Update existing media files’ is closed to new replies.