Upload website files with SFTP: settings and secure connection Print

  • sftp, upload, ssh, website-upload
  • 0

Quick answer

Use SFTP with your assigned hosting server, SSH port, cPanel username, and authorized key. Open the domain’s document root before uploading. Interactive Online no longer provides FTP access. SFTP uses the SSH connection and the eligible cPanel account identity; old FTP subaccounts do not work for SFTP. Select SFTP rather than FTP or FTPS in your file-transfer client.

Connection details

For the standard hosting connections described in this library, cPanel12 uses cpanel12.primary001.net on port 12347, and cPanel25 uses cpanel25.primary001.net on port 12348. Confirm the assigned server in your own service details. Use the cPanel username and an authorized key, with SSH/SFTP enabled for that account.

Keep a current copy of files you will replace. A site can use a different document root from the main public_html folder. Find the correct domain folder.

Port numbers and account security

The assigned port identifies the SSH service; it is not a password. Keep private keys and passphrases private, verify the server fingerprint and use only authorized access. If your service details identify a different endpoint or the assigned port is unclear, contact support before changing the saved connection. Do not assume the generic SSH default applies.

Connect with an OpenSSH alias

If you already tested an alias using the SSH configuration guide, SFTP can reuse it. Windows OpenSSH and macOS OpenSSH support this command:

sftp website-staging

To check the SSH config for an existing alias without connecting, run ssh -G website-staging using your actual alias. Compare the resolved hostname, user, port and identity file with your service details. Follow the SSH alias and configuration guide if they differ. This output check does not test login, server identity or SFTP availability.

Connect without an alias

The following example targets cPanel25. Replace the uppercase values and adjust the server/port to match your service. In the sftp command, -P for the port is uppercase; in ssh it is lowercase.

sftp -P 12348 -i PATH_TO_YOUR_PRIVATE_KEY CPANEL_USERNAME@cpanel25.primary001.net

Find the local and remote folders

When the sftp> prompt appears, commands apply to the transfer session. pwd shows the remote directory and lpwd shows the local directory. cd changes the remote directory; lcd changes the local one. Inspect both before transferring.

pwd
lpwd
ls

# Replace this with the verified document root
cd /home/CPANEL_USERNAME/public_html

# Download one existing public file as a working/recovery copy
get index.html index-before-update.html

Upload the reviewed files

For a small change, upload the specific files you intend to replace. For a complete static export, retain its public folder structure and verify that the entry page lands at the document root. Use help for the commands supported by your installed SFTP client.

# Review the local file before replacing the remote version
put index.html
put styles.css
ls
bye

Using a graphical transfer client

Choose SFTP in the application’s connection settings, then enter the same host, SSH port, username, and key. Verify the host fingerprint through trusted account/support information. Upload from your local public-output folder into the confirmed remote domain folder. Do not accept an unexpected server-key change or disable certificate/host checks to continue.

Check the published result

Open the actual HTTPS URL and check navigation, assets, and the changed feature. A successful transfer does not prove that you chose the correct domain folder. Keep keys, backups, .env files, and source-only directories out of public web access.

If the connection fails

Check the exact protocol, port, account username, key selection, public-key authorization, and shell availability. Retired FTP subaccounts are not valid SFTP identities. Use the eligible cPanel username and authorized public key. Send support the domain, server/port, timestamp, and redacted error; keep the private key and passphrase local.

A successful SFTP connection still needs the right folder

If you can connect but cannot replace a file, inspect the exact path and the account that owns it. A separate FTP user can have a different scope from the cPanel SSH identity. Preserve the existing file before changing ownership or permissions. Use the document-root checks if the public website does not reflect a completed transfer, and the login and connection guide for a timeout or permission-denied error.

Related help

Official references

Last content review: October 31, 2026. Check the version and features available in your own account.

Customer troubleshooting and related-help review: November 1, 2026. Earlier review notes retain their original scope.


Was this answer helpful?

« Back