How to Upload a Website Using FTP
Connect with FileZilla over SFTP on port 22 using your cPanel username and the hostname from your welcome mail, then drag the site into public_html so index.html or index.php sits directly in that folder. Set directories to 755 and files to 644. Plain FTP on port 21 is unencrypted, so prefer SFTP for the upload.
The exact FileZilla settings, folder paths and permission numbers an Indian site owner needs to move files from a laptop to public_html.
knowledge
- Read time
- 4 min
- Sections
- 7
- Updated
- 14 Nov 2026
- Written by
- WebJi® team
Last editorial update: 15 November 2026.
What do you need before you connect?
An upload needs four values: the hostname, the username, the password and the port — all four come from your hosting welcome mail or the FTP Accounts screen in cPanel. The hostname is usually the server name in the welcome mail, or the domain once DNS already points at the hosting. The username for the main account is the cPanel username; an extra FTP account is a longer name, typically written with the domain after an @ sign.
Port 22 with protocol SFTP is the setting that works on a cPanel account; port 21 is plain, unencrypted FTP. What an FTP account is and how the sub-account names are formed is covered in what an FTP account is. If the welcome mail carries no hostname, write to support@webji.services before guessing.
- Hostname: the server name from the welcome mail, or your domain.
- Username: the cPanel username for the main account.
- Password: the panel password, not the client-area password.
- Port: 22 for SFTP; 21 only for plain FTP.
How do you connect with FileZilla?
FileZilla connects in four clicks once the site is saved: File → Site Manager → New Site, protocol SFTP, host and port 22, logon type Normal, then Connect. Accept the server's host key on the first connection — that prompt is expected exactly once. If the key warning reappears for the same server later, stop and email support@webji.services before accepting it, because an unexpected key change can mean the connection is being intercepted.
- Open Site Manager — File → Site Manager → New Site, and name it after the domain.
- Choose SFTP — Protocol: SFTP – SSH File Transfer Protocol, Port: 22.
- Enter logon — Logon Type: Normal; User: the cPanel username; Password: the panel password.
- Connect — accept the host key once when asked.
- Upload — left pane is your computer, right pane is the server; open
public_htmlon the right and drag the site files in.
The protocol choice carries the security decision, and FTP vs SFTP explains why the unencrypted variant should stay closed. On the command line the same job is sftp user@hostname, then cd public_html and put the files — see connecting with PuTTY for the shell side when the plan includes SSH.
Active or passive FTP — which mode should you use?
Use passive mode: in active FTP the server connects back to your computer, and the router or firewall on almost every Indian home or office network blocks that inbound connection. In passive mode the client opens both the command connection and the data connection outward, which NAT and firewalls allow by default. FileZilla ships with passive as its default, so most people never see the problem.
The classic symptom of the wrong mode on plain FTP is a login that succeeds and then stalls: "425 Can't open data connection", or a connected server with an empty directory listing. The fix is Edit → Settings → Connection → FTP → Transfer mode → Passive. This setting only exists for FTP — SFTP runs one encrypted connection on port 22 and has no active/passive distinction at all, which is one more reason to prefer it.
Which files go into which folder?
The primary website is the content of public_html: index.html or index.php must sit directly in that folder, not inside one extra project folder. An addon domain uses the document root cPanel shows for that domain, which is not always public_html itself — match the remote path to that screen before dragging anything.
- Homepage: one index file at the top of the document root. When both index.html and index.php exist, the panel's DirectoryIndex order decides which one is served — delete the one you do not want.
- Structure: keep the local folder structure (css, images, wp-content) exactly as the site expects it.
- Do not touch: mail directories and dotfiles like
.bashrcare not part of the upload. Deleting them to "clean up" breaks mail or the account. - Editing later: download the live file, change your copy, upload back to the same path. Uploading a renamed copy does not replace the live page.
If you would rather not use an FTP client at all, you can upload a folder in cPanel File Manager through the browser — the File Manager guide covers zipping, extracting and editing there. Shared plans without cPanel use their own panel's file tool; the shared hosting page names the panel for each plan family.
What permissions should the uploaded files have?
Set directories to 755 and regular files to 644: with those numbers the web server can enter and read everything, while only your account can write to it. In FileZilla, right-click a file or folder → File permissions → enter the numeric value. Apply to directories only and files only separately, because they need different modes.
A 403 Forbidden after upload usually means a directory is not executable for the web server, or a file is not readable. A 500 on PHP files with static files working points at the script or the account, not the transfer — note the status code and mail support@webji.services. Mode 777 is not the fix for either error: it makes the file writable by every account on the server, and many configurations refuse to run such files on purpose.
Why does the FTP connection fail?
Most failed uploads are the protocol, the port or the folder — not a dead server: check SFTP on 22 first, then the username, then the remote path. Three error patterns cover nearly every ticket.
- Connection timed out: the port is blocked on the local network or the hostname does not resolve. Try the server hostname from the welcome mail; which port SFTP uses lists the values worth trying.
- Authentication failed: the password is wrong, or the client-area password is being used on the panel. Reset the panel password, not the billing one.
- Connected, but empty or wrong folder: you are in the account home, not in public_html — or the files went into a nested folder. Check the remote path before re-uploading.
Shared hosting does not include root access; root belongs to a VPS or a dedicated server, and on an unmanaged plan you administer the operating system yourself. For a cPanel account, cPanel hosting is the product page; SFTP on port 22 with the cPanel username is the supported route for every upload described here.
Frequently asked questions
How do I upload my website using FTP, in one paragraph?
Open FileZilla, create a site with protocol SFTP and port 22, connect with the cPanel username and panel password, open public_html on the remote side, and drag the site files in. The homepage index file must sit directly in that folder. Verify in the browser over https once the transfer finishes.
Should I use FTP or SFTP to upload my site?
SFTP. Plain FTP on port 21 sends the password and the files unencrypted, so anyone on the network path can read them. SFTP on port 22 encrypts both. On a cPanel account the main username works for SFTP without creating any extra account.
FileZilla connects but the site does not change — why?
The files almost certainly went to the wrong folder: the account home instead of public_html, or one nested folder too deep. Compare the remote path in FileZilla with the document root shown in cPanel, move the files, and confirm index.html or index.php sits directly in that root.
What do 755 and 644 permissions actually mean?
755 on a directory means the owner can write, and everyone can enter and list it; 644 on a file means the owner can write, and everyone can read it. The web server needs exactly that: read access without world-writability, which is why 777 is both unnecessary and rejected by many server configurations.
Can I fix an upload error by setting folders to 777?
No. 777 lets every account on the server write to your files, and PHP setups commonly refuse to execute world-writable files or directories. A 403 usually means 755 is missing on a directory or 644 on a file; a 500 on PHP files with static files working is a script or account problem, not a permissions dance.
Last editorial update: 15 November 2026.
Ready to get started with WebJi®?
Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.