Forums

How to move uploaded files folder (14 posts)

  1. taimar
    Member
    Posted 3 months ago #

    Hi!

    How to move the uploaded files folder (default: wp-content/uploads) and its contents without breaking file URLs in existing posts? Changing the "Store uploads in this folder" path doesn't alter existing URL's.

    Thank you.

  2. nasa tech
    Member
    Posted 3 months ago #

    download the up loads folder to your desktop & then up load the folder to where you want it to go on your server again - simple

  3. taimar
    Member
    Posted 3 months ago #

    "without breaking file URLs in existing posts"

    I know how to upload/move files physically. I don't know how to keep paths in existing posts working.

  4. nasa tech
    Member
    Posted 3 months ago #

    leave the original folder where it is then, and still move the new where you want, make sure you give the folder an altered name before you post from there, then you won't confuse with the original, when you go to search for up loads everything should work fine

  5. taimar
    Member
    Posted 3 months ago #

    If I've understood correctly you are recommending two folders: one for old files and one for new files. Isn't it possible to use only one folder (for both, new and old files), but in different location and with different name?

    It's okay when existing URL's change (the blog isn't public).

  6. nasa tech
    Member
    Posted 3 months ago #

    you stated you didn't want to stuff up your current live connection to that folder, so you can't just up and leave right - but you wanto create the same thing somewhere else, if so do what i said

  7. taimar
    Member
    Posted 3 months ago #

    I stated I don't want to break URLs (404) when I move the upload folder and its okay if existing URL's change.

    In other words, I want to delete existing folder and move its contents to a new folder.

  8. nasa tech
    Member
    Posted 3 months ago #

    then you'll have to ad the new URLs that are coming from that new folder location, or they won't be there

  9. taimar
    Member
    Posted 3 months ago #

    I have to manually edit each post (which containes uploaded image) and edit the source? Isn't there any (semi)automated procedure?

  10. taimar
    Member
    Posted 3 months ago #

    Does anybody know a (semi)automated procedure?

    Much appreciated.

  11. whooami
    Member
    Posted 3 months ago #

    do you have shell access on the server?

    if you do, move the files and symlink the uploads directory to the new directory.

    you could do that using a php script too, btw. (the symlink thing).

    there is a plugin, btw, that lets you do search and replace functions on your db. google for "search and replace wordpress plugin"

  12. taimar
    Member
    Posted 3 months ago #

    Thank you! "Search and Replace" plugin worked flawlessly. :)

  13. whooami
    Member
    Posted 3 months ago #

    youre welcome :)

  14. simonebiffi
    Member
    Posted 1 month ago #

    WOW, had the same problem and had to update over 1500 images moved through subdomains and new blog installation... Search and Replace just worked spiffily!

Reply

You must log in to post.

About this Topic