What Is FTP?

Author: Published

In brief: FTP is a protocol, or set of communication rules, used to transfer files between a computer and a server. You can use it, for example, to upload a website to your hosting or download a copy of its files. Standard FTP does not encrypt data or passwords, so choose SFTP or FTPS for connections over the internet if your provider supports them.

What is FTP used for, and how does it work?

FTP stands for File Transfer Protocol. Communication takes place between a client, the program that initiates the connection, and a server that makes files available. After logging in, users can perform operations allowed by their account permissions: upload and download files, create directories, rename files or delete data.

A typical file transfer program displays two panes: files on your computer and the contents of the server. Moving a document from one pane to the other starts the transfer. The program also lets you track progress and check which operations have failed.

You will mainly encounter FTP when managing hosting, a service that provides space and resources for a website. It can be useful for replacing images, uploading website files or downloading logs, which are records of events on the server. However, it is not necessary for every change: content in WordPress is usually edited through the administration panel, without direct access to files.

FTP, FTPS and SFTP — how do they differ?

Similar names do not mean the same connection method. The most important difference for users concerns encryption, which protects the information being transferred from being read by people intercepting network traffic.

ProtocolTransfer protectionWhat you need to know
FTPNo encryptionLogin credentials and file contents can be intercepted.
FTPSFTP secured with TLSRequires TLS support, the mechanism also used to protect HTTPS connections.
SFTPTransfer over SSHA separate protocol, not a variant of FTP; it uses a secure SSH connection.

If you have a choice, use SFTP or FTPS instead of standard FTP. Both can protect transfers, provided they are configured correctly and the server’s identity is verified. Choose the protocol specified in your hosting documentation; changing the port number alone will not turn FTP into SFTP.

FTP and FTPS with an explicit start to encryption often use port 21, while SFTP uses port 22. A port is a number that identifies a service on a server. Your provider may configure different values, so the details in its control panel take precedence over the program’s default settings.

How do you connect to a server and transfer a file?

You need a program that supports your chosen protocol, such as FileZilla Client, WinSCP or Cyberduck. A file manager available in your hosting control panel may be an alternative. Before installing a program, check whether the control panel will suffice for a one-off task.

To configure the connection, have the server address, protocol, port, username and authentication method ready. This will most often be a password, while for SFTP your provider may also allow you to use an SSH key — a pair of keys, with the private key remaining with the user. Your hosting customer panel login is not necessarily your file transfer login.

  1. Find the access details in your hosting control panel, or create an account with access only to the directory you need.
  2. Add a new connection in the program, selecting exactly the protocol and port specified.
  3. Check the server’s identity. For SFTP, verify the server key fingerprint against the information from your provider; for FTPS, do not ignore certificate warnings.
  4. Open the correct destination directory. The website directory may be named public_html, www or httpdocs, but confirm its location in the control panel.
  5. Upload a harmless test file, check the result and delete it if it is no longer needed.

For example, suppose you want to replace the file cennik.pdf on your website. First, download the existing version as a backup, then upload the new one to the same directory and check the document in your browser. If you still see the old content, the cause may be caching rather than a failed transfer.

Why is the connection or transfer not working?

An incorrect login message usually means you need to check the username, password and selected protocol. A timeout may be caused by an incorrect address or port, or a network block. Do not try to resolve these problems by disabling encryption.

If logging in to FTP or FTPS works but the directory listing does not appear, the problem may involve the separate connection used to transfer data. Passive mode can help in these situations: the client also initiates the data connection. Your hosting provider should describe its network requirements; SFTP does not use this mechanism.

A write error, on the other hand, may indicate insufficient permissions or that your storage limit has been reached. Check these two things before changing directory permissions. Granting full access to all users is not a safe way to fix the problem.

What does file transfer not replace?

Downloading the website directory does not always mean you have made a full backup. A website based on WordPress or another content management system usually stores some of its data in a database. You need to back it up separately or use a backup mechanism that covers both the files and the database.

Connection encryption also does not protect against accidentally overwriting or deleting a document. Before making your first change to a live website, identify the correct directory, back up the files you will be changing and check how to restore them.

See also: What Is a CDN?

Read also

Learn how PHP-FPM handles PHP requests, how it differs from a web server, and how to tune processes for traffic and hosting resources.
Learn how BIND, open-source DNS server software, handles domains, how its two roles differ and when running it yourself makes sense.
Learn what Poland’s REGON register and identification number mean, how they differ from NIP and KRS, and how to check a business’s details.