Control Panels

How to Use cPanel File Manager: Upload, Edit, Extract, Permissions and Restore

Short answer: Open cPanel and click Files > File Manager. Your website lives in public_html (addon domains in their own folders). Use Upload to add files, right-click a file to Edit, Extract or change Permissions, and turn on Show Hidden Files in Settings to see .htaccess. Deleted files go to the File Manager trash, where you can restore them.

Open File Manager

  1. Log in to cPanel, directly or from @CustomerPanel.
  2. In the Files section, click File Manager. It opens in a new tab at your home folder.

The left panel shows the folder tree; the right panel shows the files in the selected folder. The toolbar at the top holds the actions.

Know the main folders

Folder What it holds
public_html The main domain’s website. Anything here can be reached from the web.
public_html/subfolder or /home/user/example.net Addon domain and subdomain sites, depending on how they were created.
mail Email messages. Do not edit by hand.
etc Email account settings. Do not edit by hand.
tmp, logs Temporary files and access logs.

Show hidden files

Files that start with a dot, such as .htaccess and .user.ini, are hidden by default. Click Settings at the top right, tick Show Hidden Files (dotfiles) and save.

Upload files

  1. Open the target folder, for example public_html.
  2. Click Upload and drag files into the window, or click Select File.
  3. Wait until each file shows 100%, then go back to the folder.

For many files, upload one ZIP archive and extract it on the server; it is much faster than uploading thousands of small files. For very large transfers, FTP or SFTP is more reliable.

Create, copy, move and rename

Use + File and + Folder in the toolbar to create items. Select one or more items and use Copy, Move or Rename. Copy and Move ask for the destination path, for example /public_html/old.

Edit files

Right-click a file and choose Edit to open the code editor, which highlights HTML, CSS, PHP and JavaScript. Click Save Changes when you are done. Before editing an important file such as wp-config.php or .htaccess, copy it first (for example to .htaccess.bak), so you can undo a mistake quickly.

Compress and extract archives

  • Extract: right-click a ZIP, TAR or GZ file and choose Extract, then pick the folder.
  • Compress: select files or folders, click Compress, choose ZIP or a TAR format, and name the archive.
  • Download an archive by selecting it and clicking Download. Delete archives from public_html afterwards, so nobody else can download them.

Change permissions

Select a file or folder and click Permissions. Use 755 for folders and 644 for files; never 777. See our file permissions guide for details.

Delete and restore files

When you delete, File Manager offers to move items to the trash, unless you tick Skip the trash and permanently delete. To get a file back, click View Trash, select it and click Restore. Items in the trash still count towards your disk space, so empty it when you are sure.

The search box at the top right finds files by name in your home folder, public_html or the current folder. It is useful for finding a configuration file or a suspicious file name after a hack.

Common problems

Problem Likely cause Fix
Upload stops part way The file is very large, or the connection dropped Upload a ZIP in smaller parts, or use SFTP.
Cannot edit or delete a file The file belongs to another user, for example root Ask support to fix the ownership.
Site shows a 500 error after an edit A typing mistake in .htaccess or PHP Restore your copy of the file.

File Manager or FTP?

Task Best tool
Quick edits and small uploads File Manager
Extracting an uploaded archive File Manager
Uploading thousands of files or very large files SFTP or FTP
Scripted or regular transfers SFTP, rsync or Git over SSH

Need help with this?

Hosting with an easy File Manager, free SSL and daily backups.

See web hosting plansContact @CustomerPanel

Frequently asked questions

Where is my website in File Manager?

In public_html for the main domain. Addon domains have their own folders, shown in cPanel’s Domains page.

How do I see .htaccess in File Manager?

Click Settings and tick Show Hidden Files (dotfiles).

Can I restore a file I deleted?

Yes, if it went to the trash. Click View Trash, select the file and click Restore. Older deletions need a backup restore.

What is the upload size limit?

It depends on your plan and the browser. For very large files, use SFTP or FTP instead.

Is it safe to edit files in File Manager?

Yes, but copy important files first so you can undo mistakes.


Sources