how to insert post directly into database
-
hi,
i have to create a BUNCH of pages, and after trying wp_insert_post(), it is clear that i cannot use it – it is MUCH TOO SLOW for large numbers of posts. i am inserting like 30,000 pages.
so i am writing a script to so the inserts manually, writing to the database directly. i am inserting data into wp_posts and wp_postmeta. apparently, i am missing something, because although all the data is in those 2 tables, when i try to access the page using it’s url, i get a “page not found”. if i bring the page up in the admin tools and just save it (no changes), it suddenly works.
i assume i am just missing either some data element in those 2 tables, or another table i have missed. can anyone fill me in?
needless to say, my script runs infinitely faster than the script that uses wp_insert_post.
any help greatly appreciated.
thanks,
-laz
- The topic ‘how to insert post directly into database’ is closed to new replies.