Deleting all items of a collection

Is there an easy way of deleting all items of a collection? I have to re-import the database and I have already uploaded 28000+ records to Tainacan. Deleting the items form the interface takes very long…

Best regards,

                    Pedro

You can select all items of all pages and start a bulk edition for deleting them in the foreground. This will firstly move them to trash, them from trash you should remove them permanently.

But are sure you want to delete them? If you want to re-import you can use the option to update the items. This will work as long as your CSV has the speical_item_id field, which is generated when you, export the collections as CSV.

Yes I want to delete them. The process you mention might take to days! I read somewhere that there was a project for a WP Cli command. Is that right?

Best regards,

                    Pedro

Hello!

Try this:
On the collections opening page, at the bottom, on the right side, click on "see all collections"
Choose the collection and then delete.

Uhmm if you want a command line for it, this should do then:

Just remember to pass the ID of your collection.

1 Like

¡Great!

I ma sorry I did not see it in my reading of the Wiki.

Best regards,

                    Pedro

Thank you Chicao.

I do not want to delete the collection, because I do not want to lose its taxonomies and configuration.

Best regards,

                    Pedro