• While transitioning a site from Concrete 5 to WordPress, I migrated (with assistance from cms2cms) posts, images, users.

    In the first migration, it went okay except some images were appended with wp-content/uploads/ and that resulted in entries in phpmyadmin table postmeta that were basically incorrect. While the images were actually in the correct directory of wp-content/uploads/2018/01, the database kept looking for them in wp-content/uploads/wp-content/uploads/2018/01.

    Looking at the postmeta table, I could see the errors in the column of meta_key and the values _wp_attachment_metadata and _wp_attached_file. Images that could be found correctly by the database did not have wp-content/uploads/ appended to the names. The “missing” images all had wp-content/uploads/ appended.

    To fix the issue, I ran some queries to remove the appended mistakes. Right now the items in the table look great, exactly how I wanted them to.

    The problem is that when I try to regenerate the thumbnail in WP. WP continues to report an error that it can’t find the full size image. This happens with a few different plugins, so I don’t think its a plugin problem, but instead a database or cache problem. Is there another column or table that needs to be updated?

    Here’s an example of the error from Regenerate Thumbnail:
    Skipped Attachment ID 1168 (Cedar_KSSN_2.jpg): The fullsize image file cannot be found in your uploads directory at wp-content/uploads/2018/01/Cedar_KSSN_2.jpg. Without it, new thumbnail images can’t be generated.

    Here’s an example of the error from WP:
    ERROR: Unable to load the metadata for this attachment.

    Here’s the image in the database:
    https://www.schoolnewsnetwork.dream.press/wp-content/uploads/2018/01/Cedar_KSSN_2.jpg

Viewing 2 replies - 1 through 2 (of 2 total)
  • Same problem here.
    Uploaded images via ftp, and run some script to attach them to posts as Featured Images: wp_insert_attachment().
    Editing the posts will show my Featured Images, but not on the frontend, not in the list of posts.
    On frontend, the img tag gets width=”1″ and height=”1″ attributes, which are hiding the right images.
    Using Twentyseventeen theme.
    Regenerating thumbnails don’t work.

    Thread Starter davidmdejonge

    (@davidmdejonge)

    While my issue isn’t totally fixed, I got pointed to a couple of plugins that helped diagnose part of the problem. For me, some of the images did not have correct serialized string values. The plugin called Meta Pixie helped ID the issues, while the plugin Better Search and Replace helped fix this part of the issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can’t regenerate thumbnails because WP can’t find it in the database’ is closed to new replies.