wpDiscuz - WordPress Comment Plugin
Media files automat...
 
Share:
Notifications
Clear all

Media files automatically removed from upload folder

7 Posts
2 Users
0 Likes
438 Views
Posts: 3
Topic starter
(@avaptech_solutions)
New Member
Joined: 10 months ago

Hi,
I have a website hosted on Kinsta. I had updated my SSL, and after the update, some of the images went missing from the website. I thought it might be some URL issue related to HTTP to HTTPS. But that was not the issue.

When I checked my media library, images were also missing from there. So, I consulted with my hosting provider, and they told me that there is a CRON job setup by WPDiscuz. It runs once every 48 hours. So, I checked the code, which is done to delete the unattached images.

Now, I think that WordPress does not show the exact results of attached or unattached images. Is it possible that my images got deleted from the media library due to this functionality? Can you please confirm if this could be the reason, or could there be any other plugin that caused the issue? If this functionality is the root cause, can you also let me know how to disable this functionality?

Topic Tags
6 Replies
Asti
Posts: 5779
 Asti
Support
(@asti)
Illustrious Member
Joined: 5 years ago

Please let us know the versions of the wpDiscuz and wpDiscuz Media Uploader plugins you're using?ย 

Reply
Posts: 3
Topic starter
(@avaptech_solutions)
New Member
Joined: 10 months ago

Hi, I am using the wpDiscuz version 7.3.17.

Reply
4 Replies
Asti
 Asti
Support
(@asti)
Joined: 5 years ago

Illustrious Member
Posts: 5779

@avaptech_solutions,

And don't you use the wpDiscuz Media Uploaderย addon?ย 

Reply
Asti
 Asti
Support
(@asti)
Joined: 5 years ago

Illustrious Member
Posts: 5779

@avaptech_solutions

In any case, you can use the following hook code if somehow you've faced the issue:ย 

add_filter('wpdiscuz_delete_unattached_files', '__return_false');

ย 

This article should be helpful for you: https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/

Reply
(@avaptech_solutions)
Joined: 10 months ago

New Member
Posts: 3

@asti No

Reply
Asti
 Asti
Support
(@asti)
Joined: 5 years ago

Illustrious Member
Posts: 5779

@avaptech_solutions,

Doesn't the code help you?ย 

Reply
Share: