PDF upload link redirects to homepage

  • Unknown's avatar

    Hi everybody,

    I have a very frustrating problem that I cannot solve. When I add a pdf link to my page It won’t open the pdf but redirects to the home page. I uploaded my pdf in the usual way (Media library, add new, select files –> mydocument.pdf). The URL given to the pdf (http://my-ip/wp-content/uploads/mydocument.pdf) simply redirects to the home page. I run wordpress on ubuntu 16.04 with Nginx.

    The troubleshooting I did so far:
    – Disabled all plugins
    – Changed theme
    – Changed permalinks
    – Checked folder and file permission of my server
    – Using a pdf embedder plugin

    Any ideas on how to solve this?

  • Hi complexiflow. Would you mind sharing the link to your website so we could help you better?

    Please note that these forums are for WordPress.com websites hosted here at WordPress.com. For self-hosted WordPress.org websites I would suggest asking for help in the volunteer-based WordPress.org forumshttps://wordpress.org/support/.

    Difference between WordPress.com and WordPress.org

  • Unknown's avatar

    Oke, I also posted it there.

    At the moment I cannot share my website. However, do you have any idea on how to solve this?

    My URL’s to images work fine, only the pdf’s are giving trouble.

    Thanks in advance!

  • If you have a self-hosted WordPress.org website the answers you will receive is different than what it would be for a WordPress.com hosted website. I would suggest that if your website is a self-hosted WordPress.org website that the WordPress.org forum I linked to above would be a more suitable place to get the right support.

    With that said try resetting your permalinks to see if that helps,

    -Log into the WordPress Dashboard.
    -In the side panel, go to Settings > Permalinks.
    -Make note of the current setting. (If you are using a custom structure, copy or save the custom structure somewhere.)
    -Select the Default option.
    -Click Save Changes.
    -Now select the previous setting you had before Default was selected.
    -Click Save Changes.
    This will reset the permalinks and will most likely fix the issue.

  • The topic ‘PDF upload link redirects to homepage’ is closed to new replies.