New Customers: 50% OFF Your First Month on All VPS Servers & Web Hosting Plans!

How to upload the Index file to your site using FileZilla?

This guide walks you through connecting to your Hostworld cPanel hosting with FileZilla using secure FTPS, locating your domain's document root, and uploading your index file. You will learn how to back up existing files and test the upload to avoid breaking your site.

HostworldWeb hosting & cPanel 4 min read Updated 23 Sep 2026

Connect to your Hostworld cPanel hosting with FileZilla using FTPS, then upload your index file into the domain’s document root. For the primary domain that is usually public_html. Make a quick backup of any existing index.* first so you can undo the change.

Before you start

  • Your cPanel login, or an FTP account you created in cPanel.
  • FileZilla installed.
  • The correct document root for the domain you are updating.

Step 1: Confirm the domain’s document root in cPanel

This avoids uploading to the wrong place.

  1. Log in to cPanel, then open Domains.
  2. Find your domain, note the value shown for Document Root. The primary domain is typically public_html. Addon domains and subdomains have their own roots.
  3. Keep this path handy, you will browse to it in FileZilla.

Undo: If you already uploaded to the wrong folder, use FileZilla’s Remote site pane to delete or move the file, then re-upload into the correct document root.

Step 2: Connect with FileZilla using FTPS

This creates a secure connection. Use explicit FTP over TLS on port 21.

Quickconnect

  1. In FileZilla, enter Host: your domain name or the server hostname shown in cPanel. Username: your cPanel or FTP username. Password: your password. Port: 21.
  2. Set Encryption to Require explicit FTP over TLS. Older FileZilla builds may call this Use explicit FTP over TLS if available or FTPES.
  3. Click Quickconnect. If prompted about a certificate, review and Accept.

Site Manager

  1. File, Site Manager, New Site.
  2. Protocol: FTP. Encryption: Require explicit FTP over TLS. Logon Type: Normal. Enter Host, User and Password. Port: 21.
  3. Click Connect, then OK to save for next time.

Passive mode is recommended. You can check this under Edit, Settings, FTP, Passive mode.

Undo: Connected with the wrong details. Click Server, Disconnect, correct the settings, then reconnect. To remove saved credentials, delete the entry in Site Manager.

Step 3: Back up the current index and upload the new one

  1. In FileZilla, browse the Remote site to the document root you noted in Step 1, for example /public_html/.
  2. If you see an existing index.html, index.php or similar, right click and Download it to your computer. Optionally right click and Rename the server copy to index-backup-YYYYMMDD.ext so you can restore fast.
  3. Drag your new index file from the Local site to the Remote site. Leave Transfer type set to Auto. If FileZilla shows Target file already exists, pick Rename to keep both or Overwrite only if you intend to replace the live file.
  4. Test in a browser. Use the exact filename case. Linux is case sensitive, so index.html is not the same as Index.html.

Important for WordPress: The root index.php is the front end entry point. Replacing or removing it will break the site. Do not overwrite WordPress’s index.php. If you did, restore the backup copy you downloaded in step 3.

Undo: To roll back, delete your new file on the server and rename your backup back to index.html or index.php. If you overwrote without a backup, upload your previous local copy. For WordPress, restore the original index.php from your backup or from a clean download of the same WordPress version.

If it does not work

  • Wrong page or a directory listing shows. Confirm the folder in cPanel’s Domains matches where you uploaded. Ensure the filename is exactly index.html or index.php. If both exist, Apache serves according to the configured DirectoryIndex order. You can control this by adding a line like the following at the top of .htaccess in the document root:
    DirectoryIndex index.html index.php
    Also check permissions. Files should be 644 and folders 755.
  • Cannot connect or transfers time out. Use Encryption: Require explicit FTP over TLS on port 21, not plain FTP. Ensure Passive mode is on. Recheck host, username and password. If it still fails, open a support ticket and include the exact error from FileZilla’s message log.
  • WordPress site went blank or 500 error. You likely replaced index.php. Restore your backup of index.php, or upload the original file from a clean WordPress download of the same version. If unsure, open a support ticket.

What next

If you run your site on a Hostworld VPS and prefer SFTP or SSH based workflows, see our VPS guides. If you want us to check your document root or index file order, open a support ticket and we will review it with you.

Common questions

What is the document root and why does it matter?

The document root is the folder on your server where your website files should be uploaded. For your primary domain on cPanel hosting, this is usually public_html. Uploading to the wrong folder means your site will not display correctly.

Should I use FTP or FTPS to connect?

Use FTPS (explicit FTP over TLS on port 21) for a secure connection. Plain FTP sends your credentials unencrypted and should be avoided.

What if I accidentally replace my WordPress index.php?

Restore the backup copy you downloaded before uploading, or upload the original index.php from a clean download of the same WordPress version. Do not overwrite WordPress's index.php as it is the entry point for the front end.

Why does my site show a directory listing instead of my index file?

Either you uploaded to the wrong folder, or the filename does not match exactly (index.html and Index.html are different on Linux). Confirm the document root in cPanel matches where you uploaded, and check that the filename is correct.

Was this article helpful?