I used the wordpress import tool to import a file and downloaded the attachments included. After a successful importation, I discovered that my media library only contains 3 file. After hours of research with no solution, I checked the database and discovered that there were only 3 rows with the type 'attachment' which were the files showing in the media library. However, all the files in wp-content/uploads
are completely intact.
Is there any way I can restore attachment probably by scanning every file in the wp-content/uploads
directory and adding the necessary file back to database?