Loading...

Knowledge Base

Managing Files in cPanel

This article provides an overview of file management in cPanel. It covers the tools and features available for managing files within your hosting account, including how to upload, download, edit, move, rename, and delete files and folders.

 

Accessing your cPanel File Manager 

  1. Log in to your cPanel.   
  2. Scroll down to the Files section.   
  3. Click File Manager. 

Once you're in the File Manager, you can do the following actions: 

 

Configure File Manager Settings 

To change the default folder to open when you access your File Manager, follow these steps:   

  1. Click Settings on the upper right part of the File Manager interface.  
  2. 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 (applicable if you have addon domains in your cPanel).  
  3. On the same interface, you can also check the Show Hidden Files (dotfiles) option, so you will be able to see files with filenames that start with a dot (e.g., .htaccess, .well-known, .trash). 
  4. Click Save

 

Creating files and folders 

To create files or folders, follow these steps:  

  1. Open the folder or directory where you want the new file or folder to be created.  
  2. Click File or Folder on the File Manager toolbar.  
  3. On the next interface, enter the new item's name in the New File Name: or New Folder Name: text box. 
  4. Click Create New File or Create New Folder

 

Deleting files and folders 

To delete files or folders, follow these steps:   

  1. Right click on the file or folder you want to delete.  
  2. Click Confirm

 

Renaming files and folders 

To rename files or folders, follow these steps:   

  1. Right click on the file or folder you want to rename.  
  2. Select Rename from the options.  
  3. Enter a new file or folder name.  
  4. Click Rename File. 

 

Editing files 

To edit files, follow these steps:   

  1. Right click on the file you want to edit.  
  2. Click Edit from the options.  
  3. Click the Edit button to open the file editor.  
  4. Make the changes that you want.  
  5. Click Save Changes at the top of the page when you're done. 

 

Copying files and folders

To copy files or folders, follow these steps:

  1. Right click on the file or folder that you want to copy.  
  2. Select Copy from the options.  
  3. Enter the folder or directory name where you want to place the copied file or folder.  
  4. Click Copy Files

 

Moving files and folders 

To move files or folders, follow these steps:

  1. Right click on the file or folder that you want to move.  
  2. Select Move from the options.  
  3. Enter the folder or directory name where you want to move the file or folder.  
  4. Click Move Files.  

You can also move files by dragging a file into a new destination folder.  

 

Uploading files  

To upload files, follow these steps:

  1. Go to the folder or directory path where you want the files to be uploaded.  
  2. Click Upload at the top of the page.  
  3. On the next page, click Select File. This opens your computer's file explorer or file finder.  
  4. Locate and select the file that you want to upload.  
  5. Click Open or the relevant button in your file explorer or file finder to proceed with the upload. 

 

Downloading files 

To download files, follow these steps: 

  1. Right click on the file that you want to download.  
  2. Select Download from the options. 

 

Updating files and folders permissions 

To update files or folder permissions, follow these steps:

  1. Right click on the file or folder you want to modify.  
  2. Select Change Permissions from the options.  
  3. Use the checkboxes or text boxes to change the item’s permissions.  
  4. Click Change Permissions to save the changes. 

 

Compressing files and folders 

To compress files into one folder, follow these steps:   

  1. Right click the folder that contains all the files you want to compress.  
  2. Click Compress from the options.  
  3. Select a compression type.  
  4. Click Compress Files

 

Extracting compressed files 

To extract a compressed file, follow these steps:   

  1. Right click the compressed file.  
  2. Select Extract from the options.  
  3. Click Extract Files.   

To learn more about cPanel File Manager, read the cPanel File Manager documentation

 

FAQs 

Where to upload files in cPanel? 

The path to the specific folder within your account depends on whether it's for the Primary Domain, Addon Domain, or a Subdomain. This table will help you understand where you should upload your website files. 

Domain Type URL Path File Structure
Main Domain http://example.com public_html
Subdomain http://store.example.com public_html/store
Addon Domain http://example2.com public_html/example2.com

 

Understanding the .htaccess file 

A .htaccess file is a configuration file used by web servers running on Apache. It allows you to control how your website behaves without needing to edit the main server configuration.  

It is commonly used to manage settings such as:   

  • Redirects (e.g., redirecting one URL to another)   
  • URL rewriting (making URLs more user-friendly)   
  • Access control (restricting or allowing access to specific files or folders)   
  • Custom error pages (e.g., 404 pages)   
  • Security rules and permissions   

The .htaccess file is usually located in the root directory of your website and can be edited using the File Manager in cPanel or a text editor.  

Because it directly affects how your website runs, even small changes to this file can impact your site’s functionality. 

Loading...