🇯🇵 日本語 | 🇺🇸 English | 🇪🇸 Español | 🇵🇹 Português | 🇹🇭 ไทย | 🇨🇳 中文

A Beginner's Guide to WinSCP: Connecting, Uploading, and Transferring Files

To publish a website, you need to upload the files you created on your computer to a server. This task of "sending files to the server" is an essential skill for any web creator. However, especially for beginners, the thought of a "black screen (CUI)" can be intimidating, and the process might seem complicated.

For those who feel that way, we recommend "WinSCP," which we'll introduce today. WinSCP is a popular free tool for Windows that lets you handle files intuitively with your mouse. In this article, we'll thoroughly explain the basics of WinSCP, from basic operations and connection methods to file transfers, with easy-to-follow steps. Let's get it working together!

What is WinSCP, Anyway?

WinSCP is an open-source graphical file transfer client for Windows. It's used to securely exchange files between your local computer (your PC) and a remote server (like a web server).

Its main features are as follows:

  • Intuitive GUI: You can manage folders and files with drag-and-drop, making it easy for beginners.
  • Support for Multiple Protocols: It supports various connection methods, including the current secure standard SFTP (SSH File Transfer Protocol), as well as FTP, SCP, and WebDAV.
  • Advanced Features: Beyond file transfer, it has a built-in function to change permissions and a simple text editor, allowing you to complete simple server tasks within WinSCP.

In the world of web development, WinSCP is frequently used to upload created HTML, CSS, and image files to the server.


【STEP 1】How to Connect to a Server with WinSCP

First up is connecting to the server, the foundation for everything else. If you can get past this step, you're halfway there. Get the information you received when you signed up for your server hosting.

When you launch WinSCP, the "Login" window will appear. Let's enter the following information:

  1. File protocol: Select "SFTP". This is strongly recommended for security as it encrypts the communication, unlike FTP.
  2. Host name: This is the server's address. Enter a domain name like "example.com" or an IP address.
  3. Port number: For SFTP, this is typically "22".
  4. User name: The ID for logging into the server.
  5. Password: The password for logging in.

After entering the information, it's very convenient to press the "Save" button, so you can skip this input next time. Finally, click the "Login" button to start the connection.

💡Example Information to Enter
Please replace the following information with your own server details.

File protocol: SFTP
Host name: example.com (or 192.0.2.1, etc.)
Port number: 22
User name: your_username
Password: your_password

【STEP 2】Understanding the Main Screen

Once you've successfully connected, a window with two panels side-by-side will appear. This is WinSCP's main screen.

  • Left Panel (Local Panel)
    This shows the contents of your computer. You'll select the files you want to upload from here.

  • Right Panel (Remote Panel)
    This shows the contents of the connected server. You'll upload your files here.

The basic method for transferring files in WinSCP is to drag and drop them between these two panels.


【STEP 3】File Transfer with WinSCP (Upload/Download)

Now, let's actually try transferring some files. The process is surprisingly simple.

How to Upload a File

This is how you send a file from your PC to the server (upload). It's the most common operation when publishing a website.

How to do it: Select the file you want to upload in the left panel (PC) and drag-and-drop it to the destination in the right panel (server).

As an example, let's upload the main file of our web page, `index.html`.

index.html

How to Upload a Folder

You can upload not just files, but entire folders. This is very efficient for transferring folders containing all your CSS or image files at once.

How to do it: It's exactly the same as uploading a file. Drag the folder you want to upload from the left panel and drop it into the right panel.

Here, let's upload the entire `css` folder, which defines our website's design.

/css/

How to Download a File

This is how you save a file from the server to your PC (download). It's often used for backing up files on the server.

How to do it: It's the reverse of uploading. Select the file you want to download in the right panel (server) and drag-and-drop it to your desired location in the left panel (PC).

For example, let's download a database backup file named `backup.sql` from the server to our PC.

backup.sql

【Advanced】Managing Files and Folders on the Server

With WinSCP, you can perform basic file management on the server, not just file transfers.

Creating a New Folder on the Server

To organize your website's content, you can directly create folders like an `images` folder on the server.

How to do it: Right-click in an empty space in the right panel (server), select "New" → "Directory". Enter the name of the folder you want to create in the window that appears.

Here, we'll create an `images` folder to store our image files.

images

⚠️ Heads Up! Points for Beginners to Watch Out For

WinSCP is intuitive, but there are a few things to keep in mind. Knowing these can help you prevent a lot of trouble.

  • Overwriting Files: When you try to transfer a file or folder with the same name, a confirmation message will appear. Be sure to check carefully to avoid accidentally deleting the original file.
  • Transfer Mode: You don't usually need to worry about this, but the standard is to transfer text files (HTML, CSS, JS, etc.) in "Text mode" and images or ZIP files in "Binary mode". WinSCP usually detects this automatically, but if you encounter issues like corrupted files, you might want to check this setting.
  • Permissions: Files and folders have permissions that determine who can read or write to them. If a file you uploaded to the server doesn't display correctly, it might be due to these permissions. In WinSCP, you can change them by right-clicking a file, opening "Properties," and setting the numerical value (e.g., 644, 755).
  • Prioritize SFTP: As mentioned before, FTP does not encrypt its communication. There is a risk that your password could be intercepted by third parties, so unless you have a specific reason not to, always connect using SFTP.

Next Step: Enhance Security with Public Key Authentication

This time, we introduced the basic connection method using a password. However, a more secure and professional method is "Public Key Authentication". This is a system that uses a pair of "keys" instead of a password for authentication, significantly reducing the risk of unauthorized login.

It requires a little bit of setup, but once you learn it, it's very easy and secure. The next article explains the specific steps in detail, so please give it a try.

➡️ How to Connect with SFTP in WinSCP and Set Up Public Key Authentication