The cPanel File Manager is often overlooked by site owners who default to FTP or SFTP clients, but it can handle most day-to-day file operations without any additional software. Whether you need to upload a plugin, edit a configuration file, fix permission errors, or restore a backup, the File Manager provides a browser-based interface that works anywhere you have internet access. This guide walks through every feature you need to know, from basic navigation to advanced operations like bulk permission fixes and compressed archive handling.
Accessing the File Manager and Understanding the Interface
To open the File Manager, log into cPanel and scroll to the Files section. Click the File Manager icon. A dialog box will prompt you to select a directory root — for most tasks, choose Document Root for and select your primary domain. This takes you directly to the public_html folder for that domain.
The interface is divided into two panes. The left pane shows the directory tree, and the right pane shows the contents of the currently selected folder. The toolbar along the top provides quick access to common operations:
- New Folder — Create directories within your account
- New File — Create empty files (useful for
index.html,robots.txt, etc.) - Upload — Upload files from your local machine
- Copy / Move — Duplicate or relocate files and folders
- Rename — Rename selected items
- Download — Download files or compressed folders
- Delete — Remove selected items (with trash support)
- Restore — Recover deleted files from the trash
- Extract / Compress — Handle
.zip,.tar.gz, and other archive formats - View — Preview file contents without leaving the interface
- Edit — Modify file contents using the built-in text editor
- Change Permissions — Adjust file or directory permissions
File Manager settings can be toggled on the top-right: Show Hidden Files (dotfiles) and Sort By (name, size, type, or date).
Uploading and Managing Files
Uploading Files
Click the Upload button in the toolbar. A new browser tab or overlay opens with a drag-and-drop zone. You can drag files directly from your desktop or click Select File to browse. There is no file size limit in the uploader itself, but your hosting provider may enforce PHP upload_max_filesize and post_max_size limits on the server.
After uploading, navigate back to the File Manager tab and refresh the directory. Uploaded files will appear with the permissions inherited from the destination folder — typically 0644 for files and 0755 for directories created through the interface.
Copying, Moving, and Renaming
Select a file or folder by clicking it, then use the toolbar buttons:
- Copy — Opens a dialog where you specify the destination path. You can also rename the copy during the operation.
- Move — Similar to Copy, but removes the original after the transfer.
- Rename — Inline editing: the filename becomes editable so you can type a new name and press Enter.
For bulk operations, hold Ctrl (Windows/Linux) or Cmd (Mac) while clicking multiple items, then apply Copy, Move, or Delete to all selected items at once.
Deleting and Restoring Files
Deleting a file through the File Manager sends it to the Trash by default. To delete permanently without trashing, uncheck “Send to Trash” in the confirmation dialog. Trashed files can be restored via the Restore button or the Trash folder in the directory tree.
Files in the trash are retained for a period set by your hosting provider (typically 7 to 30 days) before automatic permanent removal.
Editing Files Directly in the Browser
The built-in editor is one of the most practical features in the File Manager. Select a file and click Edit in the toolbar. A dialog appears asking you to confirm the encoding (UTF-8 is the correct choice for virtually all web files) and the line-ending style.
The editor provides:
- Syntax highlighting — Automatically detects PHP, HTML, CSS, JavaScript, and plain text. Colors make it easy to spot syntax errors.
- Line numbers — Helpful when debugging error messages that reference a specific line number.
- Search and Replace — Find text within the file and optionally replace occurrences.
- Undo / Redo — Revert accidental changes.
After editing, click Save Changes. If another user modified the file since you opened it, the editor warns you about the conflict. This is a common issue when multiple people manage the same site.
When to Use Edit vs. View
| Scenario | Best Tool |
|---|---|
| Check the contents of a file | View (read-only, faster) |
Modify wp-config.php | Edit (requires save) |
Update .htaccess rules | Edit |
| Inspect an error log | View (no accidental changes) |
| Tweak a PHP settings file | Edit |
Changing File Permissions
Wrong file permissions are a common cause of 500 Internal Server Error, blank white screens, and “Permission denied” messages in error logs. Here is the standard permission scheme for a typical web hosting environment:
- Directories:
0755— Owner can read, write, and execute; group and others can read and execute - Files:
0644— Owner can read and write; group and others can read only - Executable scripts (CGI/PHP):
0755— Owner can read, write, and execute - Configuration files with secrets:
0600or0640— Restrict group and world access
To change permissions, select a file or folder and click Change Permissions. You can adjust permissions using checkboxes (read, write, execute for owner/group/world) or type the octal value directly (e.g., 644 or 755). The Apply to subdirectories option recursively applies the change — use this with caution because it can break functionality if set incorrectly.
One-Liner for Mass Permission Fixes
If you need to fix permissions across an entire site, the File Manager can handle directory-level changes, but a shell command via SSH or the cPanel Terminal is faster for large sites:
find /home/username/public_html -type d -exec chmod 755 {} \; find /home/username/public_html -type f -exec chmod 644 {} \;
Replace username with your cPanel username. If you do not have SSH access, use the File Manager’s Change Permissions button on individual folders.
Working with Archives: Compress and Extract
The File Manager natively supports compressed archives, which is useful for installing CMS platforms, moving large sets of files, or creating quick backups.
Compressing Files
- Select the files or folders you want to compress.
- Click Compress in the toolbar.
- Choose the archive type:
- Zip Archive — Most compatible with Windows and macOS. Best for general use.
- gzipped tar archive (.tar.gz) — Common in Linux environments. Preserves Unix permissions better than Zip.
- bzip2 compressed tar archive (.tar.bz2) — Smaller file sizes but slower compression.
- The archive is created in the same directory as the selected items.
Extracting Archives
- Upload the archive file if it isn’t already in your account (use the Upload button).
- Select the archive file and click Extract.
- Confirm the destination path (default is the current directory).
- Choose whether to show extracted files (recommended for verification).
Common gotcha: Zip files created on Windows sometimes use backslashes as path separators. If extraction fails, try re-zipping on the server itself or use a .tar.gz archive instead.
Viewing and Restoring Hidden Files
By default, the File Manager hides dotfiles — files whose names begin with a period, such as .htaccess, .user.ini, .gitignore, or .env. To see these, click the Settings button in the top-right corner of the File Manager window and enable Show Hidden Files (dotfiles).
Important Hidden Files You Might Need
- .htaccess — Apache configuration for URL rewriting, password protection, redirects, and caching rules
- .user.ini — PHP configuration overrides at the directory level
- .gitignore — Files that Git should ignore (only present if you are working with a repository)
- .env — Environment variables often used by Laravel and other modern PHP frameworks
- .well-known/ — Directory used by Let’s Encrypt for domain validation
If you accidentally delete .htaccess, WordPress sites may display a 404 Not Found error on all pages except the homepage. You can restore it by creating a new file named .htaccess in the site root with the default WordPress rules, then regenerating permalinks from the WordPress admin dashboard.
Key Takeaways
- The cPanel File Manager handles file uploads, edits, permission changes, and archive operations without any external tools
- Always check hidden files (dotfiles) before troubleshooting — the
.htaccessfile is a common source of site errors - Use 0644 for files and 0755 for directories as the standard permission baseline across a web hosting account
- The built-in editor includes syntax highlighting, line numbers, search-and-replace, and conflict detection for collaborative environments
- Archives created on Windows may fail to extract on Linux; use the server-side Compress feature to create compatible Zip or tar.gz files
- Deleted files go to the Trash by default, giving you a grace period to recover accidentally removed content