Note: Many images, the ones in the originally restored site backup, all show up correctly in the Media Library preview.
Only images missing from original backup have this problem.
If it’s the various additional sized iamges that are missing, about the best thing ot use is Regenerate Thumbnails. That will do exactly as it’s title says.
Solved.
The problem is with Pressable hosting (which I recommend against).
They move all assets off to some private CDN, so assets fail to show up in actual site wp-content/uploads/XXXX/XX directories.
This includes both served image (one file) + Media Library preview image (completely different file).
Fix sequence for this problem, which likely occurs with other broken hosting companies too.
1) Extract all page/post slugs from database.
2) Visit each slug using PhantomJS, which runs all .css + .js, triggering access of many hidden assets.
Note: If there are many assets requiring login access, PhantomJS invocations must be doctored up to simulate a login.
3) At this point the Apache log will show 404s for all missing assets.
4) Then craft wget/curl requests to pull all assets from CDN into correct …/wp-content/uploads/XXXX/XX directories.
Brutal.
Big Tip: For any site owner, when choosing hosting.
First activity you should do when migrating to new hosting is to make a backup + restore your backup to another URL (so for foo.com maybe dev.foo.com or some other host).
Then verified the restored site works.
If you can’t make a backup or restore fails to produce a fully working site, then best drop your new hosting immediately + move keep moving hosting till you can generate a working backup/restore.
Note: Regenerate Thumbnails only regenerates images.
This misses all other assets – PDF files, audios, videos, data files.
Hi David,
Bradly from Pressable support here!
In Pressable ticket #138680, your colleague provided us a link to one of those assets over the CDN, and subsequently we were able to locate that asset on the file server. We also located the same asset in the backup that we provided you.
Pressable provides backups to customers on a daily basis without issue. However, if there’s an issue that we can reproduce with any of the backups, we’ll be happy to look into it. In this case, please send us the file names in question via email: help[@]pressable.com.
Thank you! 🙂
Best,
Bradly M. Hale
Pressable Customer Success