WordPress.org

Forums

Inserting directly to wp_posts... (2 posts)

  1. famousb
    Member
    Posted 6 years ago #

    Greetings.
    I'm writing an external php script to process some .txt file data feeds for my blog, and wanted to confirm this before i did it...

    i can just parse the files and insert them straight into wp_posts (in the proper fields of course) and they will appear in the blog, correct?

    I don't see any other tables that i would have to touch, so i just wanted to be certain before i did it...

  2. automaton
    Member
    Posted 6 years ago #

    That is perfectly possible, but you should have a look at the database schema. Posts are linked to an author, categories & tags ('terms'), comments and metadata so you have to take that into account.
    You'd need to know any category ID's you want the post to appear in, for example, or the ID of the desired author.

    Would be a nice idea for a plugin, though: import a csv via wp-admin and link it to categories/tags/authors from there.

Topic Closed

This topic has been closed to new replies.

About this Topic