UnderHost
Knowledgebase Docs

cPanel File Manager: upload, edit, and organize

Use cPanel File Manager to manage website files in the browser: upload files, create folders, edit code, rename items, set permissions, use Trash,

On this page

cPanel File Manager lets you manage hosting files directly from your browser. It is best for quick tasks such as uploading a small site, editing .htaccess, checking public_html, creating folders, changing permissions, and restoring items from Trash. For large s or thousands of files, SFTP is usually faster and more reliable.

Current cPanel note: older WHMCS articles mention legacy toolbar names and older navigation. Current cPanel versions use a modern toolbar and right-click menu, but the file-management concepts are the same.

Open File Manager

  1. Log in to cPanel from the UnderHost CustomerPanel or your cPanel service details.
  2. Open Files and click File Manager.
  3. If prompted, open your home directory or web root.
  4. Use the left folder tree, the breadcrumb path, or the search box to navigate.

Find the right folder

Most website problems after an upload come from placing files in the wrong directory. Use this table before moving or deleting anything.

FolderWhat it is forBe careful with
public_html/Main domain website files.Your homepage must usually be index.php or index.html here.
Addon-domain document rootThe folder assigned to an extra domain in cPanel Domains.Check the domain's document root before uploading files.
public_html/wp-content/WordPress themes, plugins, and uploads.Do not delete uploads unless you have a backup.
mail/Mailbox storage.Do not edit or delete manually unless support instructs you.
logs/ or tmp/Logs and temporary files.Useful for troubleshooting, but not where website files belong.
Do not upload your whole site inside an extra folder by mistake

If your site files are inside public_html/my-site/index.html, visitors to the main domain may see a 403, 404, or default page. The site's entry file usually needs to be directly inside the domain's document root.

Upload files

  1. Navigate to the destination folder, usually public_html or the addon-domain document root.
  2. Click Upload in the top toolbar.
  3. Drag files into the upload window or click Select File.
  4. Wait until each upload reaches 100%.
  5. Return to File Manager and click Reload if the file list has not refreshed.

If you need to upload many files, compress them into a ZIP archive first, upload the single archive, then extract it with File Manager. See file compression and extraction in cPanel.

Create files and folders

Folders keep site files organized. Common examples include images, css, js, downloads, or a staging folder.

  1. Navigate to the parent folder where the new item should live.
  2. Click + Folder or + File.
  3. Enter the name, including the extension for files, such as index.html, robots.txt, or .htaccess.
  4. Confirm the path and click Create New Folder or Create New File.
  • Use lowercase names without spaces when possible.
  • Use hyphens instead of spaces, for example privacy-policy.html.
  • Create a small index.html file in public folders if you need to prevent directory listings.

Edit files safely

File Manager can edit text-based files such as HTML, CSS, JavaScript, PHP, .htaccess, robots.txt, and configuration files.

  1. Select the file.
  2. Click Edit in the toolbar or right-click and choose Edit.
  3. If cPanel asks about encoding, keep the default unless you know the file uses a different encoding.
  4. Make the change and click Save Changes.
  5. Test the website immediately after saving.
Copy critical files before editing

Before editing .htaccess, wp-config.php, theme files, or PHP scripts, right-click the file and choose Copy. A quick copy can save a broken site if the edit causes an error.

Rename, copy, move

TaskHow to do itImportant note
RenameSelect the item, click Rename, enter the new name.Files need the correct extension, such as .php or .html.
CopySelect the item, click Copy, enter the destination path.Useful before editing or replacing a file.
MoveSelect the item, click Move, enter the destination path.Moving website files can break URLs if paths change.
SearchUse the search field in File Manager.Helpful for finding .htaccess, config files, or large archives.

Permissions

Permissions control who can read, write, or execute a file. Incorrect permissions can cause 403 errors, broken uploads, or security exposure.

  1. Select the file or folder.
  2. Click Permissions or right-click and choose Change Permissions.
  3. Set the numeric value or checkbox combination.
  4. Save and test the site.
Item typeTypical permissionNotes
Directories755Folders need execute permission so the web server can enter them.
Website files644Good default for HTML, CSS, JS, PHP, and images.
Sensitive config files600 or 640Use where supported for files such as wp-config.php.
CGI scripts755Only when you intentionally run CGI scripts.

Avoid 777. It allows broad write access and can expose the account to security issues. See Linux file permissions explained for web hosting for more detail.

Delete and restore files

File Manager can move deleted items to Trash, but Trash is not a backup system. If you skip Trash or empty Trash, recovery depends on available backups.

  1. Select the file or folder.
  2. Click Delete or right-click and choose Delete.
  3. Leave Skip the trash and permanently delete the files unchecked if you may need to restore the item.
  4. Confirm the deletion.

Restore from Trash

  1. Click View Trash in File Manager.
  2. Select the file or folder.
  3. Click Restore.
  4. Confirm the restored path, then test the site.

Empty Trash

Only empty Trash after confirming nothing inside is needed. Emptying Trash permanently removes those items from the account. For accidental deletion after Trash has been emptied, check your available backups or contact support quickly.

Troubleshooting checklist

SymptomWhat to check in File Manager
Website shows default pageFiles may be in the wrong folder; confirm the domain document root.
403 ForbiddenCheck for missing index file, wrong permissions, or restrictive .htaccess rules.
404 Not FoundConfirm the file name and extension exactly match the URL.
500 Internal Server ErrorUndo recent edits to PHP or .htaccess, then check error logs.
Hidden files missingOpen Settings and enable Show Hidden Files.
Disk space fullLook for old backups, ZIP archives, logs, and large uploads before deleting anything important.

Related: Upload your website | FTP and SFTP access | Compress and extract files

Was this article helpful?

Need cPanel hosting or licensing?

Use UnderHost cPanel hosting or add cPanel/WHM to a VPS or dedicated server for familiar website, email, DNS, and database management.

Related articles

Back to cPanel