WordPress.org

Ready to get started?Download WordPress

Forums

clean out the database (8 posts)

  1. Jonathan Dingman
    Member
    Posted 5 years ago #

    is there a way to clean out my database of tables and/or content that is no longer used?

    I've used a number of plugins through various different themes and not all the plugins I currently use, require the misc data in my database.

    How can I optimize my database to clean out all the clutter?

  2. Len Kutchma
    Member
    Posted 5 years ago #

    You can clean out the wp_options table manually or, if you're not comfortable doing that you can try the Clean Options Plugin.

  3. NC@WP
    Member
    Posted 5 years ago #

    There's really no need to do that... MySQL really doesn't care about how much data it stores.

    You can attempt a manual clean-up, but you need to understand the data architecture of both WordPress and plugins really well. Say, you find a table in your WordPress database called wp_something. Is this table used by WordPress or by one of the plugins? If it is a plugin-created table, is it a plugin that's currently used or did it get left behind by a plugin that is no longer used?

    If you're still inclined to try, the best way is to export your blog into a WXR file, drop all tables in the WordPress database, rerun WordPress installation, and then import the WXR file. The obvious problem with this approach is that any data that your plugins used to store outside of WordPRess' default data structures will be lost.

  4. Jonathan Dingman
    Member
    Posted 5 years ago #

    Hmm what is the WXR file?

    I've never heard of the WXR file. can you link me to the docs for it?

  5. Rok
    Member
    Posted 5 years ago #

    WordPress eXtended RSS (WXR)

    This files is created, when you export your blog via. Manage > export in WordPress admin.

  6. Jonathan Dingman
    Member
    Posted 5 years ago #

    Ah great. Thanks Rok

  7. rahul286
    Member
    Posted 5 years ago #

    @NC@WP
    I agree with you that MySQL doesn't care about obsolote data stored.
    But there are many plugins which create tables and they remain in database even after get installed.
    I think it will be really good to have some reliable way to remove all this unnecessary info.
    Its not just for performance, but also for easier administration and management.
    At one time my wordpress database had almost 80 tables!
    I think wordpress should create use two database prefixes.
    Core table should get wp_<something>
    while plugin table should get wp_plug_<something>

  8. Jonathan Dingman
    Member
    Posted 5 years ago #

    Rahul,

    That's exactly what I'm talking about.

    I will often test a plugin and then it wont do what I want, but there are misc tables left in my database that I dont need, so I want to clean them out for usability and ease of use for me personally -- not necessarily for performance.

    I've been trying to talk to some devs about implementing an "uninstall standard" for plugins, hopefully it will get moved forward so there's a standard for it.

Topic Closed

This topic has been closed to new replies.

About this Topic