insert post to word press

Posted on 2011-10-27
Last Modified: 2012-05-12
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
Question by:teera
    LVL 70

    Accepted Solution

    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:
    LVL 31

    Assisted Solution

    You can use wp_insert_post() to add posts to the database

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    WordPress 3.2 was released on July 4, 2011 and provides a number of upgrades to the popular blogging and content management system (CMS) platform.  As usual, developers cannot make an omelet without breaking a few eggs, so there is an emerging "issu…
    Do you think that WordPress is just for blogs?  Think again!  WordPress is really a fantastic all around platform that you can use to develop websites on.  Integrated into its basic functionality is the ability to create pages using your choice of a…
    This video teaches users how to migrate an existing Wordpress website to a new domain.
    The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now