• I need a script to add data to wp db tables from an XML file using PHP?

    I then need to automate the execution of this script.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter PBWordpressDP

    (@pbwordpressdp)

    Also, where is the code or function that executes the import XML file when you hit the import button. Perhaps this code would be of some use.

    Where exactly are you importing xml files? What table do you want to write to? You automate execution by setting up cron jobs in your server configuration.

    Thread Starter PBWordpressDP

    (@pbwordpressdp)

    I want to add entries to the wp_postmeta table. There are a number of entries added in a single item entry from the XML.

    A content provider will upload xml files to a ftp folder, and a script will import the newly added XML file(which will add new items) into the wp_postmeta table.

    Thread Starter PBWordpressDP

    (@pbwordpressdp)

    I am currently able to import an XML file through Tools->Import->Wordpress (selecting a WXR (xml)) file. This populates the wp_postmeta as expected. I now just want to automate this process. So I would simply drop an XML file into a folder, and a scheduled script would automatically do the rest.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Script to add data to wp db tables from an XML file using PHP’ is closed to new replies.