Editing code on your web site is an inevitable event. If you have minor changes to make on your web site that can be done simply, you can use the code editor in the cPanel File manager to change the code. This is called "Editing on the fly", which is changing the files of the source website while its live. Let's go to cPanel File manager and see how this editor works.

Important! Editing the code in a file on the server can break your website. Because the file is being used by the live website, we always recommend editing a backup copy of your site instead of the files on the server. Make a backup copy of the file before editing it by saving the file as a different name.

How to use the File Manager code editor

  1. Cpanel home pageLogin into your cPanel.
  2. File manager cpanelGo to the File Manager.

    Select teh directory in File managerSelect the directory the file is located in and click Go.

  3. Select teh file and click code editorNavigate to the page you want to edit. Select the file and click code editor.

    Code Editor InterfaceNow you should see the basic code editor interface.

    This is where you can add code or change code in your file.

    When you are done making the changes, you can click Save Changes at the top right. Otherwise, click cancel.

    The code editor has the following features.

    Code editor properties
    Editing: This is the path to the file location of the file you are editing.
    Line numbering Code editor will place all code in lines for an easier time in locating lines of code.
    Find and Replace Find and Replace box code editorBy entering Ctrl + F on your keyboard at the same time, the find and replace box shows. This is handy for making multiple changes to the same code.
    Highlighted code The code highlighter can be turned on or off. The color coding helps find blocks of code of the same code type easier. This can be turned off.
    Use Text editor This allows the interface to switch back and forth from the text editor to the code editor.
    Encoding Encoding selection code editor cpanelThe encoding drop box allows the page encoding type to be changed on the server. This is useful for foreign language sites or other programming code requirements.

Continued Education in Course 202: Managing your Files in cPanel
You are viewing Section 5: Using the File Manager Code Editor
Section 4: Creating an FTP account in Cpanel
Section 6: Creating an Under Construction or Coming Soon page
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Support Center Login

Social Media Login

Related Questions

Here are a few questions related to this article that our customers have asked:
OpenCart Product.tpl file needs edit
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
n/a Points
2014-07-30 11:41 am

When you make a copy of the file to edit by saving it under a different name then how do you implement the change? Do you have to delete the orginal file?

11,156 Points
2014-07-30 11:45 am
If you save the file under a different name, it will create a second copy of the file. If you want to replace the original with that file, you would need to remove the original and rename the copy.

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

2 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!