admin管理员组文章数量:1122832
I think my database must be out of sync, or something. I checked the wp-content/uploads folder in my Bluehost File Manager and I have many more folders and files than I see in the Media Libary.
I also uploaded a file using Filezilla and copied it over to the wp-content/2023/01 folder and selected Media->Add Server to import the file, using the Add From Server plugin, but the file that I see in the Media Library is an old jpg file that's in the wp-content/2019/07 folder!
I'm a little confused at the moment, but do I have a database sync issue here?
I think my database must be out of sync, or something. I checked the wp-content/uploads folder in my Bluehost File Manager and I have many more folders and files than I see in the Media Libary.
I also uploaded a file using Filezilla and copied it over to the wp-content/2023/01 folder and selected Media->Add Server to import the file, using the Add From Server plugin, but the file that I see in the Media Library is an old jpg file that's in the wp-content/2019/07 folder!
I'm a little confused at the moment, but do I have a database sync issue here?
Share Improve this question asked Jan 24, 2023 at 0:52 BobbyBobby 11 bronze badge 2- Will you please check the path is set correctly in wp-admin dashboard under Settings -> Media. and secondly also check wp-config.php in your root of wordpress site that define( 'UPLOADS', 'wp-content/uploads' ); is there or some else path is set. Thanks, Vijay – Vijay Rathod Commented Jan 24, 2023 at 4:35
- I set all the image sizes to 0, if that's what you meant. I do not see any path settings other than to Organize my upload files, which I have checked. I can see that my files are organized, I downloaded and opened the wp-config.php file and I do not see a define statement for 'UPLOADS' The files are uploading correctly to the right folder. That's not the problem. I can see the correct file in the File Manager. – Bobby Commented Jan 24, 2023 at 13:25
1 Answer
Reset to default -1I sort of solved the problem by using the plugin Media Sync to add all the image files in the wp-content/uploads folder. I was able to see all the image files in the Media Library. I then deleted the files I was not using on my website.
I don't know what happened, but it is because I was first learning WP and tried different themes and plugins. But all of these images were left there.
I copied the FTP uploaded image to the wp-content/uploads/2023/01
folder and imported the file using the Media->Add Server
, but the import moved the file again to wp-content/uploads/2019/07
! The only thing I can think of is that the database thinks this is where this file should be located and put it there. I'm not sure I can trust using the Add From Server and Media Sync plugins and the Filezilla FTP uploads.
I went back and just uploaded the image using the default method in Media->Add New and I could see that the image was located in the correct wp-content/uploads/2023/01
folder. I left it at that.
I still had a problem in that the image was scaled down and the filename changed by appending a "-scaled" suffix. I found this link about WP automatically scaling down images and how to disable it here
https://make.wordpress.org/core/2019/10/09/introducing-handling-of-big-images-in-wordpress-5-3/
I had to install another plugin called WP Code and added the following Filter
add_filter( 'big_image_size_threshold', '__return_false' );
Once I did this, my images were not scaled down anymore.
本文标签: databaseMany images in wpcontentuploads folder that are not in Media Library
版权声明:本文标题:database - Many images in wp-contentuploads folder that are not in Media Library 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736308390a1933645.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论