<p>Depends on your definition of "easy". :)</p>

<p>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 <em>don't</em> want to keep around from the <code>craft_entries</code> table.  If you get the IDs for those, you can remove the equivalent rows from the <code>craft_elements</code>, and Craft's cascading deletes will take care of deleting the appropriate data in the other tables.</p>

<p>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.</p>

CC BY-SA 3.0
2014-09-28T22:20:12.827Z
2014-09-28T22:20:12.827Z
Brad Bell
<p>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?</p>

<p>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.</p>

<structure><sections><channels><setup>
Easy way to copy sections to a new install
# Easy way to copy sections to a new install

(Asked by: username_0 on 2014-09-12)

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.

**Tags:** structure, sections, channels, setup

---

## 1 answers

### Answer by username_1 on 2014-09-28. Score: 3 | Accepted answer

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.


---

