1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Wordpress mysql insert

Discussion in 'Blogging' started by ronegraT, Feb 13, 2016.

  1. ronegraT

    ronegraT Power Member

    Joined:
    Dec 29, 2010
    Messages:
    625
    Likes Received:
    101
    Occupation:
    sleeping
    Location:
    Sweden
  2. nigglesmelb

    nigglesmelb Registered Member

    Joined:
    Nov 27, 2015
    Messages:
    60
    Likes Received:
    15
    You could put all your articles into a CSV file and then use PHP to insert them for you like the tutorial found here

    http://www.johnboy.com/blog/tutorial-import-a-csv-file-using-php-and-mysql

    Replace his column names with the correct Wordpress ones and boom, everything inserted at once.

    You will also need a function to create a "slug" for the permalink, but you can find an example here:

    http://stackoverflow.com/questions/2955251/php-function-to-make-slug-url-string

    Another option is use a plugin like:

    https://wordpress.org/plugins/wp-ultimate-csv-importer/
     
    • Thanks Thanks x 1