This is how you set up an FTP server as a target for your backups: from the form via encryption to the saved target.
What you need
- the credentials: server, user name and password,
- a folder on the server that nobody without authorisation can reach.
FTPS is not SFTP
FTPS is FTP with encryption. SFTP is file transfer over SSH, a protocol of its own on a port of its own. There is a separate target type for it: Store backups on an SFTP server.
Step 1: Choose the target type
Open the Targets page and click Add target. Choose FTP / FTPS.
- The target types that exist. FTP / FTPS is the second.
- Dismiss closes the selection.
The plugin uses the FTP extension of PHP for FTP. If it is missing, FTP / FTPS is greyed out, and the reason is shown below the selection.
Step 2: Fill in the form
- Name is your name for the target. The plugin suggests “FTP / FTPS 1”; any name that is not yet taken works.
- Server is the host name or the IP address, without ftp://.
- User name is required. The plugin does not offer anonymous FTP.
- Password is required.
- Folder on the FTP server can stay empty: the folder in which you land after logging in is then used. A path without a slash at the start begins in that folder. The plugin creates missing folders.
- Location indicates whether the target is at the same location as the website: not specified, Same location as the website or Another location (another data centre or another provider). The setting counts for the 3-2-1 rule of the plans.
- Save saves the target and tests the connection immediately.
- Test connection checks the entered values without saving.
- Cancel closes the form.
You do not need more in the Compact view. For everything else the defaults apply: FTPS with TLS, passive mode and port 21.
The folder must not be publicly reachable
Make sure that nobody without authorisation can access the folder, for example via a web address if the FTP account is located in a web space. The plugin places protection files in its folders. It does not check the folder from outside: it never sends test requests to other people’s servers.
Step 3: Set encryption and transfer mode
This step is only necessary if the defaults do not suit your server. For this, switch to the Extended view. The form then shows further fields.
- Encryption determines whether and how the connection is encrypted.
- Transfer mode offers Passive (recommended) and Active.
- Port can stay empty: then 21 applies.
- Connection timeout (seconds) accepts 3 to 60; the default is 10.
Encryption
| Choice | Meaning |
|---|---|
| FTPS with TLS (recommended) | The default. The connection is encrypted. The plugin does not check the certificate of the FTP server. |
| None: password and data can be read on the way | FTP without encryption. The form shows a warning below the field as long as this is selected. |
There is no silent fallback: if the server does not offer TLS, the connection test fails and says so. If you want to accept the risk, you choose None: password and data can be read on the way yourself.
The plugin does not check the certificate of the FTP server: it uses the FTP extension of PHP for FTP, and this extension can neither check nor accept certificates. So nobody confirms that the right server is at the other end. Below the field Encryption it says: With FTPS the connection is encrypted. The certificate of the FTP server is not checked (the FTP extension of PHP cannot do that), and implicit FTPS (port 990) is not offered. If that is not acceptable for your backups, use SFTP; there the plugin checks the key of the server: Store backups on an SFTP server.
- Encryption is set here to the choice without encryption.
- The warning is below the field as long as this choice applies.
The warning reads: Without encryption the password and all data travel in clear text. Anyone on the way can read them. The result of a successful connection test also states the risk.
Passive or active
The default is passive mode. About active mode the form says: Active mode only works when the FTP server can open a connection to this web server on its own. Most hosting providers do not allow that.
Step 4: Test the connection
Click Test connection. The plugin logs in to the server and tests everything it needs for backups: it writes a small file in two sections, asks for its size, renames it, reads it back, lists the folder and deletes the file.
If the test succeeds, the result appears in green above the buttons. Below the result are warnings and notes, if there are any. The picture shows a test with both.
- The result of the test appears in green: Connection works: a test file was written, read back and deleted.
- The warning appears with FTPS after every successful test: The connection is encrypted, but the certificate of the FTP server is not checked: the FTP extension of PHP cannot do that.
- The note appears there if the server refused a protection file.
If the server refuses a protection file, this is stated below the result, in the picture at 3. Some servers do not allow files whose name begins with a dot. The plugin stores the backups anyway.
Step 5: Save
Click Save. The plugin saves the target, tests the connection once more and reports the result. A target is usable only after a successful test.
- All targets are connected.
- The message names the target: saved and connected.
- The new target is in the list. The green dot means: connected. In front of the name is the icon of a server.
After saving and the successful connection test, the plugin looks at the location of the target. If it finds the folder of another installation there, the tile Backups found at “…” appears. If backups in the folder of this installation are missing from the list of backups at this target, the plugin adds them to the list on its own, or the same tile offers to add them. More on this: Find backups again after a reinstallation.
Your first target comes with the plan “Daily backup”: daily at a random time, everything, this target, Max. backups 7. The plan is paused until you switch it on. You choose another target on the Backup page in the tile Backup plans in a plan. The free version allows one target per plan.
If the test fails
- The cause in plain language.
- Show global log opens the global log. The details of the test are there.
- The original error message: Message from the target is the last answer of the FTP server. It is not translated; credentials, folders and server names are masked in it.
| Message | What you can do |
|---|---|
| The target cannot be reached. Check the server name and the port; the host of this website may block the port. | Check Server and, in the Extended view, Port. Ask the hosting provider of your website whether it allows outgoing connections on this port. |
| The target refused the login. Check user name and password. | Enter the credentials again. |
| The server does not offer encryption (TLS). Choose “None” under Encryption only if you accept the risk. | Ask your provider for FTPS. Without encryption, password and backups can be read on the way. |
| Implicit FTPS (port 990) is no longer supported. Choose “FTPS with TLS” under Encryption and enter the port of the server for explicit TLS (usually 21). | The target is still set to implicit FTPS. In the Extended view, choose FTPS with TLS (recommended) under Encryption, enter the port and test again. |
| The data connection could not be established. Try the other transfer mode; the host of this website may block the ports. | In the Extended view, change the Transfer mode and test once more. |
| The target does not allow everything the plugin needs. | Below it is what is missing, for example renaming a file. Give the FTP user this permission, or ask your provider. Without it, the target is not usable. |
| The target reports that there is no space left. | Free up space on the server, or choose a different target. |
| Sending the data failed. Possible causes: the connection was interrupted, or there is no space left at the target. | This line additionally appears below the cause if sending broke off in the middle of the transfer. Check the free space on the server and test once more. |
| This value is not valid. | The message appears in red at the field. For Server: enter only the host name or the IP address, without ftp:// and without a path. |
Good to know
- The backups are stored on the server under
<folder>/cloneworx-backup-<code>/<backup>/. You do not have to create the folder of the plugin. - An upload is first written to a file with the extension
.partand only gets its name at the end. After that, the plugin compares the size on the server with the local size. FTP has no checksums. - You do not download backups that are stored only at an FTP target through the plugin, but with your FTP program. Restore, check and finding backups read directly from the server.
- FTP does not report the free space. In the Extended view, the tile Targets and space shows a dash there.
- The plugin stores the password encrypted. When editing, the field only shows stored, leave empty to keep. If you change the server, the port, the user or the encryption, this no longer applies: the field becomes a required field.
- The FTP extension: If there is no free space left at the server, this often shows as a failed transfer without a reason. The message of the extension contains the text of the server without its number; for an answer with several lines, it contains only the last one.
- Web server without TLS for FTP: If your web server cannot encrypt FTP, the field Encryption offers only the choice without encryption. The result of the connection test then states the risk.
See also
- Which target suits you?
- The “Targets” page
- Renew the credentials of a target
- Check backups at a target and clean up leftovers
- Schedule backups automatically
On the command line
WP-CLI not set up yet? How to install WP-CLI.
The command line does not accept the password; so you set up an FTP target on the Targets page. Everything else also works with WP-CLI:
# Show targets with ID and state wp cloneworx-backup target list # Test the connection wp cloneworx-backup target test ftp-1 # Change the transfer mode, then test again wp cloneworx-backup target edit ftp-1 --set-mode=active wp cloneworx-backup target test ftp-1 # Create a backup plan that backs up to this target wp cloneworx-backup plan add --target=ftp-1 --rhythm=daily --time=03:15 --name="Nachts" # Check the backups at this target wp cloneworx-backup target check ftp-1