I recently inherited an EE site that the previous developer kind of put together while learning how to program. It works, and honestly for never having done it before he did a pretty good job of getting it up and running, but while he was doing that, he made lots of fields, left some data in them, deleted them, and so on.

It doesn't bother me that much, but it got me wondering if there's a way to 'refresh' the database tables to get rid of entries that no longer have channels, field data that no longer has fields, etc...?

Or is there something going on automatically that is taking care of this for me?

2 Answers 2


I think the easiest way for deleting fields and data is to do so from within ExpressionEngine, since it will then go through the related tables and delete the fields and data within them.

The starting point would be to find what's in use, what fields are being used on templates or for reports. I'm not certain if there's an easy way to do that. Obviously you can print a listing of all fields and channels, some will be visually easy to identify as not in use, but others may not.

I recall using a custom query once that listed fields by channel with some basic data, like number of entries in the field. Something like that could help. Obviously fields with a low number of records, could then be further examined.

But I'd say, once you've got your list of items to clean. (1) BACK UP YOUR DATABASE, (2) Go to the Admin area and use the delete field option. (3) Delete everything you need to, then (4) Optimize and Repair your database.

  • OK. This is kind of what I suspected but it's good to have somebody else say it. Thanks for the response.
    – apsdsm
    Dec 20, 2012 at 10:12

One of my long-standing add-on wishes is for something to help find and delete cruft like this in EE. There's currently no good way in the UI to have EE show unused channels, fields, etc and it becomes easier to leave it alone than go through the gyrations required to clean house.

At one point I had managed to convince Joel Bradbury (@joelbradbury) to create such an add-on and he had a good start at it. I don't think he ever got around to publishing it - so maybe a helpful nudge in his direction would help.

  • 1
    That's the sort of plugin I'd love to see come to live :D
    – apsdsm
    Dec 21, 2012 at 14:49
  • Yes. I would pay for that ability.
    – Jeremy
    Dec 29, 2014 at 17:17

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.