How to upload a website to cPanel
Uploading a website to cPanel means putting its files in the folder the domain is served from, public_html for the main domain. This guide shows how to do that with File Manager or FTP, how to extract a zip file in place, which permissions the files need, and how to fix the placeholder page or error that shows instead of your site.
Short answer
To upload a website to cPanel, open Files » File Manager and go to public_html, or to the domain’s own document root shown in Domains. Click Upload and add a zip file of your site, then select the zip and click Extract. Delete the zip and any placeholder index.html. Files need permission 644 and folders 755. For large sites, use an account from Files » FTP Accounts.
- Where
- cPanel » Files » File Manager, or Files » FTP Accounts
- You need
- A cPanel login and your site’s files, ideally in one zip file
- Applies to
- cPanel & WHM 134 (LTS) to 138, Jupiter theme
- Website folder
- public_html for the main domain; other domains use the folder shown in Domains
Find the right folder
A website’s files must go in the domain’s document root, the folder the web server reads for that domain. For the main domain of a cPanel account, the document root is public_html. Files anywhere else in the home directory are not visible on the web.
Addon domains and subdomains usually have their own document root. Open cPanel » Domains » Domains and read the Document Root column. Clicking the path opens File Manager in that folder, and Manage next to a domain lets you change its folder.
NotecPanel creates a cgi-bin folder inside public_html. Leave it in place; it does not get in the way of your site.
Guide: add a domain in cPanel Guide: create a subdomain in cPanel
Prepare a zip file
cPanel’s File Manager uploads single files, not folders. To upload a whole site in one go, compress it into a zip file on your computer, upload the zip and extract it on the server.
- Open the folder that holds your site on your computer and select its contents, not the folder itself, so that
index.htmlorindex.phpsits at the top level of the zip. - Compress the selection into a zip file with your computer’s own compress option.
- If the site uses a database, as WordPress does, export the database to an
.sqlfile as well. The site’s files do not include it.
NoteFile Manager extracts .zip, .gz and .bz2 archives. Zip files only work if Zip is installed on the server; if extracting a zip fails, ask your host.
Upload with File Manager
- Log in to cPanel.
- In the Files section, click File Manager.
- In the folder tree on the left, click
public_html, or the document root of the domain you are uploading to. - Click Upload in the toolbar. The upload page opens.
- Drag the zip file onto the page, or click Select File and choose it.
- Wait until the progress bar shows the upload is complete, then go back to File Manager. The zip is now in the folder.
If a file with the same name already exists in the folder, tick Overwrite existing files on the upload page to replace it.
File Manager uploads are not limited by PHP’s upload_max_filesize. That limit applies to uploads through your website, such as the WordPress media library. A File Manager upload has to fit in the account’s free disk quota.
Extract the zip file
- In File Manager, click the zip file once to select it.
- Click Extract in the toolbar, or right-click the file and choose Extract.
- Check that the path in the dialog is the folder you want, for example
/public_html, and confirm. - Close the results window. The site’s files and folders now appear in the folder.
- Select the zip file and click Delete. A zip left in
public_htmluses disk space, and anyone who guesses its name can download it from your site.
NoteFile Manager moves deleted files to the trash, which still uses your disk quota. Click View Trash, then Empty Trash, to remove them for good.
Remove the placeholder page
Some hosts put a placeholder page, often index.html or default.html, in public_html when they create the account. If the placeholder stays next to your site’s own index file, visitors can keep seeing it instead of your site.
When a folder holds more than one index file, such as index.html and index.php, the web server shows the one that comes first in its DirectoryIndex priority list. The host sets that list in WHM » Service Configuration » Apache Configuration » DirectoryIndex Priority, so the reliable fix is to keep only your site’s index file.
- In File Manager, open
public_html. - Select the placeholder file that is not part of your site, for example
index.htmlordefault.html. - Click Delete. To keep a copy, click Rename instead and give it a name such as
old-index.html. - Open your site in a private browser window, so the browser’s cache does not show the old page.
Check file permissions
Files uploaded to cPanel normally get working permissions on their own. If the site shows “403 Forbidden” or some files fail to load, check them in File Manager: files should be 644 and folders 755.
- In File Manager, select the file or folder.
- Click Permissions in the toolbar.
- Tick the boxes or type the number, for example
644for a file or755for a folder. - Click Change Permissions.
NoteLeave the permissions of public_html itself alone. With EasyApache’s FileProtect option, which is on by default, cPanel sets document roots to 750 so that only your account and the web server can read them. Never use 777: it lets any process on the server write to the file, and some PHP setups refuse to run such files.
Upload with FTP
FTP suits large sites and repeated uploads, because an FTP client uploads whole folders and can resume a broken transfer. Create an FTP account in cPanel first.
- In the Files section, click FTP Accounts.
- In Log In, enter a username, for example
deploy, and choose the Domain. - Enter the password in Password and Password (Again), or click Password Generator.
- In Directory, enter
public_htmlso the account can reach the website. cPanel pre-fills a folder named after the new user, and the account cannot go above the folder you set. - Set a Quota or select Unlimited, then click Create FTP Account.
In the FTP Accounts table, click Configure FTP Client next to the account. Its Manual Settings show the exact server, username and port, 21 by default. The username is the full form, such as deploy@example.com.
- For an encrypted connection (FTP over TLS), enter the server’s host name as the server, not your domain. FTP does not support SNI, so cPanel cannot present your domain’s certificate.
- On servers that run Pure-FTPd, a folder listing shows only the first 10,000 files unless your host raises the limit.
- In the Meridian theme that cPanel 138 offers, FTP and SFTP accounts are on the File Transfer Accounts page of the Files hub.
NoteIf FTP Accounts is missing, your host has not enabled FTP for your account. Use File Manager instead.
Common problems
- The default page, or “Index of /”, still shows after the upload.
- The files are in the wrong folder, a placeholder index file is still in
public_html, or the browser shows a cached copy. Make sureindex.htmlorindex.phpsits directly in the domain’s document root, delete the placeholder and reload in a private window. If the domain is new or has just moved, its DNS may still point to the old server. - The site shows “403 Forbidden”.
- The document root has no index file, so the server refuses to list the folder, or the permissions are too strict. Put
index.htmlorindex.phpin the folder itself and set files to644and folders to755. A rule in.htaccesscan also block access. - The files were extracted into a subfolder.
- The zip held the site’s folder rather than its contents, so the site sits in, for example,
public_html/mysite. Turn on Show Hidden Files (dotfiles) in File Manager’s Settings so.htaccessmoves too, open the subfolder, click Select All, then Move, enter/public_htmland click Move File(s). Delete the empty folder afterwards. - The upload stops, or the file is too large.
- A File Manager upload has to fit in your free disk quota, and a large browser upload can fail on a slow connection. Check disk usage on the cPanel home page, free up space, or upload with an FTP client, which can resume.
- The site shows “500 Internal Server Error” after the upload.
- An
.htaccessfile from another host often holds settings this server does not accept. Show hidden files in File Manager, rename.htaccessto test, and check that no PHP file or folder is set to777. - Images or styles are missing.
- File names on the server are case-sensitive, so
Logo.pngandlogo.pngare different files. Links that point tolocalhostor to a folder on your computer also break. Fix the names or the links and reload the page.
Doing it from CTAServer
On cPanel servers connected to CTAServer, the file manager works through cPanel’s own file functions as the hosting account’s user, so files keep the ownership cPanel expects. Only team members with the file manager permission can use it, and every action is written to the audit log.
- You can browse folders, create files and folders, rename, copy and move, change permissions, compress and extract archives, search, and move items to the trash and restore them.
- Text files up to 2 MB can be edited in the browser.
- Uploads can be up to 512 MB each and are sent in 4 MB chunks. An upload does not replace an existing file with the same name.
- Downloads are one file at a time, through a single-use link that expires after 5 minutes. To download a folder, compress it first.
- The File manager button in each hosting account’s Manage drawer opens cPanel’s own File Manager without a password.
- FTP accounts on cPanel servers are not managed from CTAServer. Create and change them in cPanel.
cPanel management with CTAServer The hosting accounts screen The audit log
Frequently asked questions
Which folder do I upload my website to in cPanel?
Upload the main domain’s site to public_html, so that its index.html or index.php sits directly in that folder. Addon domains and subdomains have their own folder, shown in the Document Root column of Domains » Domains.
How do I upload a folder in cPanel File Manager?
cPanel’s File Manager cannot upload a folder. Compress the folder into a zip file on your computer, upload the zip, then select it and click Extract. An FTP client can upload folders directly.
What is the maximum upload size in cPanel File Manager?
File Manager is not limited by PHP’s upload_max_filesize; the file has to fit in the account’s free disk quota. Very large files are more reliable over FTP, because an FTP client can resume a broken transfer.
How do I upload a WordPress site to cPanel?
Upload the WordPress files to the document root with File Manager or FTP, create a database and user in Databases » Database Wizard, and import your .sql export in phpMyAdmin. Then put the new database name, user and password in wp-config.php.
How do I connect to cPanel with FileZilla?
Create an account in Files » FTP Accounts. In FileZilla, enter your domain as the host, the full FTP username such as deploy@example.com, its password and port 21. For an encrypted connection, use the server’s host name as the host instead of your domain.
Can I upload a website to cPanel without FTP?
Yes. Files » File Manager uploads files from the browser, and its Extract action unpacks a zip of the whole site on the server. FTP is only needed for very large sites or if you prefer a desktop client.
Connect your first server today.
Free for 7 days, no card needed. Create your account, add your first server with an API token or an SSH key, and the panel starts filling in a few minutes later.
No setup fee · Cancel anytime · EU-hosted