The WordPress database

I’ve gone one round from a simple blog+wiki to trying MediaWiki, then XOOPS, now finally back to WordPress. After listing my requirements of chronological and categorized articles it seems WP has what I need and is easier to setup and customize as compared to the wiki and CMS.

During the process I tried the XOOPS news module and a variation of it know as the Article Management System (AMS). They could have sufficed for categorized articles, but I also need a blog-like interface, which I tried XPress – WordPress for XOOPS. It was simply a wrapper and could switch between the XOOPS and WordPress styles. Pretty impressive to me. Since I’ve migrated my older posts into the wrapped WP it should be easier for me to move posts over to the current WP.

Posts in WP are stored in the “wp_posts” table, or whatever your table prefix is. This includes your Pages, so be careful not to have duplicated IDs over at both sides. For a clean migration you’ll need to delete both the example post AND the example About page. Then, export the wp_posts data from the old blog and import it into the new blog.

Categories are stored in the “wp_categories” table, and linked to posts via the “wp_post2cat” table. This is due to the many-to-many relationship between categories and posts. The table has 3 columns, the first being a running number, the 2nd and third columns are the PKs of the category and posts table. Also, if the categories don’t match the new database, be sure to also update the category_count column in the wp_categories table. Mine was empty so the category didn’t show up on the blog and the category admin page showed 0 posts on the category.

Finally remember to set the correct time difference on the Options page before you begin migration, or you’ll end up with screwed up old posts like me…

Leave a Reply

Your email address will not be published. Required fields are marked *