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
- Log in to your cPanel.
- Scroll down to the Files section.
- Click File Manager.
Once you're in the File Manager, you can do the following actions:
- Configure File Manager Settings
- Creating files and folders
- Deleting files and folders
- Renaming files and folders
- Editing files
- Copying files and folders
- Moving files and folders
- Uploading files
- Downloading files
- Updating files and folders permissions
- Compressing files and folders
- Extracting compressed files
Configure File Manager Settings
To change the default folder to open when you access your File Manager, follow these steps:
- Click Settings on the upper right part of the File Manager interface.
- 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).
- 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).
- Click Save.
Creating files and folders
To create files or folders, follow these steps:
- Open the folder or directory where you want the new file or folder to be created.
- Click File or Folder on the File Manager toolbar.
- On the next interface, enter the new item's name in the New File Name: or New Folder Name: text box.
- Click Create New File or Create New Folder.
Deleting files and folders
To delete files or folders, follow these steps:
- Right click on the file or folder you want to delete.
- Click Confirm.
Renaming files and folders
To rename files or folders, follow these steps:
- Right click on the file or folder you want to rename.
- Select Rename from the options.
- Enter a new file or folder name.
- Click Rename File.
Editing files
To edit files, follow these steps:
- Right click on the file you want to edit.
- Click Edit from the options.
- Click the Edit button to open the file editor.
- Make the changes that you want.
- 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:
- Right click on the file or folder that you want to copy.
- Select Copy from the options.
- Enter the folder or directory name where you want to place the copied file or folder.
IMPORTANT. All files inside the folder will also be copied. If you accidentally put an incorrect directory or path name, the system will automatically create a new folder with the directory or path name you've indicated.
- Click Copy Files.
Moving files and folders
To move files or folders, follow these steps:
- Right click on the file or folder that you want to move.
- Select Move from the options.
- Enter the folder or directory name where you want to move the file or folder.
IMPORTANT. All files and folders inside the folder you want to move will also be moved. If you accidentally put an incorrect directory or path name, the system will automatically create a new folder with the directory or path name you've indicated.
- 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:
- Go to the folder or directory path where you want the files to be uploaded.
- Click Upload at the top of the page.
- On the next page, click Select File. This opens your computer's file explorer or file finder.
- Locate and select the file that you want to upload.
- 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:
- Right click on the file that you want to download.
- Select Download from the options.
Updating files and folders permissions
To update files or folder permissions, follow these steps:
- Right click on the file or folder you want to modify.
- Select Change Permissions from the options.
- Use the checkboxes or text boxes to change the item’s permissions.
- Click Change Permissions to save the changes.
Compressing files and folders
To compress files into one folder, follow these steps:
- Right click the folder that contains all the files you want to compress.
- Click Compress from the options.
- Select a compression type.
- Click Compress Files.
Extracting compressed files
To extract a compressed file, follow these steps:
- Right click the compressed file.
- Select Extract from the options.
- 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.