How to edit the link of pdf document in media Library?

  • Unknown's avatar

    Hi, I have created a website and upload a pdf document on it. The link of the page is https://xyz.com/wp-content/uploads/2023/01/xyz.pdf

    As you can see that the link contains some extra information. I want to make the link most relevant like https://xyz.com/xyz.pdf . No extra words ‘wp-content/uploads/2023/01’.

    How can I do this?

    I don’t have a site with WordPress.com yet

  • Unknown's avatar

    Hi, I have created a website and upload a pdf document on it. The link of the page is [reddacted; link to media library file]

    As you can see that the link contains some extra information. I want to make the link most relevant like
    [link to file in web root]

    Is it possible to create this link?

  • Hi, sure thing: try just typing the text you want the link to say, then highlighting that text, and pasting the link over the top. That should work in your copy of WordPress as well as on any site we host.

    Going forward, these forums are primarily for sites that use our free-tier hosting. We’re a little different from the WordPress software itself. This article explains some of the differences.

    You’ll want to create an account at WordPress.org so you’ll have access to the correct community for your site. Or, you’d be welcome to host here; your plan would get direct support.

    I hope this helps!

  • Hi again! I just spotted your second request. You could get that link by uploading the file directly through your hosting. Your host can help with that. And my earlier response would still apply for any “click here to open” type inks. Hoping it helps. I’ll redact your links for you here, too.

  • Unknown's avatar

    @amnakhanofficial,

    No extra words ‘wp-content/uploads/2023/01’.

    Hi. In addition to what @supernovia has said, I believe you can eliminate that part of the file URL with various plugins, which you can ask about in the WordPress.org forums. That part of the file URL is evidently created automatically when you upload the original file to your media library. On WordPress.com the file URL created for the media library also has extra words (“file” and the top level domain) and the date added automatically.

  • Unknown's avatar

    Here’s an example of a PDF file in a WordPress.com media library:

    https://subdomain-name.files.wordpress.com/2023/01/file-name.pdf
  • The topic ‘How to edit the link of pdf document in media Library?’ is closed to new replies.