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.
Open File Manager
- Log in to cPanel from the UnderHost CustomerPanel or your cPanel service details.
- Open Files and click File Manager.
- If prompted, open your home directory or web root.
- 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.
| Folder | What it is for | Be careful with |
|---|---|---|
public_html/ | Main domain website files. | Your homepage must usually be index.php or index.html here. |
| Addon-domain document root | The 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. |
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
- Navigate to the destination folder, usually
public_htmlor the addon-domain document root. - Click Upload in the top toolbar.
- Drag files into the upload window or click Select File.
- Wait until each upload reaches 100%.
- 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.
- Navigate to the parent folder where the new item should live.
- Click + Folder or + File.
- Enter the name, including the extension for files, such as
index.html,robots.txt, or.htaccess. - 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.htmlfile 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.
- Select the file.
- Click Edit in the toolbar or right-click and choose Edit.
- If cPanel asks about encoding, keep the default unless you know the file uses a different encoding.
- Make the change and click Save Changes.
- Test the website immediately after saving.
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
| Task | How to do it | Important note |
|---|---|---|
| Rename | Select the item, click Rename, enter the new name. | Files need the correct extension, such as .php or .html. |
| Copy | Select the item, click Copy, enter the destination path. | Useful before editing or replacing a file. |
| Move | Select the item, click Move, enter the destination path. | Moving website files can break URLs if paths change. |
| Search | Use 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.
- Select the file or folder.
- Click Permissions or right-click and choose Change Permissions.
- Set the numeric value or checkbox combination.
- Save and test the site.
| Item type | Typical permission | Notes |
|---|---|---|
| Directories | 755 | Folders need execute permission so the web server can enter them. |
| Website files | 644 | Good default for HTML, CSS, JS, PHP, and images. |
| Sensitive config files | 600 or 640 | Use where supported for files such as wp-config.php. |
| CGI scripts | 755 | Only 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.
- Select the file or folder.
- Click Delete or right-click and choose Delete.
- Leave Skip the trash and permanently delete the files unchecked if you may need to restore the item.
- Confirm the deletion.
Restore from Trash
- Click View Trash in File Manager.
- Select the file or folder.
- Click Restore.
- 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
| Symptom | What to check in File Manager |
|---|---|
| Website shows default page | Files may be in the wrong folder; confirm the domain document root. |
| 403 Forbidden | Check for missing index file, wrong permissions, or restrictive .htaccess rules. |
| 404 Not Found | Confirm the file name and extension exactly match the URL. |
| 500 Internal Server Error | Undo recent edits to PHP or .htaccess, then check error logs. |
| Hidden files missing | Open Settings and enable Show Hidden Files. |
| Disk space full | Look 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
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.





















