InMotion Hosting Support Center

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.

Using use the Code Editor in cPanel

  1. Cpanel home pageLogin into your cPanel.
  2. File manager cpanelGo to the File Manager.
  3. Select teh file and click code editorNavigate to the page you want to edit. Select the file and click code editor.

    Now 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.

Was this article helpful?
Continued Education in Course 202: Managing your Files in cPanel
You are viewing Section 8: How to Use the Code Editor in the cPanel File Manager
Section 9: Creating an Under Construction or Coming Soon page
n/a Points
2017-11-09 3:55 pm

As I select lines of code I get an echo and have diffilulty reading the code.  As I move further into the code and  select a line of code an echo image appears several lines below the line I'm trying view.  How can I fix this?

I'm running cPanel via a GoDaddy site. I'm editing php code using Chrome version 61.0.3163.100 64 bit offical build.

31,093 Points
2017-11-09 5:54 pm
As a test, try using a different browser such as Firefox, or Safari. If your problems persist, I recommend contacting your host so they can test your specific account.

Thank you,
n/a Points
2017-10-05 1:16 pm


When I make changes in the code editior the new code shows up fine. However when I then go to the sitebuilder and make any changes then republish those changes the code that I entered in the code editor disappears?

What am I doing wrong?

Thank you

31,093 Points
2017-10-05 1:24 pm
Check the permissions of the file you are editing. Typical permissions for .html .php and other Document Types are 644.

Thank you,
n/a Points
2016-03-04 3:28 pm

No on out here can help with how to code custom sign up forms, link them to areas of interest and tie them together to be easily serachable? 

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,186 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.

13 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:
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!