How to connect via SFTP

Updated 1 year ago

Secure File Transfer Protocol (SFTP) is a secure method for transferring files between your computer and your server. This guide will show you how to connect to your website using an SFTP client.

Step 1: Gather Your SFTP Details

To connect to your website using SFTP, you'll need the following information:

  • SFTP Server/Host: This is typically your website's domain name or server hostname. Learn where to find the server hostname.
  • SFTP Port: The default SFTP port is 22.
  • Username and Password (if not using SSH key): This is usually your cPanel username and password.

Note: You can usually find these details in your hosting account's welcome email.

You can add your SSH key to your account to avoid having to enter a password. Learn how to add your SSH key to your account.

Step 2: Download and Install an SFTP Client

You'll need an SFTP client to connect to your server. Some popular SFTP clients include FileZilla, WinSCP (for Windows), and Cyberduck (for Mac). Download and install the SFTP client of your choice.

Step 3: Set Up a New SFTP Connection Open your SFTP client and create a new connection. The process may vary slightly depending on the client you're using, but generally, you'll need to:

  • Click on "File" > "New Site" or "New Connection".
  • Enter your SFTP Server/Host, Port, Username, and Password.
  • Set the connection type or protocol to SFTP.
  • Click "Connect" or "OK".

Step 5: Navigate to Your Website's Directory

Once connected, you'll see your server's file structure on one side of the SFTP client window and your local computer's file structure on the other side. Navigate to your website's root directory (often called "public_html" or "www") on the server side.

Step 6: Transfer Files

To transfer files between your computer and your server, simply drag and drop the files or folders you want to transfer. You can upload files from your local computer to your server or download files from your server to your local computer.

Step 7: Disconnect Safely

When you're finished transferring files, always disconnect safely from the SFTP session. In most SFTP clients, you can do this by clicking on "Server" > "Disconnect" or by closing the SFTP client window.

Did this answer your question?