Can’t regenerate thumbnails because WP can’t find it in the database
-
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
- The topic ‘Can’t regenerate thumbnails because WP can’t find it in the database’ is closed to new replies.