• I recently migrated my WordPress site to a new host (using BackupBuddy).

    Previously my image URLs were /files/year/month/file.ext
    My recent migration changed that to the horrible /wp-content/uploads//year/month/file.ext (note the disgusting //)

    Also, for the images in one post, the image URLs remained at /files/year/month/file.ext resulting in 404s.

    How do I fix my uploads URLs so that it’s back to the original format?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Have you looked at the section When Your Domain Name or URLs Change in the Moving WordPress Codex article?

    It mentions the WordPress Search and Replace Tool if you don’t want to make the changes to the database yourself.

    Also make sure that you have the correct setting for your desired media folder in Settings -> Media.

    Are you wanting the files as they were? /files/year/… etc is a custom structure

    You could most likely move the files in your directories to where they should be, and then adjust the upload path accordingly in settings->media

    Thread Starter turkeyphant

    (@turkeyphant)

    I didn’t change it to a custom structure so I’m not sure how that happened. It was on multisite if that makes any difference.

    So just manually moving the files on the server and settings the URL in “Store uploads in this folder” should fix the // error?

    What about the “Full URL path to files” option?

    Thread Starter turkeyphant

    (@turkeyphant)

    Also, do I need to move the other directories in wp-contents/uploads too? I have some directories for plug-ins like shareaholic, gravity forms?

    Thread Starter turkeyphant

    (@turkeyphant)

    Anyone got advice about this?

    I don’t know for sure, but I would do as Rev. Voodoo suggested and set the Settings -> Media folder to your desired location for media files, then create the folders on the server the way you want them and just move one image that location to test it. If you still get a 404 and the source shows that an incorrect path is still being used, go into the Media Library and change the path to that one file to the folder you created and click Update. See if that fixed the issue. If so, you can fix the remaining images either manually or by running a query in the database to update them all.

    I don’t know about the other directories in uploads. I would go one step at a time and fix the images first, then see if changing the Media Settings file path affected the plugins.

    Thread Starter turkeyphant

    (@turkeyphant)

    Moving the images worked, I’m just not sure about the other files there….

    It seems like the plugins would have loaded them into whatever folder you identified for Media uploads, and having changed that path, you would need to move them as well, but I’m just guessing. I think if it were me, I would move them into the correct location, rename the old folders temporarily, check the plugins to see if they still work, and check your server error logs for 404s they might be throwing.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Uploads folder error’ is closed to new replies.