• Hi guys! Is it possible to use a different folder for the source location for the Media Library?

    I’ve been using my own folder for images (for various reasons) for quite some time. And it’s just not practical to change all of the images references right now.

    Is it possible to change the location of the Media Library, or is it a hassle?

Viewing 13 replies - 1 through 13 (of 13 total)
  • You can change it at any time – the existing posts will continue to reference the old locations – new uploads will use the new location.

    Thread Starter WayneSmallman

    (@waynesmallman)

    That’s good to know, but I need to know how.

    Just go to settings ->Miscellanous and enter something for

    “Store uploads in this folder” – for example “images”
    “Full URL path to files (optional)” – for example “/images”

    Thread Starter WayneSmallman

    (@waynesmallman)

    Yeah, I tried that before and it doesn’t work.

    How do you know it doesnt work?
    – the full path must be correct for your own server and I assume you clicked on update once you make that change in settings.

    you also have to make sure the new folder say “images” exists, if it doesnt you have to create it yourself.

    Thread Starter WayneSmallman

    (@waynesmallman)

    I’ve been using a folder called: “images” for my images for years. I also added the full path to the folder, too.

    I’ve checked with the Media Library tab and there’s nothing listed.

    Just so you know, I’m not a noob! I’m a PHP developer of over 6 years…

    But if you are using “images” already then thats not changing the location.

    The defualt is wp-content/uploads so I assume you changed it to images some time ago?

    Did you at some point to do an Export and Import of WP?

    I did a few days ago because I wanted to get rid of gremlins in the system. When I did that the import – it failed to bring across image links (post image meta data) – in essense it lost all history of image attachments. Nothing showed up in the Media Library and I had to manually frig everything.

    Thread Starter WayneSmallman

    (@waynesmallman)

    “But if you are using ‘images’ already then that’s not changing the location.”

    From the point of view of WordPress, it’s a change of location; “images” is distinctly different to “uploads”.

    “The default is wp-content/uploads so I assume you changed it to images some time ago?”

    I tried it, it failed so I left it. Successive updates have reverted it back to the default.

    “Did you at some point to do an Export and Import of WordPress?”

    My blog was imported from Blogger, which is why I have my own images folder.

    I could export my database and do an search & replace against the image locations, then import the updates back into the database, but then I’d lose all of the SEO goodness I’ve accrued relating to all of the images.

    So what did you do to get the Media Library to recognize the images?

    My problem started with my install not working some plugins and I wanted to clean things out completely.

    So I imported wp to a file using the export I had got through the wp menu.

    That file lost the post image meta data.

    You could if you have some knowledge look at the postmeta table to get the missing attachment records into the new database (I kept a backup of the db amd still have it).

    Problem is more deep rooted – as well missing the meta data, wp 2.5.1 onwards started to use different naming conventions for thumbnails.

    In the end I decided to re-upload individually all the images per post and re-embed (to be perfect). In this way I have in affect started with a clean database and kept it clean, the old files which are in another location can then be removed – my images are divided by year/month so at the moment everything goes to 2008/07 even though orignals were in other folders.

    Alternative was to take missing postmeta data from the old db to the new db – but then its not clean going forward given the naming convention changes.

    Its not nice but I needed to re-do everything so I could get a plugin I wrote to work properly to (just a simple random image gallery plugin).

    Thread Starter WayneSmallman

    (@waynesmallman)

    I have over 500 images and 580 articles — so I don’t think I’ll be doing that! 😀

    I’m surprised this has been overlooked by the WordPress developers.

    There’s no way for me to go back to anything because I had no idea what WordPress would have been doing at the time. So any data from the import is gone permanently.

    I’ll see if I can figure something else out.

    Thanks for your time!

    I’m having this same problem.

    I have nearly 100 articles and 300+ images. I’ve always used an ‘images’ folder as well.

    I need a way to change the path. I’m very surprised this was overlooked.

    Thanks.

    Hi folks,

    As this thread occurred approximately 6 months ago, likely you have all moved on or discovered solutions. However, in case you are still wondering how to do this, you were so close!

    It seems to me that you were changing the path, but not actually creating the database entries for the images. WordPress creates an entry in the posts table for images uploaded through WordPress.

    There is a plugin, however, that adds a “Add From Server” tab, so once you’ve changed your image upload directory from ‘wp-content/uploads’ to ‘images’, you can just add the images through this plugin.

    The plugin can be found here: http://wordpress.org/extend/plugins/add-from-server/

    Hope that helps either you guys, or the next person who comes along with the problem.

    Cheers,
    Japh

    wpfreak321

    (@wpfreak321)

    Hello,
    I have similar question : how can i change path of Media library for my mounted partition ?
    I dont have troubles in all mediastreamers like subsonic,jinzora,zina and more. I get only path for media in my config.php – some like /mnt/media/music.

    Cheers wpfreak

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Change location of Media Library’ is closed to new replies.