Overview
cPanel organizes all the files in your account into folders. Use the File Manager interface to manage and edit your files.
- Whenever you access a folder that contains a Git™ repository, we strongly recommend that you do not update any files or directories. Changes could cause serious problems with the repository, regardless of whether you created it in the Git Version Control interface (cPanel >> Home >> Files >> Git™ Version Control).
- When a toolbar action isn’t available, the icon displays in gray.
- You can only use certain File Manager actions with one file at a time. Select the desired file before you attempt these actions.
- Any attempt to rename, edit, or view multiple files at the same time will only affect the first listed file in the folder.
Change Settings
To change the folder in which the File Manager interface opens, perform the following steps:
-
Click Settings. The Preferences interface will appear.
-
Select a folder to open by default:
- Home Directory — The main folder for your account.
- Web Root (public_html or www) — The most direct route to your files.
- Public FTP Root (public_ftp) — The folder for your FTP files.
- Document Root for: — The folder for the domain that you select from the menu.
-
To display hidden files in the interface, select Show Hidden Files (dotfiles).
-
To prevent messages about character encodings from displaying, select Disable Character Encoding Verification Dialogs.
-
Click Save.
Character encoding verification dialogs
When you edit a file with the Edit or HTML Editor actions, an interface appears to confirm the file’s character encoding. Use the menu to select the correct character encoding for the file. Then, click Edit to continue.
- Click Toggle Help for more information about how to select the correct character encoding.
- Click Disable Encoding Check to turn off future encoding verifications.
If you select the wrong initial encoding, your file may become corrupt. If your file displays as a series of special characters, immediately abort your action and select the correct encoding. Do not save the file.
Working with files and folders
The File Manager interface allows you to perform many actions on your files and folders.
Create or copy files or folders
To create a new file or folder, perform the following steps:
- Click + File or + Folder in the toolbar. A new interface will appear.
- Enter the new item’s name in the New File Name: or New Folder Name: text box.
Note:
To rename a folder or file, click the name. Then, enter the new name in the text box. Press the Return key to save the change.
- Enter the location in which the system will create the item in the New file will be created in: or New folder will be created in: text box.
- Click Create New File or Create New Folder.
To copy one or more files, perform the following steps:
- Select the files you want to copy.
Note:
You cannot create a copy of an item within the same folder.
- Click Copy from the toolbar at the top of the interface. The Copy interface will appear.
Note:
You can also right-click and select Copy from the menu.
- In the Copy interface, enter the file path for which you want to save the item in the Enter the file path that you want to copy this file to: text box.
- Click Copy File(s) to copy the files.
To copy a folder that contains files, perform the following steps:
- Select the folder that you want to copy.
- Use your preferred file compression application to compress the folder.
Note:
How you compress your folder will be based on your OS. For example, in macOS® 11.5, right-click the folder icon and select the
Compress "Folder"
option. - Click Upload from the toolbar and upload the compressed file by either dragging and dropping it or using the Select File button.
- Now that your folder appears in the File Manager interface, select it and click the Extract in the toolbar in the top of the interface. This will extract your folder.
Move files or folders
To move one or more files, perform the following steps:
- Select the file or files that you want to move.
- Click Move in the toolbar at the top of the interface. The Move interface will appear.
- Enter the file path that you want to move the file to in the Enter the file path that you want to move this file to: text box.
- Click Move File(s) to move the file.
You can also move files by:
- Dragging a file icon into a new destination folder.
- Clicking on a file and then clicking Rename in the toolbar.
Update file or folder permissions
To modify a file or folder’s permissions, perform the following steps:
- Select the file or folder for which to change the permissions.
- From the toolbar, click Permissions. The Change Permissions interface will appear.
- Use the checkboxes or text boxes to change the item’s permissions. This setting defaults to
0644
. - Click Change Permissions to save your changes.
Delete or restore files and folders
- When you delete files or folders, the system does not permanently delete the files. Instead, the system moves the files to the Trash folder.
- Click Empty Trash to permanently delete the Trash folder’s contents.
To delete a file or folder, perform the following steps:
- Select the file or folder you want to delete.
- In the toolbar, click Delete. The Trash interface will appear.
- Click Confirm to confirm that you want to delete the file or folder.
To restore a file or folder, perform the following steps:
- Click View Trash from the toolbar.
- Select the file or folder that you want to restore.
- Click Restore in the toolbar.
- Confirm that you want to restore the item.
Other item actions
The Compress and Extract actions will only work with the .zip
format if Zip exists on your server. Your hosting provider can use WHM’s EasyApache 4 interface (WHM >> Home >> Software >> EasyApache 4) to install this PHP extension.
Right-click files or folders to select from a menu of actions that the system customizes based on the file’s type.
Feature | Displays for | Description |
---|---|---|
Upload | Files | Upload individual items, such as files or images.
Note:
You cannot upload a folder through this interface. Create a new folder and upload the desired files into it.
|
Download | Files | Download files to save them locally. |
Rename | Files, Compressed Files, Folders | Rename the file or folder. |
Edit | Files | Open the selected file in an editor.
Warning:
You cannot edit a file in this interface if it contains more than one megabyte (1 MB) of data. To edit the file, you must download it and use a local editor.
|
HTML Editor | Files | Open the selected HTML file in a visual HTML editor.
Warning:
You cannot edit a file in this interface if it contains more than one megabyte (1 MB) of data. To edit the file, you must download it and use a local editor.
|
View | Files | View the contents of the selected file. |
Extract | Compressed Files | Extract the selected *.zip , *.Gz , or *.Bz2 archive and store the files in a folder. |
Compress | Files, Compressed Files, Folders | Compress the selected files or folders to a single *.zip , *.Gz , or *.Bz2 archive and store the compressed file to a specified folder. |
Password Protect | Folders | Set a username and password to restrict access to a folder.
Note:
Your hosting provider must enable this feature.
|
Leech Protection | Folders | Redirect users who have shared the password to a restricted area of your site. The system will redirect accounts that exceed a set number of logins in a two hour period to a selected URL, or receive an internal server error message.
Note:
Your hosting provider must enable this feature.
|
Manage Indices | Folders | Customize the way users view a folder on the web.
Note:
Your hosting provider must enable this feature.
|
Search for an item
The Search text box at the top-right corner of the interface allows users to search for a specific file. By default, the Search text box searches all files in the home folder. You can limit the search to the document root at /home/user/public_html
, where user
represents your cPanel username. You can also limit the search to the folder in the interface.
To search for a file, perform the following steps:
-
Use the Search menu to select the folder to search. You can select from the following options:
- All Your Files
- only public_html
- Current Directory
-
Enter the desired file name in the text box.
-
Click Go.
A new interface displays the filenames that match your search.
- To go to a folder, or go to the folder that contains the file, double-click the desired item in the list.
- If no files that include your search term exist, a No records found message appears.