File Transfer Protocol (FTP) and Secure File Transfer Protocol (SFTP) are essential tools for managing files on your web hosting account. While cPanel's File Manager is useful for quick edits, FTP and SFTP are more efficient for handling large uploads and downloads. This guide will walk you through setting up and connecting to your hosting account using FTP and SFTP.

Create an FTP account

To connect via FTP, you first need to create an FTP account in cPanel. Begin by logging in to your cPanel account through the server hostname provided in your welcome email, using port 2083. Once logged in, navigate to the 'FTP Accounts' section. Here, you will create a new FTP account by entering a username and a strong password. It is crucial to choose a password that combines letters, numbers, and special characters to enhance security. You'll also need to specify the directory this FTP account will have access to; typically, this is the 'public_html' directory if you want to manage your website files. You can also set a quota for the account, which limits the amount of data the account can transfer. This feature helps prevent any single account from consuming excessive server resources. After filling in these details, click 'Create FTP Account' to finalise the setup. It is advisable to note down the credentials and directory path for future reference.

FTP client setup

For managing your FTP connections, we recommend using FileZilla, a free and open-source FTP client. You can download it from filezilla-project.org. After installing FileZilla, open the application and enter the following details to connect to your FTP server: the hostname (usually your domain name), the FTP username you created (e.g., [email protected]), and the password. Set the port to 21 for FTP or the SSH port for SFTP, if applicable. FileZilla provides a user-friendly interface where you can save these settings for future use. To do this, access the 'Site Manager' feature, where you can store multiple site configurations. This feature is particularly useful if you manage multiple websites. Once these details are entered, click 'Quickconnect' to establish a connection to your server. If you encounter any issues, double-check the entered information for typos, and ensure that your internet connection is stable.

Connection settings

Understanding the connection settings is crucial for a successful FTP or SFTP connection. For standard FTP connections, use port 21. If you prefer a more secure connection, use FTPS, which also operates on port 21 but requires explicit TLS encryption. SFTP, on the other hand, uses the SSH protocol and typically operates on port 22.

For enhanced security, it is advisable to use FTPS or SFTP instead of plain FTP.
Ensure your firewall settings allow these ports to prevent connection issues. Many firewalls block these ports by default, so you may need to configure your firewall settings to allow traffic through these ports. Additionally, some hosting providers may have specific requirements or restrictions on which ports can be used, so it is always a good practice to consult your hosting provider's documentation or support team for guidance. If you are using SFTP, ensure that SSH access is enabled for your hosting account, as SFTP relies on SSH for secure file transfers.

Upload and download files

Once connected, you can transfer files between your local machine and your server. Navigate to the 'public_html' directory on the server side within FileZilla. To upload files, simply drag and drop them from your local file system into the desired directory on the server. When downloading, drag files from the server to your local directories. Pay attention to any overwrite prompts, especially if you are updating existing files. Overwriting files without caution can lead to data loss, so it is wise to keep backups of important files. You can monitor the progress of your file transfers in the 'Transfer Queue' at the bottom of the FileZilla interface, which provides details on the status and speed of each transfer. Additionally, FileZilla offers features such as file filtering, which can help manage large numbers of files by hiding or showing files based on specific criteria. This can be particularly helpful when dealing with complex directory structures or when you need to focus on specific file types.

Troubleshooting

If you encounter issues connecting, consider the following troubleshooting steps. A 'connection refused' error may indicate that the port is blocked by a firewall; ensure port 21 or the SFTP port is open. If you receive a 'login failed' error, double-check that you are using the full FTP username format, such as [email protected]. Switching to passive mode in FileZilla can resolve some connection issues, especially in restrictive network environments. Passive mode configures the server to open a port for the client, which can bypass firewall restrictions on the client's side. If connections timeout, verify your internet connection and try increasing the timeout settings in your FTP client. This setting can usually be found in the 'Settings' or 'Preferences' menu of your FTP client. In some cases, antivirus software may interfere with FTP connections, so temporarily disabling it can help identify if it is the cause of the issue. Always ensure your software is updated to the latest version to avoid compatibility problems.

Related guides

Ready to enhance your website management? Explore our shared hosting plans for robust features and reliable support.

Was this answer helpful? 0 Users Found This Useful (0 Votes)