Sauter la navigation

[Assigné] How to safely bulk delete attachments from a Toolset custom field

This support ticket is created Il y a 1 jour et 21 heures. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Ce sujet contient 2 réponses, a 1 voix.

Dernière mise à jour par simonM-5 Il y a 2 heures et 28 minutes.

Assisté par: Minesh.

Auteur
Publications
#2812798

Hi Support

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?

Kind regards
Simon

#2812826

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

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.***

Maybe you want to try plugins that may help you:
- https://wordpress.org/plugins/advanced-database-cleaner/

#2813067

Hi Minesh

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.

Thanks and regards
Simon