How to clean up WP database after removing themes and plugins

4 replies
The past year I have installed various themes and plugins on my autoblogs. I am currently optimizing them and noticed there are some remnants in my database from all the plugins and themes I no longer use.

Is there an easy and safe way to clean up my database?
#clean #database #plugins #removing #themes
  • Profile picture of the author Vusal
    Use PHPMyAdmin,
    You can use one of those database management plugins too.
    Signature

    +

    {{ DiscussionBoard.errors[2710961].message }}
  • Profile picture of the author aandersen
    step 1) back up your database

    go in to phpmyadmin, open the WP database, and look at the tables that are present. this will tell you what tables are supposed to be there (for standard WP) :

    Database Description « WordPress Codex

    anything left over was created from themes/plugins. Google the name of each remaining table to see if it was created by a plugin/theme that you currently use or if it was created from something you used in the past. some will be more obvious than others. if you determine a table unneeded, drop it.

    i guess you could do the process in reverse and research each plugin/theme that you currently use to determine what tables they use. then drop everything else. either way the same results are achieved.

    yet another way to do the research would be to create a second WP install. then install your needed plugins and themes. when you are finished you can go into phpmyadmin (for the new install) and make note of all the tables present. alternatively, you could install them 1x1 and make notes after each, then you would know what tables belong to what. When you are done with your research just uninstall the 2nd instance of WP


    in the end its the same, figure out what tables you need and drop the rest.
    Signature

    signature goes here

    {{ DiscussionBoard.errors[2711468].message }}
    • Profile picture of the author belgianguy
      Thanks aandersen! I will try that!
      {{ DiscussionBoard.errors[2714057].message }}
  • Profile picture of the author keepkalm
    There are a couple of plugins to help out with this also:
    https://wordpress.org/plugins/wpdbspringclean/
    https://wordpress.org/plugins/plugin...age-collector/

    WPDB Cleaner is a little out of date, but it seems to work a little better (as of this posting).
    {{ DiscussionBoard.errors[9245034].message }}

Trending Topics