Where to upload your files
Each domain loads its files from one folder, its document root. Your homepage must sit at the top of that folder, as index.html or index.php, not inside a subfolder.
- Main domain:
public_html. - Addon domain or subdomain: the folder set as its document root. cPanel shows it under Domains. See how to create a subdomain.
How to upload a website with File Manager
The quickest way for most sites. Upload one .zip file rather than many single files. New to it? How to use cPanel File Manager.
- On your computer, compress your site’s files into one .zip file.
- Log in to cPanel and open File Manager.
- Open
public_html, or the domain’s document root. - If the folder already holds a site, back it up first, with Compress in File Manager or cPanel’s Backup tool. Extracting can overwrite files with the same names.
- Click Upload, choose the .zip file and wait for 100%.
- Go back to the folder, right-click the .zip file and choose Extract.
- If the files landed in a subfolder, select them all and move them up one level.
- Delete the .zip file.
- If your homepage is
index.php, rename any oldindex.html, for example toindex-old.html. Otherwise it can load first.
How to upload with FTP or SFTP
Better for large sites and for updating a few files at a time. Which to pick: SFTP vs FTP.
- In cPanel, open FTP Accounts and create an account.
- Set its Directory to
public_html, or the domain’s document root. - Open an FTP client such as FileZilla.
- Choose FTP over TLS if your client offers it, so your password is not sent in plain text.
- Connect with the server name from your welcome email or client area, the full username (
name@yourdomain.com), the password and port21. - Drag your site’s files into the folder, keeping the folder structure.
- Or use SFTP: connect with your cPanel username and password, or an SSH key, on the SSH port given in your welcome email or client area, then open
public_html.
How to create a database in cPanel
WordPress and most PHP apps keep their content in a MySQL database. Skip this for a plain HTML site.
- Open Manage My Databases, called MySQL Databases in older cPanel. The database wizard next to it does the same steps in order.
- Under Create New Database, enter a name and click Create Database. cPanel adds your account name as a prefix, as in
user_site. - Under MySQL Users, add a user with a strong password. Note the full username and the password.
- Under Add User To Database, choose the user and the database, then click Add.
- Tick All Privileges and click Make Changes.
Import the database and update your config
Bring in your data with phpMyAdmin, then point your site at the new database.
- Export the database from your old host as a .sql file.
- In cPanel, open phpMyAdmin and click your new database in the left column.
- Open the Import tab, choose the .sql file and click Import.
- If the import stops on a
CREATE DATABASEline, remove that line and anyUSEline from the file, then import again. - For a large file, compress it as .sql.gz first, or import it over SSH:
mysql -u user_dbuser -p user_site < backup.sql. - WordPress: in
wp-config.php, setDB_NAME,DB_USERandDB_PASSWORDto the new values. SetDB_HOSTtolocalhostunless your host gives another value. - Other apps: change the same values in their config file, such as
.envorconfig.php.
Check your site and file permissions
Open your domain in a browser. If it still shows another site or an error page, the domain may not point to your hosting yet: connect your domain to your hosting. What 755 and 644 mean: file permissions explained.
- Set folders to
755and files to644: in File Manager, select an item and click Permissions. - Over SSH, set them all at once from your home folder:
find public_html -mindepth 1 -type d -exec chmod 755 {} +andfind public_html -type f -exec chmod 644 {} +. - Never use
777. - A file list or 403 Forbidden error usually means there is no index file at the top of the folder, or the permissions are wrong.
- A database error means the name, user or password in the config file does not match cPanel.
Upload it to HostUpIndia
HostUpIndia Web & cPanel Hosting gives you cPanel to upload files and create databases, and terminal (SSH) access for SFTP and large imports. Every plan includes LiteSpeed, NVMe storage, free SSL and daily backups kept 30 days.
From ₹49 a month on 3-year billing. Prices exclude 18% GST.
Moving from another host? The in-house team moves your site for you: free website migration.
