• If I delete a form entry, the files uploaded thru the form submission are not deleted. This makes a lot of garbage on the server that is no more needed. I might want to keep some entries and their uploaded files also in the records. So how can I make the uploaded files also deleted with the respective entry?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Ethan Choi


    Hi @osamaaf,

    Currently we don’t have the option to delete uploaded files together when deleting the associated entries. To delete the uploaded files in the meantime, you could make use of FTP to access the uploads folder in your site directory.

    I’ve made a note of the feature request and we’ll keep it on our radar as we plan out our roadmap for the future.

    Thank you for the suggestion!

    If you have further questions about paid features of WPForms, please contact us by submitting a support ticket. This is because WordPress.org rules do not allow us to provide extensive support for paid features of WPForms on the support forum for WPForms Lite.


    I needed to delete all uploaded images after 30 days, because we’ve deleted any entries long before then, and need to reclaim space from the leftover uploaded files. I created a cron job which deletes all files in the WPForms uploads directory which have certain file extensions, and are older than 30 days. I highly recommend testing this command from a shell first, to make sure it matches your intended files and does not match others. You can remove the -delete commend just to list which files it matches. Note this command will delete all files older than 30 days, even if you have not deleted the form entry yet.

    find ~/public_html/wp-content/uploads/wpforms -mtime +30 -type f \( -name \*.jpeg -o -name \*.jpg -o -name \*.png -o -name \*.gif \) -delete

    • This reply was modified 1 year, 11 months ago by pacmanfan.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Delete Uploaded Files?’ is closed to new replies.