• For some reason WordPress decided to delete 2 of the images that were previously uploaded. I checked this in the Simple History plugin which logs each users activity. However this was not a user, it was WordPress itself. The website, theme, etc has not changed in years, however for some reason the images were randomly deleted by WordPress. I have never seen this and I don’t know what the culprit might be.

    Here is a screenshot of the Simply History plugin: https://ibb.co/k9RYYm4

Viewing 9 replies - 1 through 9 (of 9 total)
  • This could also be triggered by some plugin not covered by Simple History – which is also the most likely reason. Do you have plugins whose task is somehow related to media files?

    You say the project hasn’t changed for years. Have you at least applied updates? These are changes and any of them from any plugin could be the reason.

    Try to click the date of the logged event and a table will be shown that may contain some more information, that may give you some more clues about why/how the files was deleted.

    Thread Starter zerojjc

    (@zerojjc)

    So oddly enough it seems to have only happened on that day (Nov 28 at 8:13pm). It deleted over 20 image attachments.

    @threadi I don’t see any plugins that should be messing with image files or the media files, and yes of course we do run updates frequently, but have never seen this happen on any other site either.

    @eskapism Yea I have clicked and got more info, but I’m not sure what to make of the info. Here is a screenshot from one of them: https://ibb.co/W5VGZ9j Does any of that tell you what may have cause the deletion?

    @zerojjc I can not tell what caused the deletion, but I can see that the deletion probably took place during a cron job.

    Thread Starter zerojjc

    (@zerojjc)

    @eskapism Thank you for your response. Can you further explain what a cron job is? I am not familiar with that. Could that be anything server related?

    @zerojjc i cron job is (most likely) something that the webserver is doing in the background, an automated job that is does without the need for a user to initiate something. Some plugins “install” cron jobs to do things in the background, for example every hour or once a week. Read more here: https://developer.wordpress.org/plugins/cron/

    Thread Starter zerojjc

    (@zerojjc)

    Thank you @eskapism . Is there any way you, or any of you, could think of that we could do moving forward that may catch the culprit?

    What I mean is, if it is a plugin then right now I don’t see any way of figuring out which one, or knowing whether it might happen again. If it’s not a true error, then turning on debug wouldn’t catch it either. So I am in a weird position where I don’t know the cause, if it will happen again, or how to figure out what the cause is.

    Can’t help you much further I’m afraid. Perhaps you could search the source code of all your plugins for WordPress functions like wp_schedule_event(), because my guess is that the plugin is using that function to add the code that they run at intervals.

    Good luck!

    Thread Starter zerojjc

    (@zerojjc)

    @eskapism Thank you for your responses.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘WordPress Deleted Attachment Images’ is closed to new replies.