
This guide provides detailed instructions for uploading a static website (HTML, CSS, JavaScript, and other static files) to cPanel using File Manager, including specific steps for main domains, subdomains, and subdirectories.
Prerequisites
- A hosting account with cPanel access, including login credentials (username and password).
- Static website files prepared on your local computer, organized in a folder with an
index.html
file as the homepage. Validate your HTML code using an online validator to check for errors.
- Compress files into a ZIP archive for faster uploads if you have many files.
- A web browser to access cPanel.
- For subdomains or subdirectories, ensure they are set up in cPanel (see Step 3 for details).
Note: File Manager is suitable for small to medium uploads. For large sites, consider using an FTP client like FileZilla for efficiency.
Step 1: Log In to cPanel
- Open your web browser and navigate to your cPanel login URL (e.g.,
https://yourdomain.com/cpanel
or https://yourserverip:2083
).
- Enter your cPanel username and password.
- Click “Login” to access the cPanel dashboard.
- You can easily login via your telaHosting’s client area.
Step 2: Access the File Manager
- In the cPanel dashboard, locate the “Files” section.
- Click the “File Manager” icon to open the File Manager interface.
- If prompted, select the directory to open (e.g., Web Root or
public_html
). By default, it opens in your home directory.
Tip: To view hidden files (e.g., .htaccess
), click “Settings” in the top-right corner of File Manager, check “Show Hidden Files (dotfiles),” and save.
Step 3: Set Up and Navigate to the Appropriate Directory
-
For Main Domain:
- Navigate to the
public_html
folder in the File Manager’s left sidebar.
- Double-click to open it. This is where your main website files will reside (e.g.,
https://yourdomain.com
).
-
For Subdomain:
- First, ensure the subdomain is created:
- In the cPanel dashboard, go to the “Domains” section and click “Subdomains.”
- Enter the subdomain name (e.g.,
sub
for sub.yourdomain.com
).
- Specify the document root (e.g.,
public_html/subdomain_folder
) or accept the default.
- Click “Create.” This creates a folder (e.g.,
public_html/subdomain_folder
).
- In File Manager, navigate to the subdomainβs folder (e.g.,
public_html/subdomain_folder
).
- Double-click to open it.
-
For Subdirectory:
- Decide the subdirectory path (e.g.,
public_html/blog
for yourdomain.com/blog
).
- In File Manager, navigate to
public_html
(or the parent directory).
- Click “+ Folder” in the top menu, enter the folder name (e.g.,
blog
), and create it.
- Double-click the new folder to open it.
Note: Subdomains require DNS propagation (up to 24 hours), but files can be uploaded immediately. Subdirectories are accessible instantly upon creation as long as the main domain is propagated already.
Step 4: Upload Your Website Files
- In the top menu of File Manager, click “Upload.”
- On the upload page, drag and drop your files from your local computer, or click “Select File” to browse and choose files.
- If uploading a ZIP file:
- Upload the ZIP archive.
- Return to the directory, right-click the ZIP file (or select it and click “Extract” from the top menu).
- Confirm the extraction path (usually the current directory) and extract the files.
- Wait for the upload to complete. A progress bar and confirmation message will appear.
Tip: Ensure the index.html
file is in the root of the target directory (e.g., public_html
for main domain, public_html/subdomain_folder
for subdomain, or public_html/blog
for subdirectory). You can upload multiple files at once.
Step 5: Configure Domain/Subdomain Settings (If Needed)
- For Subdomains:
- Verify the subdomain setup in cPanelβs “Subdomains” section.
- Ensure the document root matches the folder where you uploaded files (e.g.,
public_html/subdomain_folder
).
- Save any changes.
- For Subdirectories:
- No additional configuration is needed unless youβre using custom URL rewriting (e.g., via
.htaccess
for clean URLs).
- These steps ensure your website points to the correct directory.
Step 6: Verify and Test Your Website
- Open a new browser tab and visit the appropriate URL:
- Main domain:
https://yourdomain.com
- Subdomain:
https://sub.yourdomain.com
- Subdirectory:
https://yourdomain.com/subdirectory
(e.g., yourdomain.com/blog
)
- Your static website should load. If it doesnβt, troubleshoot:
- Verify file permissions (644 for files, 755 for directoriesβright-click in File Manager and select “Change Permissions”).
- Ensure
index.html
is present and correctly named (case-sensitive).
- Clear browser cache or use incognito mode.
- For subdomains, wait for DNS propagation if recently created.
- Check server error logs in cPanel for debugging if issues persist.
Additional Tips
- Security: Remove sensitive files (e.g., ZIP archives) from public directories after extraction.
- Updates: To update files, re-upload only the changed files to the same directory.
- File Organization: Maintain a clean folder structure to avoid conflicts (e.g., separate subdomains and subdirectories clearly).
- Alternatives: For frequent or large uploads, consider FTP for faster transfers.
This guide ensures your static website is successfully uploaded to your main domain, subdomain, or subdirectory via cPanelβs File Manager.
Need help? Our friendly support team is always here for you! Reach out below.
HappyΒ hosting!Β π