Hello,
I’m trying to delete all the rows from my collection from Live. I’ve over 5000 rows. Is there a way to delete all rows at the same time?
I used the below code but it only works on the sandbox rows and does not delete data from the Live collection.
wixData.truncate("CollectionName")
.then( () => {
console.log("All items removed");
} )
.catch( (err) => {
let errorMsg = err;
} );
Any suggestions on this will be helpful. Thank you.
Hi,
There are a few ways you can delete all entries. The truncate() function should be able to remove all entries as long as you are logged in as the site owner on the live site and you have used the function in the backend with a suppressAuth options value of true. For more information on how on the truncate function, click here.
A couple of manual ways you can do this is to go to the content manager from the dashboard and click on the first item and scroll down to the last item, hold shift and click on the last item and hit the red delete button . For more information, click here.
The other manual way to to delete the collection and add another one but that is if all else does not work for you.
Best regards,
Edward | Corvid Team
I wasn’t able to delete the rows from the live site. However, it worked from the content manager.
Thank you!