[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

insert post to word press

my Boss want me  put 7000 mayors and some information  in to wordpress can I insert direct to data base
I want to know when I create new post where it go into data base

the information of mayor is in mysql database already
0
teera
Asked:
teera
2 Solutions
 
Jason C. LevineNo oneCommented:
Yes, you can insert directly to the database assuming you have access to it.  The table is wp-content.

However, you should take all the time necessary to figure out how that table works and what each column is used for.  It's very easy to kill an entire Wordpress install by entering data the wrong way.

Rather than direct entry, read about how to import:

http://codex.wordpress.org/Importing_Content
0
 
gwkgCommented:
You can use wp_insert_post() to add posts to the database

http://codex.wordpress.org/Function_Reference/wp_insert_post

Check line 2423 of wp-includes/post.php to see how it works.

http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/post.php
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now