How to Use cPanel's File Manager: An In-Depth Guide
Important: For more intricate details, consult the official documentation on cPanel's website here. For personalized assistance, refer to our knowledge base at www.domainindia.com/knowledgebase or submit a support ticket.
Introduction
The File Manager within cPanel offers an intuitive way to manage files and directories for your website, bypassing the need for FTP clients. Although it doesn't offer the full suite of features that specialized FTP tools offer, it is an invaluable tool for quick file operations.
Pre-requisites:
- Access to cPanel with File Manager permissions
- Basic understanding of file and directory structures on Linux-based systems
Opening File Manager
- Log in to your cPanel dashboard.
- Locate the
File Manager
icon under theFiles
section and click it. - You'll be greeted with the File Manager interface, displaying the directory structure on the left and file details on the right.
Navigation Tips:
- Open Folder: Click the folder icon.
- Go Up One Level: Use the 'Up one level' link.
- Path Navigation: Utilize the breadcrumb trail at the top for quick navigation.
File and Directory Operations
Creating a New Folder
- Navigate to the location where you want to create the folder.
- Click on
+ Folder
at the top-left corner. - Enter the folder name and click
Create
.
Uploading Files
- Navigate to the desired directory.
- Click the
Upload
button. - Drag and drop files or click
Select File
to choose files from your computer. - (Optional) Check
Overwrite existing files
if needed.
Advanced Tip:
For bulk uploads or automated tasks, consider using FTP/SFTP for better efficiency and control.
Creating a New File
- Navigate to the location where the new file will reside.
- Click on
+ File
. - Enter the name with the correct extension (e.g.,
script.php
for a PHP file).
Pro Tip:
For files like Perl and Shell scripts, ensure the Shebang line (#!
) is correct.
Editing a File
- Navigate to the file.
- Select it and click
Edit
orCode Edit
for a syntax-highlighted interface.
Renaming Files or Folders
- Right-click on the file or folder and choose
Rename
. - Update the name and press
Enter
.
File and Directory Permissions on Linux
Understanding file permissions on a UNIX-based system is crucial for web security.
Read (r)
: File can be read.Write (w)
: File can be modified.Execute (x)
: File can be executed.
Setting Permissions
- Right-click on the file/folder and select
Change Permissions
. - Use the checkbox matrix to set the permissions and click
Change
.
Best Practices:
- HTML files and images: 644
- Folders: 755
- CGI Scripts: 755
- Avoid setting any file or folder to 777.
Deleting Files and Folders
cPanel's File Manager includes a Trash
folder, much like the Recycle Bin in Windows.
- Right-click on the item and choose
Delete
. - Confirm the action.
Restoring from Trash
Right-click the file in the Trash folder and select Restore
.
Emptying the Trash
Right-click on the Trash
folder and choose Empty
.
This guide aims to offer a holistic approach to using the File Manager in cPanel. For additional queries or technical issues, please submit a ticket for specialized assistance.