• shadez

    (@shadez)


    Hi,
    My blog is 4 years old and quite naturally there are a handful of unwanted tables and fields in the database. The extra tables primarily come from BP which i had installed only for testing. Extra fields within tables come from plugins such as ‘subscribe to posts’, etc (just naming a few, not blaming!).

    So i wish to get rid of all extra tables and fields within my DB, keeping only the core along with page/post data within.
    Basically, i wish my database was clean/sanitised.
    Any ideas?

    is this the schema? – http://codex.ww.wp.xz.cn/File:WP3.8-ERD.png

    PS: my knowledge is quite limited w.r.t. mysql.

Viewing 2 replies - 1 through 2 (of 2 total)
  • First – backup the complete database.
    Export it, save it to your computer. In fact make and keep two complete copies. Better safe than sorry.
    This is really important to do.

    Once you have done this you can – using phpmyadmin – select a table and from the menu at the bottom DROP it. That will remove it completely.
    There is NO UNDO in phpmyadmin.

    The core tables are listed here:
    http://codex.ww.wp.xz.cn/Database_Description#Table_Overview

    As for fields – that’s going to be a lot tricker and to be honest I’d leave them. They will take up hardly any space at all.

    Please remember that if you see an error the only way to fix that will be to reimport that whole database that you have a backup of.

    All the above said – those extra tables don’t matter. They are no load to the site, the space they take up is small.

    Thread Starter shadez

    (@shadez)

    Thanks Podz for taking time to reply.

    I was looking at an automated script or single sql query. Got any leads? I will also try. Should be easy now that you make me think of.

    I understand about fields. But i have got some in my DB which throw up errors while importing to a fresh WP installation. So i thought its better to get rid of all of them at one go. Anyways…

    Cheers..

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘MySQL: export core data ONLY’ is closed to new replies.