WordPress.org

Ready to get started?Download WordPress

Forums

Uploads folder error (9 posts)

  1. turkeyphant
    Member
    Posted 2 years ago #

    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?

  2. linux4me2
    Member
    Posted 2 years ago #

    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.

  3. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    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

  4. turkeyphant
    Member
    Posted 2 years ago #

    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?

  5. turkeyphant
    Member
    Posted 2 years ago #

    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?

  6. turkeyphant
    Member
    Posted 2 years ago #

    Anyone got advice about this?

  7. linux4me2
    Member
    Posted 2 years ago #

    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.

  8. turkeyphant
    Member
    Posted 2 years ago #

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

  9. linux4me2
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic