PDF files are not showing in the WordPress media library

Once I was creating a form where the user can upload a pdf document. I was able to: upload the file, see it in the uploads folder, and also get its link then access that link in the browser and get success server response.

The problem is I was not able to see my file in the WordPress media library. A few hours later, I remembered that it is not enough to upload the file but I should also insert it as an attachment. Remember: It should have a record in the database with one of the registered post types.

If you reached this page by searching about this problem, I hope I could save your time and provide the proper solution.

Latest Comments

Trevor Beckwiith

From the dashboard, i can see the pdf file is loaded in the media library however in the media library accessed from the edit block (trying to load a pdf) the pdf files are not seen. This is now the default state of both of my websites.

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *