Can SSI import from a URL or remote feed?
Yes. An import can download its file from a URL at the start of every run, so a supplier feed that changes daily is read fresh each time.
Import from URL in New Import downloads a CSV, XML or JSON file, checks it the same way as an upload, and auto-configures the import from it. The import stores the URL as its source, and every run then downloads the file again before it imports: a browser run, a WP-CLI run and a scheduled run alike. Every edition can import from a URL; scheduled runs need the paid edition.
Any import can be switched to a URL, including one built from an uploaded file. Open the import, click Change Source beside its Source row, choose Use a URL, enter the address and click Save and download. The file is downloaded straight away, and the Source row then shows where it comes from as the scheme, host and path only: a username and password in the URL are stored encrypted and never shown, and a query string, where API keys usually sit, shows as ?…. The download is stored under a file name taken from the URL, so the file you uploaded earlier is not overwritten.
To change the URL, enter the new one in Use a URL the same way. To stop downloading, choose Choose an uploaded file (or Upload a new file) in Change Source: the import then reads that file and no longer downloads from the URL.
An import created with Import from URL in a version before 3.41.0 has no stored URL and reads its first download on every run. Enter the URL once in Change Source > Use a URL.
What a run checks before it uses the download
A download replaces the import’s file only once it has passed the same checks as an upload. A CSV must have a readable header and still contain every column the import was set up with. If a column has disappeared, the run stops before anything is imported, names the missing column or columns, and keeps the previous file. Added columns and a different column order are fine. If the supplier has renamed or removed a column for good, open the import, click Change Source, choose Use a URL and save the URL again: that download takes the new columns, the Source row lists the mapped columns that are no longer in the file and the new ones, and the fields mapped to a column that has gone are marked “(missing from the file)”. Map them to the new columns and click Save Import. An XML or JSON download must still read at the import’s saved record path. A download identical to the current file is discarded and the import carries on with the file it has.
A download from a web address has a 300-second timeout and a 1 GiB size limit, which developers can change with the superspeedyimports_source_fetch_timeout and superspeedyimports_source_fetch_max_bytes filters. Imports migrated from a WP All Import job that fetched its file from an HTTP, FTP or FTPS location keep downloading it the same way. See Scheduled imports and alerts for running a URL import on a timetable.
For a server-managed workflow, WP-CLI can run a saved import against a file you downloaded yourself with --file=/path/to/downloaded.csv. That is an optional execution path, not a requirement for browser imports.
Further reading
Written for Super Speedy Imports 3.64.0.

Comments