How do I use the file manager in cPanel?
Introduction
One of the most basic computer operations is the File managementthat are stored on a typical computer. Each operating system provides different tools to perform basic operations on its file system, and the most common approaches to managing files are either through the operating system's command line or through some sort of graphical user interface.
cPanel is no different from a standard operating system when it comes to providing a convenient way of Files in the web hosting account of the user. In the following lines of this tutorial, we will discuss in detail what cPanel File Manager is and how to use it to better organize the files of your web hosting account. New to cPanel? What is cPanel briefly explained.
Access to the cPanel file manager
To be able to use the functions of cPanel, you must first register with cPanel. For this purpose, we have created another tutorial on this topic - "How to log in to the cPanel", so check it out if you're feeling lost.
Once you have logged into cPanel, you will see different areas with different icons. We will explain all of them in the next tutorials of our cPanel tutorial series. Now you need to click on the function "File manager" click:
Clicking on this function will take you to a whole new page where you can perform further file management actions.
The user interface of the file manager
To better understand how the file manager works, it is important to first get an overview of the file manager's functions.
When you access the "File manager" function, you will be shown a page that can be logically divided into 3 sections:
- "Control panel or actions" view - This area offers all the tools you need to manage the files and folders of your web hosting account. In addition, you will find file search tools in the top right-hand corner of the area and, of course, a "Settings" button that opens the configuration interface for various configurations of the "File manager" function.
- Folder structure or folder tree - This section shows a tree-like structure of the files and folders associated with your web hosting account. In this area you can easily navigate through the folders to reach the desired destination. Once you select a folder by clicking on it, the contents of this folder will be displayed in the next area of the File Manager - the Folder Structure Content View.
- Folder content view file structure - This pane displays a list of all the files and folders located in the folder you selected in the Folder Tree view. Of course, you can also use the Folder Contents view to navigate the folders of your web hosting account without using the Folder Tree view.
Understanding the "File Manager" interface will help you navigate better and take full advantage of this feature!
Managing the files and folders of your web hosting account
Now that you know what the file manager looks like, let's take a look at the different functions it offers. Please note that all the functions we will describe are available both as separate buttons in the "Actions" area and as drop-down menus for each selected file.
Create new files or folders
To create a new file or folder, you must first make sure that you are in the correct folder. A typical file structure for any web hosting account consists of:
/home/username - This is the home folder of your web hosting account. Since this is the root folder of your account, all other files and folders associated with your account are located in this folder.
/home/username/public_html (/home/username/www - symlink) - This is the public folder of your web hosting account. The main domain of your web hosting account and all domain aliases you add to your account will, by definition, display the contents of this folder. You should place the files of your website(s) in this folder.
/home/username/etc, /home/username/logs, /home/username/lscache, /home/username/lscmData, /home/username/perl - These are system folders that are required for the correct operation of your web hosting account. We strongly recommend that you do not modify or delete the folders themselves or their contents in order to keep the cPanel service and all your websites working correctly.
/home/username/mail - In this folder you will find all the emails associated with the email accounts you have created for your web hosting account.
/home/username/ssl - In this folder you will find all SSL certificates issued for the domains/subdomains of your web hosting account. Again, if you want everything to work properly, please do not change the content or structure of this folder.
/home/username/tmp - This folder is used for storing temporary files that cPanel generates when you interact with the provided functions.
/home/username/access-logs - As the name suggests, this folder contains the access logs created for the domains/subdomains associated with your web hosting account.
Now that you know which folders you can find in your web hosting account, we will create a new folder called "user-files" in the root directory of your account. To do this, click on the "New folder" button in the "Show actions" area.
When you click the button, a new configuration window opens with the name "New folder". Enter the actual name of the folder to be created. You can make further settings here, such as the storage location of the new folder. Please note that you must enter the relative path to the folder for this function if you want to create the folder in a location other than the current storage location (displayed in the "Folder contents" area).
Finally, click on the "Create new folder" button to create the folder.
The folder is now displayed in the Folder Contents view.
Now create a new file in the newly created folder. To do this, access the folder by double-clicking on it in the folder contents view. This will show you the contents of the folder, which in our case is empty.
Please also note that cPanel the folder name highlights in the folder tree view so you know exactly which folder you are in.
To create a new file, please click on the "New file" button in the "Actions" area.
Again, a new window will open where you must enter the name of the newly created file. Also here you have to enter the relative path to the root folder of your account. You will notice that the second field for the relative path to the file is already filled in with the name of the folder. If you want the file to be created in the current folder, leave the field unchanged. If you want to create the file in another folder, enter the relative path to your home folder in this field.
Click on the button "Create new file". The file you specified is created.
Please note that in our example we have also specified a file extension (.txt). However, this is not necessary, since the UNIX-like operating system considers this file as a plain text content type.
Upload/download files
Probably one of the best features offered by the file manager is the ability to upload or download files. Let's take a look at how this works.
To upload a new file, you must ensure that the folder to which the file is to be uploaded is selected and displayed in the "Folder contents" section. For the purposes of this tutorial, we will stay in the newly created folder "user-files".
When you click on the "Upload" button, you will be redirected to a new page where you can select the file from your local computer or upload it via Drag & Drop can transfer.
Once the file is selected, it is automatically uploaded. To track the progress of the upload, a progress bar is displayed directly below the upload interface.
Please note that you can select multiple files during the upload and a progress bar will be displayed for each of them.
Finally, if you click on the "Back to ...." link directly below the file list, you will be redirected back to the folder to which the files should be uploaded.
If you have several Files uploaded have, these should also be displayed.
Downloading a file is even easier! There are Only two actions that you need to perform. Selecting the file in the "Contents of the folder" section and using the "Download" button in the "Actions" section.
The file is downloaded to the "Downloads" folder or to another folder. This depends on the configuration of your Web browser for downloads.
Delete files/folders
To delete a file or folder, select the file or folder. Then click on the "Delete" button in the "Actions" area.
You will see a new window where you have to confirm how the file should be deleted. You can choose whether to move the file to the recycle bin of your web hosting account or delete it permanently.
We recommend that you do not move the file to the Recycle Bin, but download it and then delete it permanently to avoid data loss.
Rename file or folder
To rename a file or folder, you must select it again. In the "Actions" area, you must click on the "Rename" operate.
A new window will open where you enter the new name of the file you want to rename.
When you have finished, please click on the "Rename file" button so that the file is successfully renamed.
Edit a file
Editing a file means changing its contents. The cPanel file manager offers a handy text editor for all files. To edit the Text editor you must select a file and then click on the "Edit" button located in the "Actions" area.
A new window will open where you have to select the file encoding.
We strongly recommend that you select the "utf-8" encoding, which is selected by default. Finally, click the "Edit" button to access the file editor.
The functions of the File Editor are pretty much self-explanatory, so we won't cover them in this tutorial.
If the file you want to edit is an HTML file, you can also take advantage of an additional editor optimized specifically for HTML files. The HTML editor. You will find it again in the action view, right next to the "Edit" button.
The HTML editor is actually a simple WYSIWYG editor that allows you to edit not only the content of the file, but also its source code.
Set permissions for files and folders
In all UNIX-based operating systems all files and folders are protected by a set of security permissions. To set these permissions, a user usually has to do it from the command line. Thanks to the cPanel File Manager Function however, you can set the permissions of a file or folder via an easy-to-use permission manager.
To view the current file permissions or set new file permissions, please select the file or folder you wish to edit. Then click on the "Permissions" button in the "Actions" area.
You will see the Permissions window. You can fully manage them and configure them according to your personal needs. Please note that the default permissions for files are 644 and for folder 750 are.
If you click on the "Change permissions" button, these are set for the selected file or folder.
The management of the files and folders of your Web Hosting Accounts will always be an important foundation that every web hosting account user must understand and be able to perform without any problems. If there is a function that you don't understand or can't cope with, please contact our technical support Team and ask what you need to achieve your file management goals.