Upload your site with File Manager and FTP
To publish your website, its files need to be inside the site's folder on your hosting. You can upload them in two ways: from your browser with File Manager in cPanel, or from your computer with an FTP client such as FileZilla.
Where do I put my website files?
- Primary domain: its files go in the
public_htmlfolder. Any file you put there appears athttps://example.com. - Addon domains and subdomains: each has its own site folder (Document Root), set when you add it and shown in the Domains interface.
- Home page: the site folder must contain a main file named
index.phporindex.html; otherwise a file listing or an error message appears instead of your site.
Don't delete or move the folders the system creates in your account's home directory, such as mail, etc, and ssl. They hold your email and your account settings.
Upload your site with File Manager
The fastest way to upload a whole website is to compress it into a single .zip file on your computer, then upload it and extract it on the server.
In the Files section of cPanel, click File Manager. It opens in a new tab.
Open the public_html folder (or the folder for the domain you want) from the sidebar tree.
Click Upload in the toolbar, then drag the archive onto the page or choose it from your computer. Wait until the progress bar finishes and turns green.
Go back to File Manager, select the archive, then click Extract and confirm the path.
If the files end up inside a subfolder (such as public_html/mysite/), move them directly into public_html: select them all, click Move, and type the new path.
Delete the archive after extracting it, and open your site in a browser to make sure it shows up.
Useful File Manager tasks
- Show hidden files: files whose names start with a dot, such as
.htaccess, are hidden by default. Click Settings at the top right of the page, enable Show Hidden Files, then click Save. - Edit a file: select the file and click Edit to open it in a text editor in your browser.
- Compress files for download: select the files and click Compress, then download the resulting file. This is a quick way to take a copy of your website files.
- Delete: deleted files go to the
.trashfolder unless you enable Skip the trash. Open View Trash to restore them, and Empty Trash to free up space.
File permissions
Permissions determine who can read, modify, or execute a file. To change them, select the file or folder and click Permissions. The right values for most websites are:
- Folders:
755 - Files:
644 - Sensitive configuration files (such as
wp-config.php):600or640
Never set any file or folder to 777. This permission lets any process modify it, and the server may reject it and show an error instead of your site.
Upload via FTP
An FTP client is a good choice for uploading a large number of files or keeping your site continuously in sync. The main FTP account's details are on the service's usage instructions page, and you can also create additional FTP accounts.
Create an FTP account
In the Files section of cPanel, click FTP Accounts.
Enter a name in the Log In field and choose the domain. The username takes the form [email protected].
Enter a strong password or use the Password Generator.
Set the folder in the Directory field. This account can only access this folder and what's inside it, so for a developer who only works on the website, enter public_html, for example.
Set a Quota if you want to limit the space, then click Create FTP Account.
Connect from an FTP client
In your client (such as FileZilla), enter:
- Host: your domain name or the server's IP address shown on the instructions page.
- Username: the full FTP account name, such as
[email protected]. - Password: the FTP account's password.
- Port: 21.
- Encryption: choose Explicit FTP over TLS if your client offers it, so your password isn't sent unencrypted.
If the client refuses to connect after several failed attempts, your computer's IP address may have been temporarily blocked because of a wrong password. Check your details and wait a little; if the problem continues, open a support ticket with your computer's IP address.
How is this guide?
Email deliverability
Check your domain's DKIM, SPF, DMARC, and reverse DNS records in cPanel, fix them with one click, and track what happened to messages you've sent.
Backup and restore in cPanel
Restore your website files, a database, or email from backups with JetBackup 5, and download a full copy of your account with cPanel's Backup tool.