remote posting to wordpress

Discussion in 'PHP' started by asgsoft, Apr 23, 2011.

  1. #1
    hey everyone

    I am looking for anyone who might know how I can post articles to wordpress via a custom php script.

    Basically, I want to export an old website database and articles to wordpress and just wanted to automate it.

    Any ideas?

    Cheers
     
    asgsoft, Apr 23, 2011 IP
  2. Sepehr

    Sepehr Peon

    Messages:
    568
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you want to do this at once the simple way would be to export the post table of the old website and dump it on the new site.
     
    Sepehr, Apr 23, 2011 IP
  3. asgsoft

    asgsoft Well-Known Member

    Messages:
    1,737
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    160
    #3
    the old website isn't wordpress. It was a custom CMS, so I wanted to make a custom export script!
     
    asgsoft, Apr 23, 2011 IP
  4. Sepehr

    Sepehr Peon

    Messages:
    568
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #4
    What you need to do is to figure out how the custom CMS stores the posts. Then figure out how WP stores its posts.

    Now that you know these you can create an script which reads the posts from the CMS database, creates an INSERT statement which will insert the data into the WP's post table.

    You can do this by getting each post and then inserting it into the new database or by getting all of them, creating the INSERT and executing it once on the WP database.

    I'm assuming both the CMS and WP are on the same server.
     
    Sepehr, Apr 23, 2011 IP