There are many ways to edit a file and we are only going to list a few of them. The process involves first obtaining the file, and then using your chosen program to edit the file. We will discuss editing a file using Cpanel File Manager's Editor and Code Editor. The following tutorial will walk you through the steps to complete this simple process. If you do not have access to the Cpanel File Manager, you can also use third party solutions such as Notepad ++ to edit the file. For further information go to Editing Files with Notepad++.
Editing a File through the Cpanel File Manager
In order to edit a file, you first need to have access to that file. You can either directly open a file through the Cpanel File Manager, or you can upload the file to the server so that the editor applications can reach the file. Since the Cpanel File Manager and its editors reside on the server, the file to be edited must be on the server in order for the editor application to make its changes. If the file is not on the server then you will need to upload it to the server using the Cpanel File Manager.
- Login to the Cpanel and then click on the File Manager icon in the FILES section.
- When you click on the File Manager icon, you'll get a pop-up window before you see the File Manager open. Here's an example of what you would see:
Click on GO in order to proceed.
- At the top of the File Manager, click on the UPLOAD option and then upload the file to a location on your server. Make sure you note this location so that you can find the file later. You can always create a folder using the options in the File Manager, or you can use an existing folder. We recommend creating a folder and then saving the file to that folder.
- Once the file has been uploaded, you can then proceed to Editing the file with your choice of a File Manager Editor. Click on the file to select it, then select the editor you wish to use as per the screenshot below:
There are three types of editors available within the Cpanel, but we will only discuss the EDIT and CODE EDITOR options to keep things simple.
- Editing the file
Click on EDIT to proceed.
The primary difference between the EDIT and CODE EDITOR options is the way the text is read within the file and then formatted on to the screen. EDIT will output the text often with no formatting. CODE EDITOR parses the text and then attempts to place it into formatting for code programming. Additionally, the lines are numbered for easier reference. Here screen shots of the two options:
If you're working with HTML or PHP code, then using the CODE EDITOR helps to organize and identify the text within the file. If you're simply editing a small text file that may have a little text, then using the EDIT option is a simple solution.
- Once you've finished editing the file click on SAVE CHANGES in the top right hand corner.
Editing a file using the editors available within the Cpanel is a quick and easy task. Using the EDIT option actually loads large files quicker than the CODE EDITOR which has to parse the file and then place it in a specific format. However, select the solution that best works for you as per your needs to modify or build your website.