Take the 2-minute tour ×
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It's 100% free, no registration required.

Starting on a second site which is an almost like for like copy of the first, except it has different content. I cant use locales to manage it because there may be the possibility of multiple languages on the second site.

I have dozens of field & entry types I want to transfer over to the second site. Is there an automated way of deleting all the content?

share|improve this question

3 Answers 3

up vote 6 down vote accepted

You could also delete all rows in your craft_elements table, which have type set to Entry (or whatever ElementType you want to delete).

share|improve this answer
2  
This is a great answer. Deleting an element from the craft_elements table will properly cascade and automatically delete any related rows in other tables. –  Lindsey D Jul 18 at 17:59

I figured it out somewhat by using the Import plugin, by Bob Olde Hampsink, exporting all my slugs to a csv, then using the delete functionality of the plugin to remove all entries with a slug found in the csv. Worked perfectly!

share|improve this answer

As far as I know, you can only do that by deleting and recreating a section.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.