Support » Fixing WordPress » Images disappeared from uploads folder

  • Hi There

    After upgrade some of my folders dissappeared from my uploads folder.

    I have now gone to each attachment page and manually uploaded them through FTP. Same filename, same location and case sensitive. They now appear on the attachment page but not in the media preview.

    Can anybody help.

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi,

    can you give more details on the operations you performed for the upgrade ?

    Take note since WP 3.4, you have to define your “uploads” directory in wp-config.php like so:

    define('UPLOADS', ''.'uploads');

    This code above will make sure all your media files are uploaded to the “uploads” folder in the root.

    Thread Starter eben.fabricius

    (@ebenfabricius)

    Thanks

    I did not do the upgrade. When i logged on to the FTP i could only see an upgrade and uploads folder. No themes or plugins.

    I then created themes and uploaded the theme folder. The i saw that 2010 and 2011 folders were gone out of the uploads folder.

    I then uploaded the images manually.

    I have my hands in my hair.

    Which version of WordPress do you use ?

    Does someone else have access to your ftp ?

    WordPress doesn’t delete the “themes” or “plugins” folders, even for an update. Those folders and default themes come by default during a fresh installation of WordPress. As the ‘uploads’ directory under the “wp-content” folder. The ‘upgrade’ folder appears when you’re updating the WordPress core.

    If you had a backup of your site, consider restoring it. (Files + database.) If not, you should avoid uploading your images by ftp. WordPress registers in the database the URI of your media files. So to clean things up, go to your WordPress Admin under the “Media” tab. Delete permanently all broken entries (files). Make sure your images files are not in your ‘uploads’ folder too. Upload all your images from the “Media” tab in the WordPress Admin. Keep the same image names, so if you have posts with those images, they will display correctly (because we have clean the database entries by deleting permanently those broken files).

    As for a development tip:

    • Consider using source control like Git or subversion locally for controlling your files
    • Backup your wordpress files and database before playing with Admin, or changing themes and plugins, …

    For Git or subversion, you can also check for GUI software if you’re not comfortable with a console or command-line tool.

    Thread Starter eben.fabricius

    (@ebenfabricius)

    Thanks for your response. If i upload the images through the media uploader then they will all be in a different folder than previously. Will i then have to go and place them again?

    Hmmm you’re right, WordPress will create a “2013” folder instead. So I’m afraid you will have to update your posts where those images appeared. How many posts do you have ?

    🙁 sorry

    Thread Starter eben.fabricius

    (@ebenfabricius)

    hundreds:)

    Thread Starter eben.fabricius

    (@ebenfabricius)

    Is there no way to refresh the appearance of images in the library after i have updated the files on the FTP?

    Well technically if your file names and paths are the same, wordpress should find them. But when you upload an image via WordPress, it generates a thumbnail, medium and large versions of your orignal images. Plus the one used for Post Thumbnails and those custom sizes defined in your theme.

    So WordPress will find the original one but not the others… except if you have those generated images on your local drive.

    Thread Starter eben.fabricius

    (@ebenfabricius)

    and there is no plugin to recreate the thumbs for my library?

    Not to my knowledge but you could take a look here:

    http://wordpress.org/plugins/

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Images disappeared from uploads folder’ is closed to new replies.