I'm currently running EE version 2.9.0 in a multiple sites installation. I was wondering what is the best way to delete a site and all the content associated with it.

If I click in one of the sites on the top right corner I can see the option to "edit sites" and from there I can see the option to delete, but my question is:

Will this also delete all channels, entries and channel fields associated with this site from the DB?

After that would be safe to delete all uploaded files on my server?

What I'm trying to achieve here is to make sure that when I delete the site I won't have a lot of "garbage" left on my DB.


1 Answer 1


Look in this file:


You can find the delete_site function, and please do and review it yourself. It essentially drops any database rows where the site_id column matches the site_id of the site you are deleting. There is really too many removals to go through and list in an answer, but my take away would be that it does properly remove everything.

I would say you should be wary about third-party field types that work across sites, as they may have invalid data after you remove the site. For example, if you use Playa (which is like a relationship field), deleting a site won't remove Playa relationship data that another site might have towards entries on the site being deleted.

  • Thank you! I'll take a look a the plugins as well ;) Good call.
    – Kawebah
    Jan 30, 2019 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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