Is there an way way to copy sections I have in an existing site to a new website I am doing with a fresh install? E.g. To Copy the News Channel Section and all the field types Also copy the structure section and all it's entry types etc?

I suppose I could copy the full database to the new install but then all the entries would need to be deleted, e.g. all the news articles etc.


Depends on your definition of "easy". :)

Probably the easiest way would be to do what you describe and import the full database. From there, you can write SQL to find all of the entries that you don't want to keep around from the craft_entries table. If you get the IDs for those, you can remove the equivalent rows from the craft_elements, and Craft's cascading deletes will take care of deleting the appropriate data in the other tables.

It is on our long-term list to provide a way to import and export content between Craft installations for situations like what you're describing.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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