cPanel's File Manager is one of the most frequently used tools in the entire control panel. It gives you a full-featured, browser-based file explorer that lets you manage every file on your hosting account without installing FTP software, configuring SSH keys, or learning command-line operations.
In this guide, we'll walk through everything you need to know about cPanel File Manager: uploading files, editing code, managing permissions, working with hidden files, and organizing your website's directory structure like a pro.
Accessing File Manager
To open File Manager, log into your cPanel dashboard and either:
- Click the File Manager icon in the Files section
- Type "file" in the search bar and click File Manager
File Manager opens in a new browser tab showing your home directory. The default view includes:
- Left sidebar: Directory tree for quick navigation
- Main area: Contents of the currently selected directory
- Toolbar: Action buttons (Upload, Download, Delete, Rename, Edit, etc.)
- Bottom bar: Selected file count and size information
Understanding the Directory Structure
Your cPanel account's file structure follows a standard layout. Here are the key directories:
| Directory | Purpose |
|---|---|
public_html | Your main website's document root. Files here are accessible at yourdomain.com |
public_html/subdomain | Subdomains are typically created as subdirectories within public_html |
mail | Email storage for your email accounts |
logs | Access and error log files |
tmp | Temporary files used by applications |
etc | Account configuration files |
.trash | Deleted files (recoverable until emptied) |
When you add addon domains through cPanel, each gets its own directory (either inside or outside public_html, depending on your configuration).
Uploading Files
Uploading Individual Files
- Navigate to the destination directory in File Manager
- Click the Upload button in the toolbar
- A new tab opens with a drag-and-drop upload interface
- Drag files onto the upload area, or click Select File to browse
- Files upload immediately. Close the upload tab when finished.
- Return to File Manager and click Reload to see the uploaded files
Uploading Multiple Files and Folders
For large uploads, the drag-and-drop interface handles multiple files simultaneously. However, there are practical limits:
- File size limit: Typically 256 MB to 1 GB per file (set by your hosting provider)
- For large transfers: Upload a ZIP archive and extract it on the server (much faster than uploading many individual files)
- For very large sites: Use SFTP/FTP instead of the browser uploader for transfers over 500 MB
Uploading and Extracting ZIP Files
This is the recommended approach for uploading entire websites or large file sets:
- Compress your files into a ZIP archive on your local computer
- Upload the ZIP file to the target directory in File Manager
- Right-click the ZIP file and select Extract
- Choose the extraction destination (usually the current directory)
- Click Extract Files
- Delete the ZIP file after extraction to save disk space
Uploading a single ZIP file and extracting it on the server is 5-10x faster than uploading thousands of individual files. This is especially true on MassiveGRID's high-availability cPanel hosting where NVMe storage makes server-side extraction nearly instantaneous.
Editing Files
File Manager includes a built-in code editor that supports syntax highlighting for HTML, CSS, JavaScript, PHP, and other languages.
How to Edit a File
- Select the file you want to edit
- Click Edit in the toolbar (or right-click and select Edit)
- Choose the character encoding (UTF-8 is correct for nearly all web files)
- The file opens in a code editor with line numbers and syntax highlighting
- Make your changes
- Click Save Changes in the top-right corner
Common Files You'll Edit
.htaccess: Apache configuration for redirects, caching, security ruleswp-config.php: WordPress configuration (database credentials, salts, debug mode)php.inior.user.ini: PHP configuration overridesrobots.txt: Search engine crawling directives- HTML, CSS, and JavaScript files for direct site edits
The HTML Editor
For HTML files, File Manager also offers an HTML Editor (WYSIWYG) option that provides a visual editing interface similar to a word processor. This is useful for quick content changes but not recommended for complex HTML or files containing PHP code.
Managing File Permissions
File permissions control who can read, write, and execute files on the server. They're represented as a three-digit number (e.g., 644, 755):
| Permission | Files | Directories |
|---|---|---|
644 | Standard for most files (owner can read/write, others can read) | Not typically used for directories |
755 | Executable scripts (owner can read/write/execute, others can read/execute) | Standard for most directories |
600 | Private files (only owner can read/write) | Not typically used |
750 | Restricted executable | Restricted directory access |
777 | AVOID -- everyone can read/write/execute (security risk) | AVOID -- serious security vulnerability |
How to Change Permissions
- Right-click the file or directory
- Select Change Permissions
- Check or uncheck the permission boxes, or type the numeric value directly
- Click Change Permissions to apply
Important: Never set files or directories to 777. This is a common but dangerous suggestion found in outdated tutorials. If an application needs write access, use 755 for directories and 644 for files. If a specific file needs to be writable by the web server, 664 or 666 is the maximum you should consider, and only for that specific file.
Working with Hidden Files
Files and directories that start with a dot (like .htaccess, .user.ini, and .well-known) are hidden by default in File Manager. To show them:
- Click the Settings button in the top-right corner of File Manager
- Check Show Hidden Files (dotfiles)
- Click Save
This setting persists between sessions. You should enable it, as .htaccess is one of the most frequently edited files in web hosting.
Moving, Copying, and Renaming Files
Moving Files
- Select the file(s) you want to move
- Click Move in the toolbar
- Enter the destination path (e.g.,
/public_html/blog/) - Click Move Files
Copying Files
Same process as moving, but click Copy instead. This creates a duplicate in the destination while keeping the original in place.
Renaming Files
Right-click the file and select Rename, or select the file and click Rename in the toolbar. Type the new name and press Enter.
Bulk Operations
To select multiple files:
- Ctrl+Click to select individual files
- Shift+Click to select a range
- Select All in the toolbar to select everything in the current directory
Once selected, you can move, copy, delete, or compress all selected files at once.
Compressing and Extracting Files
Creating Archives
- Select the files and/or directories you want to compress
- Click Compress in the toolbar
- Choose the compression type (Zip is most universally compatible, Gzip is more compact)
- Enter a name for the archive
- Click Compress Files
Extracting Archives
- Select the archive file (ZIP, GZ, BZ2, or TAR)
- Click Extract in the toolbar
- Confirm the extraction directory
- Click Extract Files
Extraction supports ZIP, GZ, BZ2, TAR, TAR.GZ, and TAR.BZ2 formats.
Practical Tips and Best Practices
Before Making Changes
- Always create a backup of a file before editing it. Right-click, select Copy, and save it as
filename.bakin the same directory. - Download important files before making major changes. Select the file and click Download to save a local copy.
Performance Tips
- Don't store unnecessary files in public_html. Backup archives, development files, and old site versions consume disk space and can be security risks.
- Clean up regularly. Check the
tmpdirectory, old backups, and error logs that can grow large over time. - Use .htaccess for caching. Adding browser caching rules in .htaccess can significantly improve your site's loading speed.
Security Tips
- Check permissions periodically. After installing or updating applications, verify that sensitive files (like wp-config.php) have restrictive permissions (600 or 640).
- Remove installation files. After installing applications manually, delete any installer or setup files that remain.
- Review .htaccess after any unexpected behavior. Corrupted or incorrectly modified .htaccess files are a common cause of 500 errors.
File Manager is your daily workhorse for hosting management. Once you're comfortable with it, explore the other essential tools covered in our 15 cPanel features guide. For WordPress-specific file management tips, see our guide on installing WordPress through Softaculous and optimizing cPanel settings for WordPress performance.
Frequently Asked Questions
Is File Manager a replacement for FTP?
For most tasks, yes. File Manager can do everything an FTP client can do, plus it offers built-in file editing and archive extraction. FTP still has advantages for very large transfers (multi-GB) and automated sync operations, but for day-to-day management, File Manager is faster and more convenient since it requires no software installation.
What's the maximum file size I can upload through File Manager?
The upload limit depends on your hosting provider's PHP and web server configuration, typically ranging from 256 MB to 1 GB. For files larger than the limit, use FTP/SFTP or upload a compressed archive in parts. You can check your limit in cPanel's MultiPHP INI Editor by looking at the upload_max_filesize value.
I accidentally deleted an important file. Can I recover it?
Check the .trash directory in your home folder -- File Manager moves deleted files there by default (similar to your computer's recycle bin). If the file isn't in trash, check with your hosting provider about backup restoration. MassiveGRID's cPanel hosting includes automated backups, so your provider's support team can typically restore deleted files from a recent backup.
Can I edit PHP files directly in File Manager?
Yes, File Manager's code editor supports PHP syntax highlighting and editing. However, be cautious -- a syntax error in a PHP file can take your entire site offline. Always create a backup copy of the file before making changes, and test your changes by loading your site immediately after saving.
How do I upload a file to a specific subdomain's directory?
Navigate to the subdomain's document root in File Manager before uploading. Subdomains typically have their own directories inside public_html (e.g., public_html/blog for blog.yourdomain.com). You can find the exact path by checking the Subdomains section in cPanel, which shows each subdomain's document root.