2

When ever you click on an image in my site it displays www.sitename.com/wp-content/uploads/date/image.jpg. How do I change this to something like www.sitename.com/image.jpg or www.sitename.com/post/image.jpg?

2 Answers 2

1

Wordpress, by defalt, WILL allow you to do this. Open your wp-config.php file and add the following line:

define( 'UPLOADS', '/media/' );

Change /media/ to whatever directory you want to use.

A word of caution: If you already have media uploaded, the path to that media is stored in the database. Changing the path will not update the stored paths, and you may break links to your existing media. You will need to write a query to update all the paths in the database. There may be a plugin to help you do this.

You can do this with other WP directories as well. See documentation here: http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content_folder

0

Wordpress by default will not allow you to do that. If you wish to change the url of uploads folder, you will have to use an additional plugin. This plugin will give you the following option so that you can modify your upload path:

enter image description here

Here's another plugin (haven't tested this one personally) that will let you do the same thing.

2
  • Wish there was something like that for free.
    – Richard.S
    Apr 9, 2014 at 4:24
  • Checkout the second link in my answer, that might do the job for you. It's free
    – Anon
    Apr 9, 2014 at 4:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.