WordPress Database structure (4 posts)

  1. o-juice
    Posted 10 years ago #

    I did some searches, but perhaps I'm not searching with the right keywords since I'm not finding what I'm looking for.

    What I'm trying to find (if such a page exists somewhere) is a list of the WordPress database structure and an explanation as to their relation with other data in the database.

    Granted, most of the tables/column names are self-explanatory, post_title = the title of the post and so forth, but in the table wp_post2cat I'm not sure what the rel_id column is for.

    I need this since I'm trying to write a database converter script for a site I'm redesigning that uses a hand-rolled blog which I'd like to convert to WordPress. Knowing which tables relate to what data will make it easy to figure out which columns match which WordPress ones. Unfortunately the hand-rolled blog has many custom columns and it's not based on any other CMS out there so it's a bit of a nightmare mapping everything out -- I have to basically go through the code of the site to see what gets put where at the moment.

    If anyone can point me in the right direction, I'd be much obliged. :-)

  2. Michael Adams (mdawaffe)
    Posted 10 years ago #

    I don't know of any good guides, either. But to answer your one question, wp_post2cat.rel_id is just the primary index for that table. It never gets used by anything: http://mosquito.wordpress.org/view.php?id=787

    You should bump your post if no one else comes along to save the day.

  3. o-juice
    Posted 10 years ago #

    Thanks for the quick reply, the link and the advice, mdawaffe. :-)

  4. pericat
    Posted 10 years ago #

    o-juice, have you considered writing a converter to dump your handrolled blog's data using MT's export file format? WP imports that just fine, and it might be a simpler task than attempting to convert directly.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.