tr Skip to content
Black Friday FlowMattic for life, 12 payments of $33.25 Or $399 once. Nothing added for splitting Ends in --Days --Hrs --Min --Sec See the deal

FTP automation in WordPress: upload, download and watch folders

FlowMattic FTP app: a new file on an SFTP server is downloaded, parsed and used to update products in a workflow.

FTP automation lets your WordPress site move files to and from remote servers without anyone opening an FTP client. FlowMattic, the automation plugin for WordPress, has a built-in FTP app that uploads, downloads, renames, lists and deletes files on FTP, FTPS and SFTP servers as workflow steps, and starts workflows when a file lands in a folder.

It suits anyone who still trades files with a partner by FTP: stores sending order files to a warehouse, agencies archiving client media, finance teams dropping invoices on an accounting server. This guide covers the Connect, the eight actions, the two folder triggers, and the limits worth knowing before you rely on it.

What is the FTP app?

The FTP app is a core app in the workflow builder. Its server details live in a FTP / SFTP Connect, so a step only picks a Connect by name and never holds the password itself. Every action opens a connection, does one job and closes it.

It has eight actions: Upload a file, Download a file, Delete a file or folder, List folder content, Rename / move a file or folder, Create a folder, Check if file exists and Get file info. It also has two polling triggers: New File in a Folder and File Modified in a Folder.

How FTP automation works in FlowMattic

1. Create the Connect

In Connects, add a new Connect and choose FTP / SFTP. Pick the Protocol (FTP, FTPS (FTP over SSL) or SFTP (SSH)), then enter the Host, Port, Username and Password. For SFTP you can paste a Private Key (SFTP only); for FTP and FTPS, set Passive Mode. Save with Test Connection & Save.

2. Add an FTP step

Add a step, choose FTP, pick the action, then select your server in FTP Connect. Fill in the paths, mapping file names or URLs from earlier steps where you need them, and test the step. Paths are cleaned up for you: a missing leading slash is added and a trailing slash removed.

FlowMattic builder showing the FTP app's Upload a file action settings
The FTP Upload a file step with the FTP Connect selector, Source URL, Source File Path and Remote File Path.

3. Or start from a folder

Choose FTP as the trigger, pick New File in a Folder or File Modified in a Folder, select the Connect, set the Folder Path and how often to check. The first capture records the files already in the folder as the baseline. After that, each check compares the folder against the last snapshot and runs the workflow once for every new or changed file, with file_name, file_path, file_size, modified_time and folder_path. File Modified also passes previous_size and previous_modified.

Actions and their options

ActionFieldsReturns
Upload a fileSource URL, or Source File Path (Server); Remote File Path (required)remote_path
Download a fileRemote File Path (required); Local Save Path (Optional)local_path, file_url, attachment_id, file_size
Delete a file or folderRemote Path; Is it a folder?path
List folder contentFolder Path (defaults to /)item_count and items, each with name, path, type, size and modified
Rename / move a file or folderCurrent Path; New Pathold_path, new_path
Create a folderFolder Pathpath
Check if file existsRemote Pathexists, type
Get file infoRemote File Pathsize, modified and type; over SFTP also permissions and accessed

A few behaviours from the code are worth knowing. If the Remote File Path for an upload has no file extension, it is treated as a folder and the source file name is added to it. Missing parent folders are created before the upload. A download with no Local Save Path goes to the WordPress uploads folder and is added to the Media Library, so the next step gets a public file_url. To move a file, give Rename / move a New Path in a different folder.

Use cases

Send the day’s orders to a fulfilment partner

A store whose warehouse still takes a nightly CSV over SFTP builds the file in WordPress and uploads it at the same time every evening. No one has to remember to export it.

Flow: Schedule (Every Day) → step that collects the day’s orders → CSV Creator → FTP: Upload a file

Import a supplier’s price file when it arrives

A supplier drops a new CSV on its FTP server every week. The workflow notices it, pulls it into the Media Library and updates products row by row.

Flow: FTP: New File in a Folder → Download a file → CSV Parser (file_url) → Iterator → WooCommerce product update

Archive client uploads off-site

An agency copies every file a client adds to the Media Library to its own archive server, filed by client and month, so a broken site never takes the originals with it.

Flow: WordPress New Media → FTP: Upload a file (Source URL = media URL, Remote File Path = /archive/northwind/2026-10/)

Drop invoices on the accounting server

Each paid order produces a PDF invoice that the accountants’ system picks up from an SFTP folder, named with the order number so it is easy to match.

Flow: WooCommerce order → PDF Template Builder → FTP: Upload a file

Get told when a shared file changes

Operations watches a folder of rate sheets. When one changes size or timestamp, the team channel gets the file name with its old and new size.

Flow: FTP: File Modified in a Folder → Slack message (file_name, previous_size, file_size)

Summarise incoming documents with AI

A partner uploads PDF reports to a shared folder. Each new one is downloaded, its text extracted and summarised by an AI Agent, and the summary is emailed to Amelia Okafor before she opens the file.

Flow: FTP: New File in a Folder → Download a file → PDF Parser → AI Agent → Send Email

Tips and gotchas

  • Your host’s PHP decides the protocols. Plain FTP needs the PHP FTP extension, FTPS needs OpenSSL, and SFTP needs the PHP SSH2 extension. If one is missing, the step says so in its error.
  • The password field is always required. With an SFTP private key, key authentication is tried first and the password is used as the key passphrase; if the key fails, password login is tried.
  • Folders must be empty to delete. Set Is it a folder? to Yes (Folder), and clear the folder first with List folder content and an Iterator.
  • Triggers watch one folder. Only files directly in the Folder Path are compared; subfolders and directories are ignored. Files are matched by name, so a file replaced under the same name never counts as a new file; use File Modified in a Folder for that.
  • Checks run from FlowMattic’s scheduler. The trigger’s frequency goes from 1 minute to 1 day. On a site connected to FlowMattic Cloud, Cloud wakes the site when a check is due; without it, checks run through WordPress cron, so a quiet site may check less often than you set.
  • Large files over SFTP. SFTP uploads and downloads read the whole file into PHP memory, so very large files can hit your memory limit. Plain FTP transfers stream from disk.
  • A Local Save Path outside uploads saves the file but returns no file_url and no Media Library entry.
  • A licence is needed. FTP actions return an error asking you to activate or renew when the FlowMattic licence is not active.

FTP sits alongside the parsers, formatters and file tools described on the data tools page.

Related features

  • FlowMattic Connects: where the FTP / SFTP server details are saved and reused.
  • CSV Parser: turn a downloaded CSV into rows a workflow can loop over.
  • ZIP Archive: bundle files before upload or unpack what you download.

FAQ

Can WordPress upload files to an SFTP server automatically?

Yes. Create an FTP / SFTP Connect with the SFTP (SSH) protocol, then use the Upload a file action in any workflow, with a source URL or a file path on your server. Your host needs the PHP SSH2 extension for SFTP.

How do I trigger a workflow when a file is added to an FTP folder?

Use the FTP app’s New File in a Folder trigger, set the Folder Path and a check frequency, and capture once to record the current files. From then on, each new file runs the workflow once, with its name, path, size and modified time.

Does FlowMattic support FTPS and key-based SFTP?

Yes. The Connect offers FTP, FTPS (FTP over SSL) and SFTP (SSH). For SFTP you can paste a private key; the password field then acts as the key’s passphrase.

Where do downloaded files go?

By default into your WordPress uploads folder, registered in the Media Library, with the URL and attachment ID passed to the next step. Set Local Save Path to store the file somewhere else on the server.

Ready to replace the manual routine with FTP automation? See FlowMattic plans and build your first file workflow.

More from the blog