Uploading website files securely with SFTP or FTPS

Use an encrypted file-transfer method supported by your hosting service. SFTP uses SSH, while FTPS uses FTP protected by TLS. They are different protocols and use different connection settings. A username created only as an FTP subaccount may not be authorised for SFTP.

01 Find the correct connection details

Review the service's host, username, port and permitted protocol in the client area or control panel. Use the account's authorised credentials and an up-to-date file-transfer client. Do not guess a server address from another customer's article.

  1. Create a saved connection with the exact supported protocol. For SFTP, confirm SSH access is enabled for the account; for FTPS, select the TLS mode required by the service.
  2. Connect and verify the host identity using the expected SSH fingerprint or valid TLS certificate. Investigate unexpected identity changes instead of accepting every warning.
  3. Open the document root for the intended domain. Additional websites can use different directories from the main public_html folder.
  4. Back up files that you will replace. Upload a small harmless test file first and confirm it appears at the expected public address.
  5. Upload the required website files while preserving directory structure and appropriate permissions.
  6. Check the transfer queue for failures, then test the site and remove the test file if it is no longer needed.

02 Protect private files

Do not put database dumps, backup archives, private keys or configuration secrets in a publicly accessible directory. Restrict any additional FTP account to the directory it needs and remove it when the work is complete.

What should I check if my secure file-transfer connection fails?

Check protocol, port, account permission and saved password. A successful FTP login does not prove SFTP permission. Repeated incorrect credentials can cause a network or account block, so stop guessing and correct the configuration first.

If uploads succeed but the website does not change, verify the domain's document root, DNS destination and caching. A file-transfer connection can reach a server that no longer serves the public website after migration.

Sources and further reading

  • 0 Users Found This Useful
  • development
Was this answer helpful?

Related Articles

Changing a separate FTP account password in cPanel

Rotate an FTP password when access changes hands or an old credential may have been exposed....

Adjusting an FTP account storage quota in cPanel

An FTP quota limits how much storage an additional FTP account can use where the server...

Removing an FTP login without deleting website files in cPanel

Remove an additional FTP account when a contractor leaves or a deployment credential is no...

Creating a restricted FTP account in cPanel

Create a separate FTP account when a developer or tool needs file access to a particular...