• Resolved takti

    (@takti)


    Hello,

    i would like to import some product data from FTP. I have read, that i need to adjust this PHP script.

    https://paste.ee/p/PFixy

    But my question is, where should i store this php script file?
    And how i connect it with WP All Import Plugin.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @takti

    i would like to import some product data from FTP. I have read, that i need to adjust this PHP script.

    That script is good for large data feeds. If you have a smaller feed then it would probably be easier to use this function/workaround: https://d.pr/n/pAWmDX (note: you must save this snippet in your child themes functions.php file or in a plugin like Code Snippets). Example usage:

    [custom_file_download("ftp://username:[email protected]/full/path/to/file.csv", "csv")]

    See: https://d.pr/hCfNek.

    But my question is, where should i store this php script file?

    It should go on your server and it should be accessible via URL. You should name the file something “unguessable” and/or use .htaccess rules to make sure that random people can’t access it.

    And how i connect it with WP All Import Plugin.

    You’d point the import to the URL for the script in the “Download from URL” field when creating your import.

    The workaround method worked great for me. However, we have an FTP folder with several XML files (each a news article in NewsML format). I’ve tested parsing the file with All Import and this is a fantastic solution for us.

    What I am wondering is, can a wildcard be used to download all XML files in an FTP folder and if so, how would I go about doing it?

    I’ve tried this and get a 550 error

    [custom_file_download("ftp://username:[email protected]/full/path/to/*.xml", "xml")]

    When I use the path to an actual single file, it works fine.

    • This reply was modified 5 years, 2 months ago by kyledavis.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Importing from FTP’ is closed to new replies.