[wp-pro] creating a new post

ML utugau at gmail.com
Fri Mar 14 17:32:36 GMT 2008


Hi out there!

I would like to post a question to all you guys, the best WP gurus on earth!
:-)

I need to create a php script to populate a wordpress database with posts.
That script is to be run by terminal (not thru the web) and will read the
posts from a text file and insert them on the WP database. This script is to
be run without wordpress.

Right now, in the script I've developed, I have an array containing all the
data I need to fill on the database. This data is:

POST TITLE,
POST CONTENT
POST DATE,
POST CATEGORY,
POST SLUG

What I need:

1) insert the post to WP database
2) while inserting the post, create a new category, in case it does not
exist already

The posts have not attachments, images, nothing, just plain utf-8 text.

My question:

How to do that? :-)

Is there any routine in WP that I can grab to to this?
Please help me! I have 900,000 posts to insert and I am getting desperate!
:-(

regards

Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/wp-pro/attachments/20080314/5e46e58f/attachment.htm


More information about the wp-pro mailing list