Featured Image of the post are gone after site move to another server

I had the same problem after I moved one of my sites. The best solution I could come up with was to delete all of the database entries for my media (open the wp-posts table, search for all entries with a post_type of attachment and delete them. Then install the plugin Add from Server and I went through each folder, selecting only the parent image (NOT the additional sizes of it that were in the folders) and imported them.

It doesn’t duplicate the files that are already on the server, just adds it to the media library. The posts that already had the images used still worked, though they are no longer “attached” to the parent post.

I’m sure there is a better solution, some way to “Rebuild the Media Library” would be awesome. When I had just imported the database from the other site all of the links to the posts were intact and everything looked great, except the images didn’t show in the Media Library itself. If someone figures out a better solution I’d love to hear it, but for me, Add From Server” for the images resolved my need.