How to Work with Files in cPanel (Linux Hosting)

cPanel categorizes all the files in your account into directories. The File Manager interface offered by cPanel allows you to manage and modify your files.

To change the directory in which File Manager opens, perform the following steps:

  1. Click Settings to open the Preferences window.
  2. Select Web Root (public_html or www) for the most direct route to your files, or select another option to open the File Manager interface in that directory. 

    Note: Use this menu to display any hidden files.
  3. Click Save.

Create a new file or folder

To create a new file or folder, perform the following steps:

  1. Click + File or + Folder in the File Manager toolbar. A new window will appear.
  2. Enter the new item’s name in the New File Name: or New Folder Name: text box.
  3. Enter the location in which the system will save the item in the New file will be created in: or New folder will be created in:  text box.
  4. Click Create New File or Create New Folder.

Rename a file or folder

To change the name of a folder or file, select the item’s name and type the new name in the provided text box. Hit the Return key to confirm and save the change.

To move a file into a folder, perform the following steps:

  1. Click Move in the tool bar at the top of the interface. The New File window will appear.Note:You can also drag a file icon into a new destination folder. 
  2. 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.Note:You can also click an item and click Rename in the tool bar .
  3. Click Move File(s) to move the file.

Move files to a folder

To move files into a folder, perform the following steps:

  1. Select all of the items that you wish to move.
  2. Click Move in the tool bar at the top of the interface. The New File window will appear.
  3. 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.
  4. Click Move File(s) to move the files.

Copy a file

To copy a file, perform the following steps:

  1. Select the file you want to copyNote:You cannot create a copy of an item within the same folder.
  2. Click Copy from the tool bar at the top of the interface. The Copy window will appear.
  3. In the Copy window, enter the file path for which you want to save the item.
  4. Click Copy File(s) to copy the file.

Copy multiple files

To copy multiple files, perform the following steps:

  1. Select the items that you wish to copy.Note:You can also right-click and select Copy from the menu.
  2. Select Copy from the tool bar. The Copy window will appear.
  3. Enter the file path to which to copy the files in the  Enter the file path that you want to copy this file to:  text box.
  4. Click Copy File(s) to copy the files.

Modify file or folder permissions

To modify a file or folder’s permissions, perform the following steps:

  1. Select the file or folder for which to change the permissions.
  2. From the toolbar, click Permissions. The Change Permissions window will appear. 
  3. Use the checkboxes or text boxes to change the item’s permissions. This setting’s permissions default to 0644.
  4. Click Change Permissions to save your changes.

Delete and restore files and folders

To delete a file or folder, perform the following steps:

  1. Select the file or folder you want to delete.
  2. From the toolbar, click Delete. The Trash window will appear. 
  3. Click Trash File(s) to confirm that you want to delete the file or folder. 

 To restore a file or folder, perform the following steps:

  1. Click View Trash from the toolbar.
  2. Select the file or folder that you want to restore.
  3. Click Restore in the toolbar.
  4. Confirm that you want to restore the item.

Search for an item

The Search function located in the upper-right corner of the interface enables users to look for a particular file. By default, this Search function scans all files within the home directory. You have the option to narrow the search down to the document root at /home/user/public_html, substituting user with your cPanel username. Additionally, you can restrict the search to the directory shown in the file window.

To search for a file, perform the following steps:

  1. Use the Search menu to select the directory to search the following options:
    • All Your Files
    • only public_html
    • Current Directory
  2. Enter the desired file name in the text box.
  3. Click Go.

A new window will show the filenames that correspond to your search. To access a folder or navigate to the folder housing the file, double-click the item you want in the list. If there are no files containing your search term, the message No records found will be displayed.

Character encoding verification dialogs

When you modify a file using the Edit, Code Editor, or HTML Editor options, a dialog box will pop up to verify the character encoding of the file. Choose the appropriate character encoding for the file from the menu. After that, click Edit to proceed.

  • Click Toggle Help for more information about how to select the correct character encoding.
  • Click Disable Encoding Check to turn off future encoding verifications.

To enable or disable the Character Encoding Verification Dialogs feature, perform the following steps:

  1. Click Settings in the top-right corner of the interface. A new window will appear.
  2. Enable or disable the Character Encoding Verification Dialogs feature:
    • To enable encoding verification, deselect the Disable Character Encoding Verification Dialogs checkbox.
    • To disable encoding verification, select the Disable Character Encoding Verification Dialogs checkbox.
  3. Click Save.

Thanks for visiting. For queries and suggestions, emails are welcome at learnweb@hostingcolumn.com.

Subscribe to Hosting Column for the latest updates and posts.