I would like as a WordPress Admin to bulk delete a lot of PDF documents uploaded by users on the front end via Toolset forms into Toolset custom fields.
I want to make sure the documents are deleted cleanly and leave no remnants behind (for example, dead links or URLs, postmeta or other orphaned data in database tables).
I have read elsewhere that deleting them in the Media Library would not be sufficient to achieve 100% clean deletion.
What is your recommended approach?
Hello. Thank you for contacting the Toolset support.
As per WordPress standard, Toolset store custom field value to postmeta table.
So, in cause of PDF, you will require to delete the unwanted PDFs from media library as well as from the postmeta table. So, if you have a custom field "book-image" the post meta key stored to database table postmeta as "wpcf-book-image".
Please make sure you delete the unwanted entries only otherwise it will cause chaos for items you want as well.
*** Please make a FULL BACKUP of your database and website.***
Thanks for your insights. As you know, our site is a WPML site too. What entries are made into which tables when the documents/media are "translated"? I guess they would have to be cleaned up too.