FTP/SFTP
FTP (File Transfer Protocol) is a standard protocol for sending and retrieving files from hosting servers. SFTP (SSH File Transfer Protocol) is a more secure version — encrypts all transferred data including your login credentials.
Both are used for the same purpose: accessing and managing files on the hosting server from your local computer.
Simple analogy
Imagine your hosting server is a big warehouse. FTP and SFTP are truckloads that allow you to send or pick up goods from these warehouses. The difference is, FTP transports goods openly — anyone on the road can see the contents. SFTP transports goods in locked containers that only the sender and recipient can open.
Difference between FTP and SFTP
| FTP | SFTP | |
|---|---|---|
| Encryption | None | Yes, full |
| Default port | 21 | 22 |
| Security | Vulnerable to being tapped | Safe |
| Speed | Slightly faster | Slightly slower |
| Hosting support | Universal | Almost universal |
| Recommendation | Not recommended | Recommended |
FTP sends usernames, passwords, and file contents in plain text that can be intercepted. Always use SFTP for file access on servers — especially on public networks or WiFi.
What Can Be Done with FTP/SFTP?
F
T
P and S
F
T
P are used for various server management needs:
Upload HTML, CSS, JavaScript, or image files to the
Download files from the server to the local computer as a manual backup
Edit configuration files such as
wp-config.phpor.htaccessManage file and folder permissions on the
Move or rename files in large numbers at once
Accessing the server when File Manager in cPanel cannot be used
server
server
Commonly Used FTP Clients
FTP and SFTP cannot be accessed directly from a browser — you need a special application called an F
T
Apart from separate applications, some code editors such as VS Code also support direct SFTP connections via extensions.
Information Required for Connection
To connect to a server via FTP/SFTP, you need the following four pieces of information — usually available in your hosting dashboard or welcome email:
| Parameters | Example |
|---|---|
| Host | ftp.namadomain.com or IP Address server |
| Username | Custom cPanel or FTP account username |
| Password | FTP account password |
| Port | 21 for FTP, 22 for SFTP |
FTP Account vs SFTP via SSH
In shared hosting, there are two ways to access the server via this protocol:
Ordinary FTP Account — Created via cPanel, can be restricted access to certain folders. Suitable for giving to developers or designers without giving full access to the server.
SFTP via SSH — Uses SSH credentials and provides broader access to the server. Usually available in hosting packages that have SSH access enabled. Safer and more flexible, but requires less technical understanding.
If you need to provide file access to third parties such as freelance developers, create a separate FTP account with limited access to certain folders — not full access to your entire hosting account.
What You Need to Pay Attention to
- Always use SFTP, not FTP — Almost all modern hosting supports SFTP. There's no reason to stick with unencrypted FTP, especially if you manage a business website.
- Do not store FTP passwords on clients without encryption — Some FTP clients store passwords in an easy-to-read format. Make sure you use the credential store encryption feature if available.
- File permissions need to be considered when uploading — Files uploaded via FTP sometimes have incorrect permissions. PHP files generally need
644permissions and755folder permissions. Permissions that are too open such as777are a security gap. - FTP is not a solution for large migrations — To move hundreds of files at once, using SSH with the
rsynccommand or the backup/restore feature in cPanel is much more efficient than FTP.
FAQs
Is FTP/SFTP available on all hosting plans?
FTP is available on almost all shared hosting plans. SFTP is usually also available, although some budget hosts sometimes limit SSH access — which is the basis of SFTP. Check the specifications of your hosting package or ask support directly before buying it.
What is the difference between SFTP and SCP?
Both use SSH connections and offer encrypted file transfers. The difference is in the features: SFTP supports more complete file operations such as viewing file lists, renaming, and setting permissions interactively. SCP is simpler and only for one-way file transfers.
Why does my FTP connection always fail or time out?
Some common causes: hosting firewall blocking connection from your IP, port 21 blocked by ISP or local network, or wrong transfer mode. Try switching to Passive mode in your FTP client settings — this solves most FTP connection problems behind firewalls or routers.
Do I still need FTP if the hosting already has a File Manager in cPanel?
Not always. For daily needs, the File Manager in cPanel is sufficient. FTP/SFTP is more useful when you need to transfer many files at once, integrate server access into the development workflow, or access the server from a code editor.
Disclaimer: Hosting Wiki articles are prepared for educational and reference purposes. Hosting technology keeps evolving, so some technical details may change over time.