Tables and fields


I have to write a small script to add some content to a wordpress site. I want know what are all the tables and fields in the table get effected by adding a post.

Besides the posts table, several can be affected - postmeta, terms, term_relationships, term_taxonomy (if I’m not missing anything). Needless to say, if you wanna do that on db level, it’s a hell to reverse engineer and maintain those relationships just to add content.

If you’re creating a plugin, it’s better to stick to WP functions (perhaps wp_insert_post is what you’re looking for). If it’s an external script, use xmlrpc instead.