The MU forums have moved to WordPress.org

Deleting plugins from Db? (3 posts)

  1. Bloggproffs
    Member
    Posted 15 years ago #

    I have had several plugins installed over the last 3 months, last time i checked my database it was 1663 tables for aprox 200 users, this cant be for real, so i start checking tables in db and realise alot of the have old data from old plugins like CountersizeII. Every user had 4-5tables of countersizeII data, is there anything ellse i can remove? at this rate its going to be unbearable after just a couple of hundreds more.

    Please advice!

  2. lunabyte
    Member
    Posted 15 years ago #

    Theres a file in wp-admin, admin-db.php, that has a list of tables to be deleted when a blog is deleted. It's towards the end of the file if I remember right.

    Just add what ya need to that. I can't remember if there is a hook for it or not, but that's where the table list is.

    You can just add to that array (watch your commas at the end of a line), or hook into it if possible.

    If there isn't a hook in there, there should be.

    That's only half the battle though.

    The other would be to remove the leftovers in the DB already.

    By default, MU creates 10 tables per blog from the start, then any plugins that add tables would naturally increase that count.

    SK2 for example.

  3. andrea_r
    Moderator
    Posted 15 years ago #

    Yep.
    Also, many plugin are written that don't delete themselves from the db so if you're testing out a few things over time, it adds up - espeically in the options table.

    Add 'clean up db" to your list of weekly site admin stuff. :)

    My site has ... oh, 300 blogs or so. DB tables are around 3,000 easy.

About this Topic

  • Started 15 years ago by Bloggproffs
  • Latest reply from andrea_r