最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Media files exist in upload folder but not showing up

programmeradmin4浏览0评论

In my wordpress, I tried to upload my images by media uploader but it says "couldn't create directory wp-content/uploads/2016/09". Then I create the folders correctly. And now when I tried to upload my files by media uploader, it says "couldn't move to directory wp-content/uploads/2016/09". Finally I uploaded my images in the folder and then checked the media library and the media library saying "no media founds".

Why is it happening?

In my wordpress, I tried to upload my images by media uploader but it says "couldn't create directory wp-content/uploads/2016/09". Then I create the folders correctly. And now when I tried to upload my files by media uploader, it says "couldn't move to directory wp-content/uploads/2016/09". Finally I uploaded my images in the folder and then checked the media library and the media library saying "no media founds".

Why is it happening?

Share Improve this question edited Sep 25, 2016 at 10:26 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Sep 25, 2016 at 9:48 Allen TitanAllen Titan 4051 gold badge6 silver badges13 bronze badges 2
  • 1 This could possibly be folder permission issue. Please check this to confirm. – Prasad Nevase Commented Sep 25, 2016 at 10:08
  • 1 In other words, to show up in the Media Library, files must be BOTH physically on the server AND also registered in the database. If either requirements art missing, they wont show up. If you cant upload images from the backend, it's most likely a permission issue. Try to set the 2016 folder to 777 and try again. If it works then ask your hosting for support on the issue, or use a plugin that help with SFPT/FTP connections to the server. – The J Commented Sep 26, 2016 at 3:47
Add a comment  | 

3 Answers 3

Reset to default 14

Just by uploading files into the wp-content/uploads won't show up in the Media Library , those media ID's needs to be there in the database to show up in the Media Library.

If you already have files in the uploads folder and want to add them into the database, you can use this plugin to add files from server.

But this is not the correct solution instead fix the permissions issue for that uploads folder.

You can use Media Sync for new updated plugin for the year 2020. The plugin description reads

You can scan all files that are in “uploads” directory and see which ones are actually in Media Library and which ones are just sitting there. Then you can select those that you want to import to database and therefore make them available in Media Library.

Media files exist in upload folder but not showing up
Simply Paste this code in wpconfig.php and save it all is done :) but exactly where to paste?

define( 'UPLOADS', 'wp-content/'.'uploads' );
发布评论

评论列表(0)

  1. 暂无评论