I have a wordpress site and I want to upload a PDF file so I can have an URL like this:
http://www.mydomain.com/attachment.pdf
But how can I achieve this? Because when I upload the file via Media in de wordpress administration panel it has an URL like this:
http://www.mydomain.com/wp-content/uploads/attachment.pdf
But I don’t need the “wp-content/uploads” stuff in my URL.
I also tried to upload the file with an Ftp upload on to the root but when I want to go to that URL it says “page not found”
any ideas?
You change the upload location by adding following line in your
wp-config.php
By adding this line the image url would be somewhat like this
If you try and remove the
blog/content/uploads
then also the year and date remainsFor that Go to Settings and media and uncheck the organsize media option..
Hope it works for you ..
Note: This Steps are not for beginners. Use it only if you know what you are doing.
Please check below url for change path of wordpress upload
To change File/Image Upload Path in WordPress
hope it helps
If you’re hosting your WordPress site on a machine you can SSH into:
To be available at http://www.example.com/attachment.pdf the file has to be in the same directory as the index.php file, wp-settings.php file, wp-admin folder, etc.
You can log into the remote machine with SSH and use Bash commands (especially
ls
andmv
) to view and move files.