2 Hassle-Free Ways to Edit WordPress Media File URL

Anytime you upload a media file to your library, WordPress will automatically create a URL address for it. This is similar to when you create a page or post on your site. The file link will follow the format domain-name.com/directory-path-of-the-picture/picture-file-name.jpg.

Files with random names will result in unfriendly URLs, such as screenshots, or image-1, video-2. That’s why you should change the file URL to make it more meaningful as well as SEO-friendly You can include target keywords in the URL for search engines index and rank your media files better.

Another reason for editing file links is to create custom download links for your files. You protect the original file URL and want to create custom private links for users to access.

In this article, we’ll walk you through detailed guides on how to edit WordPress media file URLs.

Let’s get started!

Edit WordPress Media File URL Manually

This simple method allows you to go to the file’s attachment page in the Media Library and edit the slug.

  1. Log into your WordPress admin dashboard and go to Media Library
  2. Hover your desired file and click Edit to open the file’s attachment page
  3. In the Screen Options, check on Slug. WordPress will then show you a slug option at the bottom of the page
  4. Edit the file link in the Slug option
  5. Hit the Update button to save your changes

The new file URL will be displayed in the File URL option on your right side.


One thing to notice is that you should redirect your file URLs after editing them. If the old links are not redirected and are still available on the web, visitors can click on them and go to 404 not found pages.

This affects not only users’ browsing experience but also your site SEO performance. Google will give a penalty to websites with too many broken media pages.

How to Create Custom Private Download Links with PDA Gold

PDA Gold plugin gives you a helping hand in protecting your WordPress media files of any type. You can secure unlimited images, videos, audio, or a PDF ebook with just a few clicks.

Once protected, your files’ original URLs become protected. Unauthorized users will be led to a 404 not found page when attempting to access your file, except the admins by default.

To grant access to other users, PDA Gold enables you to generate “Private Download Links”. Only those with these links are able to your protected files. Refer to this doc to have a clear idea of the differences between original, protected, and private download links.

You can decide the link’s expiration based on time and clicks. After a certain time or some clicks, users are no longer able to open or download your images/videos.

Plus, it’s possible for you to set roles for your private download links as well. In other words, just the right logged-in users can view your file. Others will still go to a broken page although they have the correct download links.

Out of the box, PDA Gold permits you to customize your private download links, which is our main goal today. When you generate new private download links automatically, the file’s slugs look strange and difficult to remember. For instance, preventdirectaccess.com/private/58575f26ae274.

Fortunately, you have full control over your private download links by customizing your own links. You can include the file name, file’s purposes, or other related information. A good example of this is preventdirectaccess.com/private/this-is-my-new-ebook. The instruction below will help you achieve that.

Change Private Download Links

First, install and activate both PDA and PDA Gold plugins. The Gold version won’t work properly without the free one. If you don’t know how to install a plugin, refer to our doc of Installation.

Then, head to your Media Library to find the files you need to protect and edit the private download link and click Configure file protectionProtect this file.


After that, you need to click on the Customize new link button and fill in your custom download URL slug, download limit, and download expiry.


Hit Submit and you’re done. You can send customers, clients, members, or subscribers this link to access your premium private files. Plus, each file can have unlimited private download links so you’re able to give each user a different link with your own expiration rules.

Ready to Edit WordPress Media File URLs?

When uploading a media file to WordPress, your file URL’s slug will be the same as the file name. This will affect your site SEO and user experience when your file links are meaningless.

Now you know 2 ways to edit your WordPress media file URLs. Editing the original file link is affordable right on the file attachment page. The other method permits you to protect your private files and create custom download links for them with the help of the PDA Gold plugin.

Let’s have PDA Gold’s assistance in editing your private download links today!